[MacPorts] #50709: port:opencv+qt4 uses Qt5 if both Qt4 and Qt5 are installed
#50709: port:opencv+qt4 uses Qt5 if both Qt4 and Qt5 are installed -------------------------+-------------------------------- Reporter: rjvbertin@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: | Port: opencv -------------------------+-------------------------------- The venom is all in the title: installing port:opencv with a Qt4 gui isn't possible currently if Qt5 is installed. I have encountered this kind of situation in other ports: a CMake file somewhere simply prefers Qt5 over Qt4 if the former version is available. The +qt4 variant thus requires a patch to that CMake file, to force it to consider only Qt4. -- Ticket URL: <https://trac.macports.org/ticket/50709> MacPorts <https://www.macports.org/> Ports system for OS X
#50709: port:opencv+qt4 uses Qt5 if both Qt4 and Qt5 are installed --------------------------+-------------------------------- Reporter: rjvbertin@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: opencv | --------------------------+-------------------------------- Comment (by rjvbertin@…): In addition, I'm seeing the following error when building VLC against `port:opencv+qt5` : {{{ make[5]: Entering directory `/Volumes/Debian/MP9/var/macports/build /_Volumes_Debian_MP9_site- ports_multimedia_VLC/VLC/work/vlc-2.2.2/modules/video_filter' ../../doltlibtool --tag=CC --mode=link /usr/bin/clang -I/opt/local/include/opencv -I/opt/local/include -O3 -march=native -g -arch x86_64 -D_INTL_REDIRECT_MACROS -I/Volumes/Debian/MP9/var/macports/build/_Volumes_Debian_MP9_site- ports_multimedia_VLC/VLC/work/vlc-2.2.2/contrib/include -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function- declaration -pipe -fvisibility=hidden -O3 -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 -L/opt/local/lib/samba3 -arch x86_64 -Wl,-headerpad_max_install_names -L/Volumes/Debian/MP9/var/macports/build/_Volumes_Debian_MP9_site- ports_multimedia_VLC/VLC/work/vlc-2.2.2/contrib/lib -o libopencv_wrapper_plugin.la libopencv_wrapper_plugin_la-opencv_wrapper.lo -L/opt/local/lib -L/opt/local/libexec/qt5/Library/Frameworks/QtCore.framework -L/opt/local/libexec/qt5/Library/Frameworks/QtGui.framework -L/opt/local/libexec/qt5/Library/Frameworks/QtWidgets.framework -L/opt/local/libexec/qt5/Library/Frameworks/QtTest.framework -L/opt/local/libexec/qt5/Library/Frameworks/QtConcurrent.framework -L/opt/local/libexec/qt5/Library/Frameworks/QtOpenGL.framework -L/opt/local/lib -L//System/Library/Frameworks -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core -lQtCore -lQtGui -lQtWidgets -lQtTest -lQtConcurrent -lQtOpenGL -lwebp -lpng -ltiff -ljasper -ljpeg -lImath -lIlmImf -lIex -lHalf -lIlmThread -lavcodec-2 -lavformat-2 -lavutil-2 -lswscale-2 -lavresample-2 -lz -lbz2 -framework VideoDecodeAcceleration -framework QTKit -framework QuartzCore -framework AppKit -ltbb -ltbbmalloc -lAGL -lOpenGL libtool: link: rm -fr .libs/libopencv_wrapper_plugin.exp libtool: link: /opt/local/bin/nm .libs/libopencv_wrapper_plugin_la- opencv_wrapper.o | sed -n -e 's/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | sed '/ __gnu_lto/d' | /opt/local/bin/gsed 's/.* //' | sort | uniq > .libs/libopencv_wrapper_plugin.exp libtool: link: /usr/bin/grep -E -e "^vlc_entry" ".libs/libopencv_wrapper_plugin.exp" > ".libs/libopencv_wrapper_plugin.expT" libtool: link: mv -f ".libs/libopencv_wrapper_plugin.expT" ".libs/libopencv_wrapper_plugin.exp" libtool: link: sed -e 's|^|_|' < .libs/libopencv_wrapper_plugin.exp > .libs/libopencv_wrapper_plugin-symbols.expsym libtool: link: /usr/bin/clang -o .libs/libopencv_wrapper_plugin.dylib -bundle .libs/libopencv_wrapper_plugin_la-opencv_wrapper.o ../../compat/.libs/libcompat.a -L/opt/local/lib -L/opt/local/lib/samba3 -L/Volumes/Debian/MP9/var/macports/build/_Volumes_Debian_MP9_site- ports_multimedia_VLC/VLC/work/vlc-2.2.2/contrib/lib ../../src/.libs/libvlccore.dylib -lintl -lidn -liconv -lm -ldbus-1 -L/opt/local/libexec/qt5/Library/Frameworks/QtCore.framework -L/opt/local/libexec/qt5/Library/Frameworks/QtGui.framework -L/opt/local/libexec/qt5/Library/Frameworks/QtWidgets.framework -L/opt/local/libexec/qt5/Library/Frameworks/QtTest.framework -L/opt/local/libexec/qt5/Library/Frameworks/QtConcurrent.framework -L/opt/local/libexec/qt5/Library/Frameworks/QtOpenGL.framework -L//System/Library/Frameworks -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core -lQtCore -lQtGui -lQtWidgets -lQtTest -lQtConcurrent -lQtOpenGL -lwebp -lpng -ltiff -ljasper -ljpeg -lImath -lIlmImf -lIex -lHalf -lIlmThread -lavcodec-2 -lavformat-2 -lavutil-2 -lswscale-2 -lavresample-2 -lz -lbz2 -framework VideoDecodeAcceleration -framework QTKit -framework QuartzCore -framework AppKit -ltbb -ltbbmalloc -lAGL -lOpenGL -O3 -march=native -g -arch x86_64 -O3 -Wl,-headerpad_max_install_names -arch x86_64 -Wl,-headerpad_max_install_names -framework VideoDecodeAcceleration -framework QTKit -framework QuartzCore -framework AppKit -Wl,-exported_symbols_list,.libs/libopencv_wrapper_plugin-symbols.expsym ld: library not found for -lQtCore clang: error: linker command failed with exit code 1 (use -v to see invocation) }}} Data like `-L/opt/local/libexec/qt5/Library/Frameworks/QtOpenGL.framework` comes from opencv.pc (Libs.private), and is not correct. It should be `-framework /opt/local/.../QtFoo.framework` without a subsequent `-lQtFoo`. The exact path to Qt's frameworks should be obtained from the appropriate Qt PortGroup. -- Ticket URL: <https://trac.macports.org/ticket/50709#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#50709: port:opencv+qt4 uses Qt5 if both Qt4 and Qt5 are installed --------------------------+-------------------------------- Reporter: rjvbertin@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: opencv | --------------------------+-------------------------------- Comment (by rjvbertin@…): Building +qt4 when Qt5 is also installed turns out not to require many modifications: {{{ --- /opt/local/var/macports/sources/default-ports/graphics/opencv/Portfile 2016-02-24 16:35:31.000000000 +0100 +++ /opt/local/site-ports/graphics/opencv/Portfile 2016-02-24 19:47:41.000000000 +0100 @@ -208,13 +208,13 @@ variant qt4 conflicts qt5 description {Build with Qt4 Backend support.} { PortGroup qt4 1.0 configure.args-replace -DWITH_QT=OFF \ - -DWITH_QT=ON + -DWITH_QT=4 } variant qt5 conflicts qt4 description {Build with Qt5 Backend support.} { PortGroup qt5 1.0 configure.args-replace -DWITH_QT=OFF \ - -DWITH_QT=ON + -DWITH_QT=5 } variant java description {Add Java bindings.} { }}} -- Ticket URL: <https://trac.macports.org/ticket/50709#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#50709: port:opencv+qt4 uses Qt5 if both Qt4 and Qt5 are installed --------------------------+-------------------------------- Reporter: rjvbertin@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: opencv | --------------------------+-------------------------------- Comment (by rjvbertin@…): the attached patchfile contains the above change, plus correction of an error in opencv.pc for the +qt4 variant . -- Ticket URL: <https://trac.macports.org/ticket/50709#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#50709: port:opencv+qt4 uses Qt5 if both Qt4 and Qt5 are installed --------------------------+------------------------ Reporter: rjvbertin@… | Owner: stromnov@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: opencv | --------------------------+------------------------ Changes (by mf2k@…): * cc: stromnov@… (removed) * owner: macports-tickets@… => stromnov@… -- Ticket URL: <https://trac.macports.org/ticket/50709#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts