Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling failed #20

Open
sizhangyu opened this issue Mar 14, 2018 · 2 comments
Open

compiling failed #20

sizhangyu opened this issue Mar 14, 2018 · 2 comments

Comments

@sizhangyu
Copy link

Hi,
I tried to compile on two computers and both failed. Could you help me with them? Thank you.


On the first one:
[100%] Linking CXX shared library find_face_landmarks.mexa64
Copy find_face_landmarks documentation file into the output folder
/usr/bin/ld: /usr/local/lib/libdlib.a(base64_kernel_1.cpp.o): relocation R_X86_64_32S against `_ZTVN4dlib6base64E' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libdlib.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
interfaces/matlab/find_face_landmarks_mex/CMakeFiles/find_face_landmarks.dir/build.make:151: recipe for target 'interfaces/matlab/find_face_landmarks_mex/find_face_landmarks.mexa64' failed
make[2]: *** [interfaces/matlab/find_face_landmarks_mex/find_face_landmarks.mexa64] Error 1
CMakeFiles/Makefile2:262: recipe for target 'interfaces/matlab/find_face_landmarks_mex/CMakeFiles/find_face_landmarks.dir/all' failed
make[1]: *** [interfaces/matlab/find_face_landmarks_mex/CMakeFiles/find_face_landmarks.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2


On the second one:
[ 12%] Building CXX object sequence_face_landmarks/CMakeFiles/sequence_face_landmarks.dir/sequence_face_landmarks.cpp.o
/home/heming/Documents/MATLAB/find_face_landmarks/sequence_face_landmarks/sequence_face_landmarks.cpp: In member function ‘virtual const sfl::Frame& sfl::SequenceFaceLandmarksImpl::addFrame(const cv::Mat&, int)’:
/home/heming/Documents/MATLAB/find_face_landmarks/sequence_face_landmarks/sequence_face_landmarks.cpp:70:39: error: ‘make_unique’ is not a member of ‘std’
std::unique_ptr sfl_frame = std::make_unique();
^
/home/heming/Documents/MATLAB/find_face_landmarks/sequence_face_landmarks/sequence_face_landmarks.cpp:70:61: error: expected primary-expression before ‘>’ token
std::unique_ptr sfl_frame = std::make_unique();
^
/home/heming/Documents/MATLAB/find_face_landmarks/sequence_face_landmarks/sequence_face_landmarks.cpp:70:63: error: expected primary-expression before ‘)’ token
std::unique_ptr sfl_frame = std::make_unique();
^
/home/heming/Documents/MATLAB/find_face_landmarks/sequence_face_landmarks/sequence_face_landmarks.cpp: In member function ‘void sfl::SequenceFaceLandmarksImpl::extract_landmarks(const cv::Mat&, sfl::Frame&)’:
/home/heming/Documents/MATLAB/find_face_landmarks/sequence_face_landmarks/sequence_face_landmarks.cpp:253:34: error: ‘make_unique’ is not a member of ‘std’
std::unique_ptr face = std::make_unique();
^
/home/heming/Documents/MATLAB/find_face_landmarks/sequence_face_landmarks/sequence_face_landmarks.cpp:253:55: error: expected primary-expression before ‘>’ token
std::unique_ptr face = std::make_unique();
^
/home/heming/Documents/MATLAB/find_face_landmarks/sequence_face_landmarks/sequence_face_landmarks.cpp:253:57: error: expected primary-expression before ‘)’ token
std::unique_ptr face = std::make_unique();
^
make[2]: *** [sequence_face_landmarks/CMakeFiles/sequence_face_landmarks.dir/sequence_face_landmarks.cpp.o] Error 1
make[1]: *** [sequence_face_landmarks/CMakeFiles/sequence_face_landmarks.dir/all] Error 2
make: *** [all] Error 2

@YuvalNirkin
Copy link
Owner

On the first one you should compile dlib with -fPIC flag.
On the second one you're missing c++14 support.

@iPsych
Copy link

iPsych commented Dec 6, 2018

I have same issue. How shall I recompile dlib with -fPIC in ubuntu?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants