pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Qt6 (x11/qt6-qtbase) fails to build with gcc12 (__extendhfsf2, __truncsfhf2)



On 10/6/23 03:51, Niclas Rosenvik wrote:
On Mon, 2 Oct 2023 21:55:21 +0200
Rhialto <rhialto%falu.nl@localhost> wrote:

On Mon 02 Oct 2023 at 21:26:35 +0200, Rhialto wrote:
So why are they still undefined...

If I manually add "-lgcc" near the end of the very long link command
line in build file
pkgsrc/x11/qt6-qtbase/default/qtbase-everywhere-src-6.5.2/src/corelib/CMakeFiles/Core.dir/link.txt
that link step works ok. But the question remains of course why that
would be needed; it shouldn't.

The problem recurs later when linking lib/libQt6Gui.so.6.5.2.

The lovely long command lines from .work.log for that failed attempt
are below; but the gcc driver should normally add -lgcc by itself,
right?


I managed to get qt6-qtbase to build with gcc12 by building gcc12 with
the option always-libgcc on. pkgsrc gcc deletes libgcc_s.so built by
gcc12 if this is not on. I guess this is so that there won't be two
libgcc_s.so on the system. NetBSD has libgcc_s in /lib and /usr/lib,
but this libgcc_s is missing __extendhfsf2 etc.

/Niclas

We discussed this issue years ago, relating to RHEL6, whose gcc 4.8
compiler was not up-to-snuff for many packages.  I ended up making
auto-pkgsrc-setup insert the following into mk.conf as a workaround
(along with GCC_REQD and many exemptions for gcc deps).

https://github.com/outpaddling/auto-admin/blob/master/User-scripts/auto-pkgsrc-setup

.if (exists(/etc/redhat-release) || exists(/etc/amazon)) &&
!empty(PKGPATH:Mlang/gcc*)

# RHEL systems may have an outdated "as" that cannot translate instructions
# from current GCC code generators, so force pkgsrc binutils.
CONFIGURE_ARGS+=        --with-gnu-as --with-as=\${PREFIX}/bin/gas
CONFIGURE_ARGS+=        --with-gnu-ld --with-ld=\${PREFIX}/bin/gld
BUILDLINK_DEPMETHOD.binutils=   full
.  include "../../devel/binutils/buildlink3.mk"

# pkgsrc gcc packages don't install libgcc_s on some platforms, to
# avoid problems when mixing compiler versions.  This breaks our use
# of pkgsrc gcc on EL.
PKG_DEFAULT_OPTIONS+=   always-libgcc
.endif  # RHEL



Home | Main Index | Thread Index | Old Index