tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bad package build of gcc10
On Wed, Oct 30, 2024 at 09:26:07AM +0000, Jonathan Perkin wrote:
> * On 2024-10-18 at 23:40 BST, Greg Troxel wrote:
>
> > Rooting around destdir, I found a file that references quadmath:
> >
> > $ objdump -x work/.destdir/usr/pkg/gcc10/lib/libgfortran.so.5.0|egrep NEED\|RPATH
> > NEEDED libquadmath.so.0
> > NEEDED libm.so.0
> > NEEDED libgcc_s.so.1
> > NEEDED libc.so.12
> > RPATH /usr/pkg/gcc10//lib/.:/usr/pkg/gcc10/lib/.:/usr/pkg/gcc10/lib:/usr/pkg/lib
> > VERNEED 0x0000000000017a98
> > VERNEEDNUM 0x0000000000000002
> >
> > and that seems to be the issue: //lib/. instead of /lib, leading to a
> > REQUIRES that should have been a match to the PROVIDES and hence
> > omittted. Basically, the checking code is not using the same resolution
> > rules that the dynamic linker does.
>
> I think what doesn't help is that people have been cargo-culting around GCC
> patches without understanding what they do. It's one of the reasons I no
> longer use these packages.
>
> At some point between gcc9 and gcc10, a very important part of
> patch-gcc_Makefile.in got corrupted, and it's been copied in its broken form
> ever since:
>
> gcc6/patches/patch-gcc_Makefile.in:+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(prefix)/@GCC_TARGET_MACHINE@/lib/%M $(LINKER_RPATH_FLAG)$(libdir)/%M \"" \
> gcc7/patches/patch-gcc_Makefile.in:+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(prefix)/@MACHINE_GNU_PLATFORM@/lib/%M $(LINKER_RPATH_FLAG)$(libdir)/%M \"" \
> gcc8/patches/patch-gcc_Makefile.in:+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(prefix)/@MACHINE_GNU_PLATFORM@/lib/%M $(LINKER_RPATH_FLAG)$(libdir)/%M \"" \
> gcc9/patches/patch-gcc_Makefile.in:+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(prefix)/@MACHINE_GNU_PLATFORM@/lib/%M $(LINKER_RPATH_FLAG)$(libdir)/%M \"" \
> gcc10-aux/patches/patch-gcc_Makefile.in:+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG) $(prefix)//lib/%M $(LINKER_RPATH_FLAG) $(libdir)/%M \"" \
> gcc10/patches/patch-gcc_Makefile.in:+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG) $(prefix)//lib/%M $(LINKER_RPATH_FLAG) $(libdir)/%M \"" \
> gcc12/patches/patch-gcc_Makefile.in:+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG) $(prefix)//lib/%M $(LINKER_RPATH_FLAG) $(libdir)/%M \"" \
> gcc13-gnat/patches/patch-gcc_Makefile.in:+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG) $(prefix)//lib/%M $(LINKER_RPATH_FLAG) $(libdir)/%M \"" \
> gcc13/patches/patch-gcc_Makefile.in:+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG) $(prefix)//lib/%M $(LINKER_RPATH_FLAG) $(libdir)/%M \"" \
> gcc14/patches/patch-gcc_Makefile.in:+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG) $(prefix)//lib/%M $(LINKER_RPATH_FLAG) $(libdir)/%M \"" \
>
> Note that the @MACHINE_GNU_PLATFORM@ substitution is no longer there, which
> probably explains your "//" problem, and likely is the cause of other
> issues.
Thanks. The attached patch improves the rpath issue AFAICT, but the
REQUIRES problem is still there.
# readelf -a gcc10/x86_64--netbsd/lib/libgomp.so
...
0x000000000000000f (RPATH) Library rpath: [/usr/pkg/gcc10/x86_64--netbsd/lib/.:/usr/pkg/gcc10/lib/.:/usr/pkg/lib]
...
Thomas
Index: gcc10/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/gcc10/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- gcc10/Makefile 1 Apr 2024 18:08:48 -0000 1.25
+++ gcc10/Makefile 30 Oct 2024 11:45:27 -0000
@@ -4,7 +4,7 @@
## When bumping the PKGREVISION of this package the PKGREVISION of
## lang/gcc10-libs needs to be bumped to be at least 1 more than the
## PKGREVISION of this package!
-PKGREVISION= 2
+PKGREVISION= 3
COMMENT= The GNU Compiler Collection (GCC) - 10.0 Release Series
@@ -50,6 +50,12 @@
CONFIGURE_ARGS+= --enable-libssp
.endif
+SUBST_CLASSES+= vars
+SUBST_MESSAGE.vars= Setting target machine name path in ${SUBST_FILES.vars}
+SUBST_STAGE.vars= pre-configure
+SUBST_FILES.vars= gcc/Makefile.in
+SUBST_VARS.vars= MACHINE_GNU_PLATFORM
+
CONFIGURE_ENV.QNX+= ACCEPT_INFERIOR_RM_PROGRAM=yes
# Make invokes further configure scripts
MAKE_ENV.QNX+= ACCEPT_INFERIOR_RM_PROGRAM=yes
Index: gcc10/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/gcc10/distinfo,v
retrieving revision 1.18
diff -u -r1.18 distinfo
--- gcc10/distinfo 1 Apr 2024 18:08:48 -0000 1.18
+++ gcc10/distinfo 30 Oct 2024 11:45:27 -0000
@@ -8,7 +8,7 @@
Size (isl-0.16.1.tar.bz2) = 1626446 bytes
SHA1 (patch-contrib_download__prerequisites) = 9cdcde21ab174052911447d20762ddfd40aa8791
SHA1 (patch-fixincludes_inclhack.def) = 7b00974d3f52a8364190a607f52a5d7e8a6db41a
-SHA1 (patch-gcc_Makefile.in) = a47571d8340702d1a86d0dfb7df654280c6a6ee6
+SHA1 (patch-gcc_Makefile.in) = 9aa73d2234b1c9c63ea0f6d431ace82f666b82c6
SHA1 (patch-gcc_config.gcc) = 4767d5b16794f4485879ed10e172cb2f86bc0777
SHA1 (patch-gcc_config.host) = 8920ce841f6088b365c9b590e3ea9535bd880b40
SHA1 (patch-gcc_config_aarch64_aarch64-builtins.c) = 87185f5c2e2dbe4195cb19fe6213d2d616d5519b
Index: gcc10/patches/patch-gcc_Makefile.in
===================================================================
RCS file: /cvsroot/pkgsrc/lang/gcc10/patches/patch-gcc_Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 patch-gcc_Makefile.in
--- gcc10/patches/patch-gcc_Makefile.in 1 Apr 2024 14:33:57 -0000 1.2
+++ gcc10/patches/patch-gcc_Makefile.in 30 Oct 2024 11:45:27 -0000
@@ -11,7 +11,7 @@
# Language-independent files.
DRIVER_DEFINES = \
-+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG) $(prefix)//lib/%M $(LINKER_RPATH_FLAG) $(libdir)/%M \"" \
++ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(prefix)/@MACHINE_GNU_PLATFORM@/lib/%M $(LINKER_RPATH_FLAG)$(libdir)/%M \"" \
-DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
-DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
-DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \
Index: gcc10-libs/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/gcc10-libs/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- gcc10-libs/Makefile 1 Apr 2024 18:08:48 -0000 1.9
+++ gcc10-libs/Makefile 30 Oct 2024 11:45:27 -0000
@@ -9,7 +9,7 @@
## The PKGREVISION of this package needs to be at least 1 more than the
## PKGREVISION of the lang/gcc10 package so that with the dependence pattern
## '{gcc10,gcc10-libs}>=10.2.*' pkg_add will choose gcc10-libs over gcc10.
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= lang
MASTER_SITES= # empty
Home |
Main Index |
Thread Index |
Old Index