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

freetype library is not passed when linking #1175

Closed
tpgxyz opened this issue May 22, 2017 · 2 comments
Closed

freetype library is not passed when linking #1175

tpgxyz opened this issue May 22, 2017 · 2 comments

Comments

@tpgxyz
Copy link

tpgxyz commented May 22, 2017

System information (version)
  • OpenCV => 3.2.0
  • Operating System / Platform => Linux x86_64/i586/aarch64/armv7hl
  • Compiler => LLVM/clang 4.0.1
Detailed description

Looks like -lfreetype is not passed when linking

make[2]: Entering directory '/builddir/build/BUILD/opencv-3.2.0/build'
[ 84%] Linking CXX executable ../../bin/cpp-example-videocapture_starter
cd /builddir/build/BUILD/opencv-3.2.0/build/samples/cpp && /usr/bin/cmake -E cmake_link_script CMakeFiles/example_videocapture_starter.dir/link.txt --verbose=1
/usr/bin/clang++ -Os -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -flto -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -Qunused-arguments -fomit-frame-pointer -ffast-math -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp=libomp -Wno-unused-function -Wno-missing-declarations -Os -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -flto -DNDEBUG -Os -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -flto -Wl,-O2 -flto -rdynamic CMakeFiles/example_videocapture_starter.dir/videocapture_starter.cpp.o -o ../../bin/cpp-example-videocapture_starter -ldl -lm -lpthread -lrt -lGLU -lGL ../../lib/libopencv_stitching.so.3.2.0 ../../lib/libopencv_superres.so.3.2.0 ../../lib/libopencv_videostab.so.3.2.0 ../../lib/libopencv_aruco.so.3.2.0 ../../lib/libopencv_bgsegm.so.3.2.0 ../../lib/libopencv_bioinspired.so.3.2.0 ../../lib/libopencv_ccalib.so.3.2.0 ../../lib/libopencv_cvv.so.3.2.0 ../../lib/libopencv_dpm.so.3.2.0 ../../lib/libopencv_freetype.so.3.2.0 ../../lib/libopencv_fuzzy.so.3.2.0 ../../lib/libopencv_hdf.so.3.2.0 ../../lib/libopencv_line_descriptor.so.3.2.0 ../../lib/libopencv_optflow.so.3.2.0 ../../lib/libopencv_reg.so.3.2.0 ../../lib/libopencv_saliency.so.3.2.0 ../../lib/libopencv_stereo.so.3.2.0 ../../lib/libopencv_structured_light.so.3.2.0 ../../lib/libopencv_surface_matching.so.3.2.0 ../../lib/libopencv_tracking.so.3.2.0 ../../lib/libopencv_xfeatures2d.so.3.2.0 ../../lib/libopencv_ximgproc.so.3.2.0 ../../lib/libopencv_xobjdetect.so.3.2.0 ../../lib/libopencv_xphoto.so.3.2.0 ../../lib/libopencv_shape.so.3.2.0 ../../lib/libopencv_phase_unwrapping.so.3.2.0 ../../lib/libopencv_rgbd.so.3.2.0 ../../lib/libopencv_calib3d.so.3.2.0 ../../lib/libopencv_video.so.3.2.0 ../../lib/libopencv_datasets.so.3.2.0 ../../lib/libopencv_dnn.so.3.2.0 ../../lib/libopencv_face.so.3.2.0 ../../lib/libopencv_plot.so.3.2.0 ../../lib/libopencv_text.so.3.2.0 ../../lib/libopencv_features2d.so.3.2.0 ../../lib/libopencv_flann.so.3.2.0 ../../lib/libopencv_objdetect.so.3.2.0 ../../lib/libopencv_ml.so.3.2.0 ../../lib/libopencv_highgui.so.3.2.0 ../../lib/libopencv_videoio.so.3.2.0 ../../lib/libopencv_imgcodecs.so.3.2.0 ../../lib/libopencv_photo.so.3.2.0 ../../lib/libopencv_imgproc.so.3.2.0 ../../lib/libopencv_core.so.3.2.0
make[2]: Leaving directory '/builddir/build/BUILD/opencv-3.2.0/build'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'FT_Init_FreeType'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'hb_font_destroy'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'FT_Done_Face'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'FT_Done_FreeType'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'FT_New_Face'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'hb_ft_font_create'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'FT_Set_Pixel_Sizes'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'hb_buffer_create'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'hb_buffer_guess_segment_properties'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'hb_buffer_add_utf8'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'hb_buffer_get_glyph_infos'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'hb_shape'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'FT_Load_Glyph'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'FT_Outline_Transform'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'FT_Outline_Translate'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'FT_Outline_Decompose'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'hb_buffer_destroy'
../../lib/libopencv_freetype.so.3.2.0: error: undefined reference to 'FT_Render_Glyph'
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [samples/cpp/CMakeFiles/example_videocapture_starter.dir/build.make:144: bin/cpp-example-videocapture_starter] Error 1
make[1]: *** [CMakeFiles/Makefile2:14930: samples/cpp/CMakeFiles/example_videocapture_starter.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Steps to reproduce

Full logs can be found here
http://file-store.openmandriva.org/api/v1/file_stores/559fe362efa194b65106f38560d96038db76b96f.log?show=true

@alalek
Copy link
Member

alalek commented May 22, 2017

Try this: #926

@tpgxyz
Copy link
Author

tpgxyz commented May 23, 2017

@alalek Thanks. Issue fixed.

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

No branches or pull requests

3 participants