#919812 hotspot: FTBFS on hppa - undefined reference

Package:
src:hotspot
Source:
hotspot
Submitter:
John David Anglin
Date:
2026-07-08 11:57:01 UTC
Severity:
normal
Tags:
#919812#5
Date:
2019-01-19 20:26:08 UTC
From:
To:
Dear Maintainer,

The hotspot build fails on hppa and some other targets:

cd /<<PKGBUILDDIR>>/obj-hppa-linux-gnu/3rdparty && /usr/bin/cmake -E cmake_link_script CMakeFiles/hotspot-perfparser.dir/link.txt --verbose=1
/usr/bin/c++  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -Wl,--as-needed -rdynamic CMakeFiles/hotspot-perfparser.dir/perfparser/app/main.cpp.o CMakeFiles/hotspot-perfparser.dir/perfparser/app/perfattributes.cpp.o CMakeFiles/hotspot-perfparser.dir/perfparser/app/perfheader.cpp.o CMakeFiles/hotspot-perfparser.dir/perfparser/app/perffilesection.cpp.o CMakeFiles/hotspot-perfparser.dir/perfparser/app/perffeatures.cpp.o CMakeFiles/hotspot-perfparser.dir/perfparser/app/perfdata.cpp.o CMakeFiles/hotspot-perfparser.dir/perfparser/app/perfunwind.cpp.o CMakeFiles/hotspot-perfparser.dir/perfparser/app/perfregisterinfo.cpp.o CMakeFiles/hotspot-perfparser.dir/perfparser/app/perfstdin.cpp.o CMakeFiles/hotspot-perfparser.dir/perfparser/app/perfsymboltable.cpp.o CMakeFiles/hotspot-perfparser.dir/perfparser/app/perfelfmap.cpp.o CMakeFiles/hotspot-perfparser.dir/perfparser/app/perfkallsyms.cpp.o CMakeFiles/hotspot-perfparser.dir/perfparser/app/perfaddresscache.cpp.o CMakeFiles/hotspot-perfparser.dir/perfparser/app/perftracingdata.cpp.o CMakeFiles/hotspot-perfparser.dir/hotspot-perfparser_autogen/mocs_compilation.cpp.o  -o ../lib/hppa-linux-gnu/libexec/hotspot-perfparser /usr/lib/hppa-linux-gnu/libQt5Network.so.5.11.3 -ldw -lelf /usr/lib/hppa-linux-gnu/libQt5Core.so.5.11.3
/usr/bin/ld: CMakeFiles/hotspot-perfparser.dir/perfparser/app/perfunwind.cpp.o: in function `QDataStream::Version qToLittleEndian<QDataStream::Version>(QDataStream::Version)':
/usr/include/hppa-linux-gnu/qt5/QtCore/qendian.h:168: undefined reference to `QDataStream::Version qbswap<QDataStream::Version>(QDataStream::Version)'
collect2: error: ld returned 1 exit status
make[3]: *** [3rdparty/CMakeFiles/hotspot-perfparser.dir/build.make:299: lib/hppa-linux-gnu/libexec/hotspot-perfparser] Error 1

Probably, the problem is in Qtcore.

Full log is here:
https://buildd.debian.org/status/fetch.php?pkg=hotspot&arch=hppa&ver=1.1.0%2Bgit20180816-2&stamp=1547623527&raw=0

Regards,
Dave Anglin

#919812#14
Date:
2019-03-15 21:00:01 UTC
From:
To:
Hi John!

I think it is a bug in either hotspot or in the compiler.

Anyway, I think it should be easy to fix it in hotspot. It currently has
this line in src/corelib/serialization/qdatastream.h:

  qint32 dataStreamVersion = qToLittleEndian(QDataStream::Qt_DefaultCompiledVersion);

Explicitly casting QDataStream::Qt_DefaultCompiledVersion to an integer type
should make GCC find the right implementation. Try this:

  qint32 dataStreamVersion = qToLittleEndian(static_cast<qint32>(QDataStream::Qt_DefaultCompiledVersion));

#919812#19
Date:
2019-03-15 23:58:43 UTC
From:
To:
Thanks,
Dave