#42702: glibtool drops dylibs at link time ------------------------+--------------------------------- Reporter: jeremyhu@… | Owner: ram@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: | Port: glibtool webkit-gtk ------------------------+--------------------------------- VLC fails to build with opencv support because opencv's pkg-config file lists paths to dylibs rather than -l<lib> arguments. This should work just fine, but glibtool doesn't like it. It just drops the dylibs on the floor when creating the command line to envoke: {{{ /opt/local/bin/glibtool --tag=CXX --mode=link /usr/bin/clang++ -pipe -Os -arch x86_64 -stdlib=libc++ -D_INTL_REDIRECT_MACROS -I/opt/local/var/macports/build /_Users_jeremy_src_macports_trunk_dports_multimedia_VLC-devel/VLC- devel/work/VLC-devel-2.1.99/contrib/include -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -fvisibility=hidden -ffast-math -funroll-loops -fomit-frame-pointer -avoid-version -module -export-symbols-regex ^vlc_entry -shrext .dylib -no-undefined ../../compat/libcompat.la ../../src/libvlccore.la -rpath '/opt/local/lib/vlc/plugins/video_filter' -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -Wl,-headerpad_max_install_names -L/opt/local/var/macports/build /_Users_jeremy_src_macports_trunk_dports_multimedia_VLC-devel/VLC- devel/work/VLC-devel-2.1.99/contrib/lib -o libopencv_example_plugin.la libopencv_example_plugin_la-opencv_example.lo /opt/local/lib/libopencv_calib3d.dylib /opt/local/lib/libopencv_contrib.dylib /opt/local/lib/libopencv_core.dylib /opt/local/lib/libopencv_features2d.dylib /opt/local/lib/libopencv_flann.dylib /opt/local/lib/libopencv_gpu.dylib /opt/local/lib/libopencv_highgui.dylib /opt/local/lib/libopencv_imgproc.dylib /opt/local/lib/libopencv_legacy.dylib /opt/local/lib/libopencv_ml.dylib /opt/local/lib/libopencv_nonfree.dylib /opt/local/lib/libopencv_objdetect.dylib /opt/local/lib/libopencv_photo.dylib /opt/local/lib/libopencv_stitching.dylib /opt/local/lib/libopencv_superres.dylib /opt/local/lib/libopencv_ts.a /opt/local/lib/libopencv_video.dylib /opt/local/lib/libopencv_videostab.dylib *** Warning: Linking the shared library libopencv_example_plugin.la against the *** static library /opt/local/lib/libopencv_ts.a is not portable! glibtool: link: rm -fr .libs/libopencv_example_plugin.exp glibtool: link: /usr/bin/nm .libs/libopencv_example_plugin_la- opencv_example.o | sed -n -e 's/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | sed '/ __gnu_lto/d' | /usr/bin/sed 's/.* //' | sort | uniq > .libs/libopencv_example_plugin.exp glibtool: link: /usr/bin/grep -E -e "^vlc_entry" ".libs/libopencv_example_plugin.exp" > ".libs/libopencv_example_plugin.expT" glibtool: link: mv -f ".libs/libopencv_example_plugin.expT" ".libs/libopencv_example_plugin.exp" glibtool: link: sed -e 's,^,_,' < .libs/libopencv_example_plugin.exp > .libs/libopencv_example_plugin-symbols.expsym glibtool: link: /usr/bin/clang++ -o .libs/libopencv_example_plugin.dylib -bundle .libs/libopencv_example_plugin_la-opencv_example.o ../../compat/.libs/libcompat.a -L/opt/local/lib -L/opt/local/var/macports/build /_Users_jeremy_src_macports_trunk_dports_multimedia_VLC-devel/VLC- devel/work/VLC-devel-2.1.99/contrib/lib ../../src/.libs/libvlccore.dylib -lintl -lidn -liconv -lm /opt/local/lib/libopencv_ts.a -Os -arch x86_64 -stdlib=libc++ -Wl,-headerpad_max_install_names -arch x86_64 -Wl,-headerpad_max_install_names -Wl,-exported_symbols_list,.libs /libopencv_example_plugin-symbols.expsym Undefined symbols for architecture x86_64: "_cvClearMemStorage", referenced from: Filter(filter_t*, picture_t*) in libopencv_example_plugin_la- opencv_example.o "_cvCreateMemStorage", referenced from: OpenFilter(vlc_object_t*) in libopencv_example_plugin_la- opencv_example.o "_cvGetSeqElem", referenced from: Filter(filter_t*, picture_t*) in libopencv_example_plugin_la- opencv_example.o "_cvHaarDetectObjects", referenced from: Filter(filter_t*, picture_t*) in libopencv_example_plugin_la- opencv_example.o "_cvLoad", referenced from: OpenFilter(vlc_object_t*) in libopencv_example_plugin_la- opencv_example.o "_cvRectangle", referenced from: Filter(filter_t*, picture_t*) in libopencv_example_plugin_la- opencv_example.o "_cvReleaseHaarClassifierCascade", referenced from: CloseFilter(vlc_object_t*) in libopencv_example_plugin_la- opencv_example.o "_cvReleaseMemStorage", referenced from: CloseFilter(vlc_object_t*) in libopencv_example_plugin_la- opencv_example.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) }}} -- Ticket URL: <https://trac.macports.org/ticket/42702> MacPorts <http://www.macports.org/> Ports system for OS X