Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 673532

Summary: dev-qt/qtserialport:5 fails to find udev
Product: Gentoo Linux Reporter: Rick Farina (Zero_Chaos) <zerochaos>
Component: Current packagesAssignee: Qt Bug Alias <qt>
Status: RESOLVED OBSOLETE    
Severity: normal CC: chiitoo, esigra, ivan, polynomial-c, sam, toralf
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=818760
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
dev-qt:qtserialport-5.12.1:20190306-201357.log
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
temp.tbz2
dev-qt:qtserialport-5.12.4-build-success.log

Description Rick Farina (Zero_Chaos) gentoo-dev 2018-12-21 17:28:20 UTC
I really don't know what is going on here, but here is what I do know.  The ebuild has a hack in src_prepare to force udev even when udev isn't found.  If that hack is removed, I'm able to build *but it doesn't link to udev*.  eudev is installed on the system, includes are all in place, pkgconfig can find it, etc.  build log looks like this:

 * Package:    dev-qt/qtserialport-5.11.1
 * Repository: gentoo
 * Maintainer: qt@gentoo.org
 * Upstream:   https://bugreports.qt.io/
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   compressdebug sandbox splitdebug userpriv usersandbox
 * Running qt5_qmake 
Info: creating stash file /var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/.qmake.stash
Info: creating cache file /var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/.qmake.cache
Checking for ntddmodm... no
 * Running emake 
cd src/ && ( test -e Makefile || /usr/lib64/qt5/bin/qmake -o Makefile /var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/src.pro CONFIG+=release CONFIG-=debug 'QMAKE_AR=x86_64-pc-linux-gnu-ar cqs' QMAKE_CC=x86_64-pc-linux-gnu-gcc QMAKE_LINK_C=x86_64-pc-linux-gnu-gcc QMAKE_LINK_C_SHLIB=x86_64-pc-linux-gnu-gcc QMAKE_CXX=x86_64-pc-linux-gnu-g++ QMAKE_LINK=x86_64-pc-linux-gnu-g++ QMAKE_LINK_SHLIB=x86_64-pc-linux-gnu-g++ QMAKE_OBJCOPY=x86_64-pc-linux-gnu-objcopy QMAKE_RANLIB= QMAKE_STRIP=x86_64-pc-linux-gnu-strip 'QMAKE_CFLAGS=-Os -mtune=nocona -pipe -ggdb -frecord-gcc-switches' QMAKE_CFLAGS_RELEASE= QMAKE_CFLAGS_DEBUG= 'QMAKE_CXXFLAGS=-Os -mtune=nocona -pipe -ggdb -frecord-gcc-switches' QMAKE_CXXFLAGS_RELEASE= QMAKE_CXXFLAGS_DEBUG= 'QMAKE_LFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0' QMAKE_LFLAGS_RELEASE= QMAKE_LFLAGS_DEBUG= ) && make -f Makefile 
make[1]: Entering directory '/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src'
cd serialport/ && ( test -e Makefile || /usr/lib64/qt5/bin/qmake -o Makefile /var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/serialport.pro CONFIG+=release CONFIG-=debug 'QMAKE_AR=x86_64-pc-linux-gnu-ar cqs' QMAKE_CC=x86_64-pc-linux-gnu-gcc QMAKE_LINK_C=x86_64-pc-linux-gnu-gcc QMAKE_LINK_C_SHLIB=x86_64-pc-linux-gnu-gcc QMAKE_CXX=x86_64-pc-linux-gnu-g++ QMAKE_LINK=x86_64-pc-linux-gnu-g++ QMAKE_LINK_SHLIB=x86_64-pc-linux-gnu-g++ QMAKE_OBJCOPY=x86_64-pc-linux-gnu-objcopy QMAKE_RANLIB= QMAKE_STRIP=x86_64-pc-linux-gnu-strip 'QMAKE_CFLAGS=-Os -mtune=nocona -pipe -ggdb -frecord-gcc-switches' QMAKE_CFLAGS_RELEASE= QMAKE_CFLAGS_DEBUG= 'QMAKE_CXXFLAGS=-Os -mtune=nocona -pipe -ggdb -frecord-gcc-switches' QMAKE_CXXFLAGS_RELEASE= QMAKE_CXXFLAGS_DEBUG= 'QMAKE_LFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0' QMAKE_LFLAGS_RELEASE= QMAKE_LFLAGS_DEBUG= ) && make -f Makefile 
make[2]: Entering directory '/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport'
perl /usr/lib64/qt5/mkspecs/features/data/unix/findclasslist.pl < QtSerialPort.version.in > QtSerialPort.version
x86_64-pc-linux-gnu-g++ -Os -mtune=nocona -pipe -ggdb -frecord-gcc-switches -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -dM -E -o .moc/moc_predefs.h /usr/lib64/qt5/mkspecs/features/data/dummy.cpp
x86_64-pc-linux-gnu-g++ -c -Os -mtune=nocona -pipe -ggdb -frecord-gcc-switches -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DLINK_LIBUDEV -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_SERIALPORT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I. -I../../include -I../../include/QtSerialPort -I../../include/QtSerialPort/5.11.1 -I../../include/QtSerialPort/5.11.1/QtSerialPort -isystem /usr/include/qt5/QtCore/5.11.1 -isystem /usr/include/qt5/QtCore/5.11.1/QtCore -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -I.moc -I/usr/lib64/qt5/mkspecs/linux-g++ -o .obj/qserialportinfo.o qserialportinfo.cpp
x86_64-pc-linux-gnu-g++ -c -Os -mtune=nocona -pipe -ggdb -frecord-gcc-switches -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DLINK_LIBUDEV -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_SERIALPORT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I. -I../../include -I../../include/QtSerialPort -I../../include/QtSerialPort/5.11.1 -I../../include/QtSerialPort/5.11.1/QtSerialPort -isystem /usr/include/qt5/QtCore/5.11.1 -isystem /usr/include/qt5/QtCore/5.11.1/QtCore -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -I.moc -I/usr/lib64/qt5/mkspecs/linux-g++ -o .obj/qserialport_unix.o qserialport_unix.cpp
x86_64-pc-linux-gnu-g++ -c -Os -mtune=nocona -pipe -ggdb -frecord-gcc-switches -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DLINK_LIBUDEV -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_SERIALPORT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I. -I../../include -I../../include/QtSerialPort -I../../include/QtSerialPort/5.11.1 -I../../include/QtSerialPort/5.11.1/QtSerialPort -isystem /usr/include/qt5/QtCore/5.11.1 -isystem /usr/include/qt5/QtCore/5.11.1/QtCore -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -I.moc -I/usr/lib64/qt5/mkspecs/linux-g++ -o .obj/qserialportinfo_unix.o qserialportinfo_unix.cpp
/usr/lib64/qt5/bin/moc -DLINK_LIBUDEV -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_SERIALPORT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB --include .moc/moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport -I/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport -I/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/include -I/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/include/QtSerialPort -I/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/include/QtSerialPort/5.11.1 -I/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/include/QtSerialPort/5.11.1/QtSerialPort -I/usr/include/qt5/QtCore/5.11.1 -I/usr/include/qt5/QtCore/5.11.1/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7 -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/x86_64-pc-linux-gnu -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include-fixed -I/usr/include qserialport.h -o .moc/moc_qserialport.cpp
x86_64-pc-linux-gnu-g++ -c -Os -mtune=nocona -pipe -ggdb -frecord-gcc-switches -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DLINK_LIBUDEV -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_SERIALPORT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I. -I../../include -I../../include/QtSerialPort -I../../include/QtSerialPort/5.11.1 -I../../include/QtSerialPort/5.11.1/QtSerialPort -isystem /usr/include/qt5/QtCore/5.11.1 -isystem /usr/include/qt5/QtCore/5.11.1/QtCore -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -I.moc -I/usr/lib64/qt5/mkspecs/linux-g++ -o .obj/qserialport.o qserialport.cpp
rm -f libQt5SerialPort.so.5.11.1 libQt5SerialPort.so libQt5SerialPort.so.5 libQt5SerialPort.so.5.11
x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,--no-undefined -Wl,--version-script,QtSerialPort.version -Wl,--enable-new-dtags -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQt5SerialPort.so.5 -o libQt5SerialPort.so.5.11.1 .obj/qserialport.o .obj/qserialportinfo.o .obj/qserialport_unix.o .obj/qserialportinfo_unix.o  -lQt5Core -lpthread  
.obj/qserialportinfo_unix.o: In function `deviceProperty(udev_device*, char const*)':
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:339: undefined reference to `udev_device_get_property_value'
.obj/qserialportinfo_unix.o: In function `availablePortsByUdev(bool&)':
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:392: undefined reference to `udev_new'
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:398: undefined reference to `udev_enumerate_new'
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:403: undefined reference to `udev_enumerate_add_match_subsystem'
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:404: undefined reference to `udev_enumerate_scan_devices'
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:406: undefined reference to `udev_enumerate_get_list_entry'
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:416: undefined reference to `udev_list_entry_get_name'
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:416: undefined reference to `udev_device_new_from_syspath'
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:329: undefined reference to `udev_device_unref'
.obj/qserialportinfo_unix.o: In function `deviceLocation':
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:379: undefined reference to `udev_device_get_devnode'
.obj/qserialportinfo_unix.o: In function `deviceName':
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:374: undefined reference to `udev_device_get_sysname'
.obj/qserialportinfo_unix.o: In function `availablePortsByUdev(bool&)':
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:426: undefined reference to `udev_device_get_parent'
.obj/qserialportinfo_unix.o: In function `deviceDriver':
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:344: undefined reference to `udev_device_get_driver'
.obj/qserialportinfo_unix.o: In function `availablePortsByUdev(bool&)':
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:329: undefined reference to `udev_device_unref'
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:410: undefined reference to `udev_list_entry_get_next'
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:321: undefined reference to `udev_enumerate_unref'
/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport/qserialportinfo_unix.cpp:313: undefined reference to `udev_unref'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:92: ../../lib/libQt5SerialPort.so.5.11.1] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src/serialport'
make[1]: *** [Makefile:45: sub-serialport-make_first] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1/src'
make: *** [Makefile:47: sub-src-make_first] Error 2
 * ERROR: dev-qt/qtserialport-5.11.1::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=dev-qt/qtserialport-5.11.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-qt/qtserialport-5.11.1::gentoo'`.
 * The complete build log is located at '/var/log/portage/dev-qt:qtserialport-5.11.1:20181220-194555.log.gz'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-qt/qtserialport-5.11.1/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-qt/qtserialport-5.11.1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1'
 * S: '/var/tmp/portage/dev-qt/qtserialport-5.11.1/work/qtserialport-everywhere-src-5.11.1'


The only difference I can see (due to the hack in src_prepare) is src/qtserialport/Makefile LIBS line is missing -ludev on the broken builds, but is there on my laptop.  I think that the "fix" in src_prepare is doing the wrong thing, and more importantly doesn't fix the intended issue (currently).  Whatever is causing QT to not find udev is the real problem, and hacking the ebuild to not check for udev is currently only partially fixing the issue.  You can plainly see udev references in this build log, but it's missing the all important -ludev which I'm sure stems from the check being broken in the first place.
Comment 1 Toralf Förster gentoo-dev 2019-03-06 21:08:37 UTC
appeared recently at the tinderbox image 17.1-desktop-plasma_libressl_20190302-221911
Comment 2 Toralf Förster gentoo-dev 2019-03-06 21:08:39 UTC
Created attachment 568032 [details]
emerge-info.txt
Comment 3 Toralf Förster gentoo-dev 2019-03-06 21:08:42 UTC
Created attachment 568034 [details]
dev-qt:qtserialport-5.12.1:20190306-201357.log
Comment 4 Toralf Förster gentoo-dev 2019-03-06 21:08:45 UTC
Created attachment 568036 [details]
emerge-history.txt
Comment 5 Toralf Förster gentoo-dev 2019-03-06 21:08:48 UTC
Created attachment 568038 [details]
environment
Comment 6 Toralf Förster gentoo-dev 2019-03-06 21:08:50 UTC
Created attachment 568040 [details]
etc.portage.tbz2
Comment 7 Toralf Förster gentoo-dev 2019-03-06 21:08:53 UTC
Created attachment 568042 [details]
logs.tbz2
Comment 8 Toralf Förster gentoo-dev 2019-03-06 21:08:56 UTC
Created attachment 568044 [details]
temp.tbz2
Comment 9 Michael Palimaka (kensington) gentoo-dev 2019-03-11 07:39:04 UTC
The current qtserialport requires udev unconditionally. The purpose of the sed in the is to ensure that is built independently of the Qt core installlation's udev status (dev-qt/qtgui[udev]).

I suspect that build failure is occurring here due to relying on QMAKE_LIBS_LIBUDEV being automagically populated when it may not always.

Could you please add the output of 'qlist dev-qt | grep gentoo | xargs grep udev'?
Comment 10 Michael Palimaka (kensington) gentoo-dev 2019-03-11 07:41:15 UTC
(In reply to Michael Palimaka (kensington) from comment #9)
> Could you please add the output of 'qlist dev-qt | grep gentoo | xargs grep
> udev'?

For the record, it looks like this on my testing devbox:
> # qlist dev-qt | grep gentoo | xargs grep --color udev
> /usr/lib64/qt5/mkspecs/gentoo/qmodule-qtcore.pri:QT.global_private.enabled_features = sse2 alloca_h alloca avx2 libudev network posix_fallocate reduce_exports reduce_relocations sql system-zlib testlib xml
> /usr/lib64/qt5/mkspecs/gentoo/qmodule-qtcore.pri:QMAKE_LIBS_LIBUDEV = /lib64/libudev.so

The presence of these entries are very suspicious given that I do not have qtgui (which is supposed to manage Qt core udev status) installed for this test.
Comment 11 Michael Palimaka (kensington) gentoo-dev 2019-04-18 08:51:11 UTC
*** Bug 682896 has been marked as a duplicate of this bug. ***
Comment 12 Michael 'veremitz' Everitt 2019-06-20 15:16:28 UTC
(In reply to Michael Palimaka (kensington) from comment #9)
> The current qtserialport requires udev unconditionally. The purpose of the
> sed in the is to ensure that is built independently of the Qt core
> installlation's udev status (dev-qt/qtgui[udev]).
> 
> I suspect that build failure is occurring here due to relying on
> QMAKE_LIBS_LIBUDEV being automagically populated when it may not always.
> 
> Could you please add the output of 'qlist dev-qt | grep gentoo | xargs grep
> udev'?

With Real udev I get (qtcore-5.9.z):
> [Thu-20-Jun  3:27pm] michael@ds-miche2:pts/18:2008 ~ $ qlist dev-qt | grep gentoo | xargs grep udev
>/usr/lib64/qt5/mkspecs/gentoo/qmodule-qtcore.pri:QT.global_private.enabled_features = alloca_h alloca sse2 libudev network posix_fallocate qml-debug reduce_exports reduce_relocations sql system-zlib testlib xml
>/usr/lib64/qt5/mkspecs/gentoo/qmodule-qtcore.pri:QMAKE_LIBS_LIBUDEV = -ludev
>/usr/lib64/qt5/mkspecs/gentoo/qtgui-qconfig.pri:QCONFIG_ADD= fontconfig system-freetype system-harfbuzz system-jpeg libinput xkbcommon-evdev opengl png system-png tslib libudev xcb xcb-glx xcb-plugin xcb-render xcb-sm xcb-xlib xinput

With eudev (on older qtcore-5.7.z)
>[Thu-20-Jun  4:14pm] root@wannabee:20:2064 ~ # qlist dev-qt | grep gentoo | xargs grep udev
>/usr/lib64/qt5/mkspecs/gentoo/qtgui-qconfig.pri:QCONFIG_ADD= fontconfig system-freetype gtk3 system-harfbuzz system-jpeg opengl png system-png libudev xcb xcb-glx xcb-plugin xcb-render xcb-sm xcb-xlib xinput2 xrender
Comment 13 Anton Bolshakov 2019-06-21 01:52:22 UTC
It seems that upstream has changed the way how they pass the library:
https://github.com/qt/qtbase/commit/b9a578ebc604e5f919c633ec8bee99aa8d21071d#diff-ba370d6d13d7329d2110e6509c5538a2

so instead of a usual "-ludev" they are passive a library path now.
Usually, that path is detected correctly, however in the report's setup (catalist?) it must be set as "qmodule-qtcore.pri:QMAKE_LIBS_LIBUDEV = /usr/lib64/libudev.so", as per log:

x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -Wl,--no-undefined -Wl,--version-script,QtSerialPort.version -Wl,--enable-new-dtags -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQt5SerialPort.so.5 -o libQt5SerialPort.so.5.12.1 .obj/qserialport.o .obj/qserialportinfo.o .obj/qserialport_unix.o .obj/qserialportinfo_unix.o  -lQt5Core -lpthread /usr/lib64/libudev.so
Comment 14 Chiitoo gentoo-dev 2019-06-22 10:20:54 UTC
Created attachment 580412 [details]
dev-qt:qtserialport-5.12.4-build-success.log

I wonder if this is still an issue with 5.12.4 (in overlay)?

I just built qtserialport-5.12.4, with eudev, on a stable testing install and noticed no issues.

(5.13 seems to be fine as well.)

qlist dev-qt | grep gentoo | xargs grep udev:

/usr/lib64/qt5/mkspecs/gentoo/qmodule-qtcore.pri:QT.global_private.enabled_features = sse2 alloca_h alloca avx2 libudev network posix_fallocate reduce_exports reduce_relocations sql system-zlib testlib xml
/usr/lib64/qt5/mkspecs/gentoo/qmodule-qtcore.pri:QMAKE_LIBS_LIBUDEV = /usr/lib64/libudev.so
/usr/lib64/qt5/mkspecs/gentoo/qtgui-qconfig.pri:QCONFIG_ADD= egl fontconfig system-freetype system-harfbuzz no-jpeg libinput xkbcommon opengl png system-png libudev xcb xcb-glx xcb-plugin xcb-render xcb-sm xcb-xlib xcb-xinput egl_x11
Comment 15 Andreas Sturmlechner gentoo-dev 2020-04-30 09:36:15 UTC
Please re-open if this happens again.
Comment 16 Rick Farina (Zero_Chaos) gentoo-dev 2020-12-11 19:22:13 UTC
Still broke
x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,--no-undefined -Wl,--version-script,QtSerialPort.version -Wl,--enable-new-dtags -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQt5SerialPort.so.5 -o libQt5SerialPort.so.5.15.1 .obj/qserialport.o .obj/qserialportinfo.o .obj/qserialport_unix.o .obj/qserialportinfo_unix.o  /usr/lib64/libQt5Core.so -lpthread    
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .obj/qserialportinfo_unix.o: in function `deviceProperty(udev_device*, char const*)':
qserialportinfo_unix.cpp:(.text+0x213): undefined reference to `udev_device_get_property_value'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .obj/qserialportinfo_unix.o: in function `availablePortsByUdev(bool&)':
qserialportinfo_unix.cpp:(.text+0x948): undefined reference to `udev_new'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0x96c): undefined reference to `udev_enumerate_new'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0x993): undefined reference to `udev_enumerate_add_match_subsystem'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0x9a0): undefined reference to `udev_enumerate_scan_devices'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0x9a8): undefined reference to `udev_enumerate_get_list_entry'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0x9d0): undefined reference to `udev_list_entry_get_name'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0x9dd): undefined reference to `udev_device_new_from_syspath'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0xa01): undefined reference to `udev_device_unref'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0xa42): undefined reference to `udev_device_get_devnode'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0xa74): undefined reference to `udev_device_get_sysname'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0xaa6): undefined reference to `udev_device_get_parent'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0xab7): undefined reference to `udev_device_get_driver'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0xd0f): undefined reference to `udev_device_unref'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0xd17): undefined reference to `udev_list_entry_get_next'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0xd46): undefined reference to `udev_enumerate_unref'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: qserialportinfo_unix.cpp:(.text+0xd50): undefined reference to `udev_unref'
collect2: error: ld returned 1 exit status
Comment 17 Anton Bolshakov 2021-01-03 01:23:37 UTC
https://bugreports.qt.io/browse/QTBUG-89767
Comment 18 Anton Bolshakov 2021-01-03 01:34:17 UTC
@QT team, 

can you come up with a workaround while we are waiting for the upstream?
I see two solutions:
 - add qtcore[udev] requirement
 - ZC solution: 's/$$QMAKE_LIBS_LIBUDEV/-ludev/'
Comment 19 Anton Bolshakov 2021-06-10 03:25:21 UTC
FYI, upstream fixed the issue, but I'm not sure how easy it would be to backport the patch. 

Fix Version/s:
Qt 6.2.0 Alpha
Comment 20 Andreas Sturmlechner gentoo-dev 2021-08-22 22:06:32 UTC
*** Bug 804999 has been marked as a duplicate of this bug. ***
Comment 21 Rick Farina (Zero_Chaos) gentoo-dev 2023-08-24 01:57:38 UTC
My last forked version of this ebuild is 5.15.7, so I'm going to assume the fix was backported by upstream because I've not hit the issue since 5.15.7