Libhand library compilation error cannot find -lNOTFOUND

116 views Asked by At

I'm trying to build a hand model library from libhand.org on Ubuntu 14.04. The library uses ogre and opencv libraries. I followed the instructions provided by the author that allowed me to successfully install ogre and opencv. There is no problem with cmake .. . but during execute command

make -j4

I get the following error:

[ 87%] Building CXX object source/CMakeFiles/hand_renderer.dir/hand_pose.cc.o

[ 91%] Building CXX object source/CMakeFiles/hand_renderer.dir/scene_spec.cc.o
Linking CXX static library libhand_renderer.a

[ 91%] Built target hand_renderer
Scanning dependencies of target pose_designer

[ 95%] Building CXX object source/CMakeFiles/pose_designer.dir/pose_designer_main.cc.o

[100%] Building CXX object source/CMakeFiles/pose_designer.dir/pose_designer.cc.o

Linking CXX executable pose_designer

/usr/bin/ld: cannot find -lNOTFOUND

/usr/bin/ld: cannot find -lNOTFOUND

libhand_utils.a(file_dialog.cc.o): In function 
`libhand::FileDialog::TkExec(std::string const&)':
file_dialog.cc:(.text+0xead): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'

collect2: error: ld returned 1 exit status

make[2]: *** [source/pose_designer] Error 1

make[1]: *** [source/CMakeFiles/pose_designer.dir/all] Error 2
make: *** [all] Error 2

Does anyone know why this error occurs and what can be done?

1

There are 1 answers

1
Abrixas2 On

I assume this error occurs because some required library was not found during the run of cmake but that incident was not correctly detected (ie. cmake did not abort with an error). More details on that should be available in a file named CMakeError.log or CMakeOutput.log in the CMakeFiles directory.

The solution to this problem is either installing the missing library (which name should be available from the aforementioned files) or fix the build process to find the library, if it is already installed (for autotools, this would be using the CFLAGS and LDFLAGS environment variables to point to the correct include paths, compiler options, library paths and libraries; that should also work with CMake).

As an alternative explanation, cmake found the library but somehow failed to write the correct Makefiles. Then the solution would be manually replacing -lNOTFOUND by -l<library name> in the Makefiles.