Attempting to build vlc-qt4 kept failing with cpp-errors (this file was generated with moc-5....) until I modified qt.mk as below to explicitly add MOC to the environment bypassing the qtchooser: --- Uses/qt.mk (revision 474594) +++ Uses/qt.mk (working copy) @@ -118,8 +118,8 @@ . endfor # Pass the chosen Qt version to the environment for qtchooser. -CONFIGURE_ENV+= QT_SELECT=${_QT_RELNAME} -MAKE_ENV+= QT_SELECT=${_QT_RELNAME} +CONFIGURE_ENV+= QT_SELECT=${_QT_RELNAME} MOC=${MOC:Q} +MAKE_ENV+= QT_SELECT=${_QT_RELNAME} MOC=${MOC:Q} # Make sure both the installed mkspecs as well as the ones being built are # found, with the ones from the port being built having preference. Other ports using moc (or anything else backed by qtchooser) may be affected too -- this is not something, that would show up in a pristine build...
Hm, that seems to be an issue specifically with vlc and its configure script -- I would prefer the fix to be in multimedia/vlc*. mfg Tobias
(In reply to Tobias C. Berner from comment #1) > Hm, that seems to be an issue specifically with vlc How would you know? Poudrierre builds in jails, does not it, so it is unlikely to ever encounter a situation, where both mocs are installed... If ${MOC} is empty, vlc's configure looks for a) moc-qt4; b) moc in the PATH. It finds ${LOCALBASE}/bin/moc (which in our case is a symlink to qtchooser) and calls it. Why is qtchooser then choosing the wrong moc, I do not know... Either way, something must be done...
If you look at the configure output: [...] configure: WARNING: Not building Qt Interface with X11 helpers. checking for moc-qt5... no checking for moc... /usr/local/lib/qt5/bin/moc [...] it does not look like it is querying the qtchooser's moc-wrapper at all, as it should be /usr/local/bin/moc then. mfg Tobias
(In reply to Tobias C. Berner from comment #3) Well, it seems to have worked on another machine -- despite there being both mocs installed. Not sure, what it is specifically, that causes it to pick the wrong one on that box, where originally spotted.
Created attachment 195118 [details] Full output of make configure Here is the full output of `make configure` -- without the proposed changes to Uses/qt.mk. In particular: ... checking for moc-qt5... no checking for moc... /opt/lib/qt5/bin/moc ...
See also: https://trac.videolan.org/vlc/ticket/11772
Created attachment 195119 [details] suggested fix to multimedia/vlc Please try the following patch. It basically does the same thing, by pulling in qmake.mk to add additional env-vars for Qt. mfg Tobias
Comment on attachment 195119 [details] suggested fix to multimedia/vlc Yes, this seems to work, although I'm not sure, if pulling in an entire new .mk is better than adding one more env-variable. Anyway, thank you and, please, commit whatever fix you feel is best.
qt.mk is supposed to handle "adding dependencies on Qt components" not "fixing broken configures by adding env-vars". So either add the MOC= RCC= and so on manually to VLC's Makefile, or pull in qmake.mk to do it for you :) mfg Tobias
(In reply to Tobias C. Berner from comment #9) I spoke too soon. For some reason, your addition causes the port to attempt to perform install at build time... mi@symbion:ports/multimedia/vlc-qt4 (184) make ===> Staging for vlc-qt4-2.2.8_6,4 ===> vlc-qt4-2.2.8_6,4 depends on package: ffmpeg>=3.4.1,1 - found ===> vlc-qt4-2.2.8_6,4 depends on executable: update-desktop-database - found ===> vlc-qt4-2.2.8_6,4 depends on executable: gtk-update-icon-cache - found ===> vlc-qt4-2.2.8_6,4 depends on file: /opt/lib/libGL.so - found ===> vlc-qt4-2.2.8_6,4 depends on file: /opt/libdata/pkgconfig/xcb.pc - found ===> vlc-qt4-2.2.8_6,4 depends on file: /opt/libdata/pkgconfig/xproto.pc - found ===> Generating temporary packing list gmake[2]: Entering directory '/symbion/ports/multimedia/vlc-qt4/work/vlc-2.2.8' if test -z 'strip'; then \ gmake INSTALL_PROGRAM="/bin/sh /symbion/ports/multimedia/vlc-qt4/work/vlc-2.2.8/autotools/install-sh -c -s" \ install_sh_PROGRAM="/bin/sh /symbion/ports/multimedia/vlc-qt4/work/vlc-2.2.8/autotools/install-sh -c -s" INSTALL_STRIP_FLAG=-s \ install; \ else \ gmake INSTALL_PROGRAM="/bin/sh /symbion/ports/multimedia/vlc-qt4/work/vlc-2.2.8/autotools/install-sh -c -s" \ install_sh_PROGRAM="/bin/sh /symbion/ports/multimedia/vlc-qt4/work/vlc-2.2.8/autotools/install-sh -c -s" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='strip'" install; \ fi gmake[3]: Entering directory '/symbion/ports/multimedia/vlc-qt4/work/vlc-2.2.8' ... gmake install-recursive gmake[4]: Entering directory '/symbion/ports/multimedia/vlc-qt4/work/vlc-2.2.8' Making install in compat gmake[5]: Entering directory '/symbion/ports/multimedia/vlc-qt4/work/vlc-2.2.8/compat' gmake install-am gmake[6]: Entering directory '/symbion/ports/multimedia/vlc-qt4/work/vlc-2.2.8/compat' gmake[7]: Entering directory '/symbion/ports/multimedia/vlc-qt4/work/vlc-2.2.8/compat' /bin/mkdir -p '/opt/lib/vlc' ../doltlibtool --mode=install /usr/bin/install -c -s libcompat.la '/opt/lib/vlc' libtool: install: /usr/bin/install -c .libs/libcompat.lai /opt/lib/vlc/libcompat.la install: /opt/lib/vlc/libcompat.la: Read-only file system gmake[7]: *** [Makefile:1041: install-pkglibLTLIBRARIES] Error 71 ...
That's a shame -- qmake.mk problaby give's too much env-info :( -- like the DESTDIRNAME or the CONFIGURE_ARGS ... how about this one: Index: multimedia/vlc/Makefile =================================================================== --- multimedia/vlc/Makefile (revision 474596) +++ multimedia/vlc/Makefile (working copy) @@ -242,7 +242,8 @@ # QT_CFLAGS: pkg-config --cflags "QtCore QtGui >= 4.6.0" # QT_LIBS: pkg-config --libs "QtCore QtGui >= 4.6.0" QT4_CONFIGURE_ENV= QT_CFLAGS="-I${QT_INCDIR}/QtGui -DQT_SHARED -I${QT_INCDIR} -I${QT_INCDIR}/QtCore" \ - QT_LIBS="-lQtGui -L${QT_LIBDIR} -lQtCore" + QT_LIBS="-lQtGui -L${QT_LIBDIR} -lQtCore" \ + MOC="${MOC}" RCC="${RCC}" UIC="${UIC}" QT5_USES= qt:5 QT5_USE= QT=gui,core,widgets,x11extras,buildtools_build
(In reply to Tobias C. Berner from comment #11) > QT4_CONFIGURE_ENV= QT_CFLAGS="-I${QT_INCDIR}/QtGui -DQT_SHARED -I${QT_INCDIR} -I${QT_INCDIR}/QtCore" \ > - QT_LIBS="-lQtGui -L${QT_LIBDIR} -lQtCore" > + QT_LIBS="-lQtGui -L${QT_LIBDIR} -lQtCore" \ > + MOC="${MOC}" RCC="${RCC}" UIC="${UIC}" Should work, but, I'd say, this should be added to QT5_CONFIGURE_ENV too. Or just always add it to CONFIGURE_ENV, whether or not any QT is requested....
FYI: I am trying to update vlc to 3.x in the near future[tm]. Just waiting for some work on v4l for that, see https://reviews.freebsd.org/D14842 and https://reviews.freebsd.org/D16121. Upstream vlc has abandoned support for qt4.
I bumped into this today as well. How about a CONFLICTS_BUILD? That would at least stop things early, without needing to dig into the configure mechanics exactly. (And, as Thomas points out, this is a problem that is going away anyway by dropping Qt4 support)
qt4 support has been deprecated with the retirement of vlc 2.x on 2018-12-31