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 Fri 06 Oct 2023 at 06:22:03 -0700, Jason Bacon wrote:
> On 10/6/23 03:51, Niclas Rosenvik wrote:
> > 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

I seem to have managed to build qt6-base by indeed adding the option
PKG_OPTIONS.gcc12 += always-libgcc. I see some issues with this, though.

gcc_s.so is part of gcc12-12.3.0.tgz, not of gcc12-libs-12.3.0nb1.tgz.
So all packages that need gcc_s.so will now depend on gcc12, not on
gcc12-libs. The result is that if you uninstall the compiler, several
packages will no longer run. That is very very bad.

Clearly, gcc_s.so should be part of gcc12-libs. But conversely, this
contains too much. If I understand this right, libcc1plugin.so.0.0,
libcp1plugin.so.0.0 and libcc1.so.0.0 are not runtime libraries, but
part of the compiler. They are also part of gcc12, somehow, without
causing a conflict? I'm not sure how that works. 

But gcc_s.so is not part of gcc12-libs, and I think it should...

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert                            <rhialto/at/falu.nl>
\X/ There is no AI. There is just someone else's work.           --I. Rose

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index