Opened 3 years ago

Closed 3 years ago

#63018 closed defect (fixed)

libgcc9 doesn't install any files on 10.7.5, so destroot fails

Reported by: YesNo801 Owned by: ken-cunningham-webuse
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Lion Cc: cjones051073 (Chris Jones)
Port: libgcc9

Description

Failed to build libgcc9 on Mac OS X 10.7.5

libgcc9 @9.4.0_0

Mac OS X 10.7.5 (darwin/11.4.2) arch i386 MacPorts 2.7.1 Xcode 4.6.3 SDK 10.7

Attachments (2)

main.log.zip (1.6 MB) - added by YesNo801 3 years ago.
libgcc9 build log
main.log.2.zip (2.1 MB) - added by rmottola (Riccardo) 3 years ago.
Riccardo's build log

Change History (17)

Changed 3 years ago by YesNo801

Attachment: main.log.zip added

libgcc9 build log

comment:1 Changed 3 years ago by kencu (Ken)

It looks like the build script is trying to "nm" some binary that doesn't actually exist:

:info:build /opt/local/bin/nm -P .libs/compatibility.o .libs/compatibility-debug_list.o .libs/compatibility-debug_list-2.o .libs/compatibility-c++0x.o .libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o .libs/compatibility-condvar.o ../libsupc++/.libs/libsupc++convenience.a ../src/c++98/.libs/libc++98convenience.a ../src/c++11/.libs/libc++11convenience.a ../src/c++17/.libs/libc++17convenience.a|Can't exec "c++filt": No such file or directory at /opt/local/lib/perl5/5.28/IPC/Open3.pm line 281.
:info:build open2: exec of c++filt -_ failed: No such file or directory at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc9/libgcc9/work/gcc-9.4.0/libstdc++-v3/scripts/make_exports.pl line 95.
:info:build warning: /opt/local/bin/nm: no name list
:info:build warning: /opt/local/bin/nm: no name list
:info:build make[6]: *** [libstdc++-symbols.explist] Error 1

comment:2 Changed 3 years ago by kencu (Ken)

upstream tested and verified the build of gcc9 on all systems from 10.4 PPC up, so I'm not exactly certain what is causing this at present.

It could be us -- our modifications to cctools to use a newer clang as the assembler has inserted some Heisenbugs into the build of gcc (it won't build i386 due to this, for example).

comment:3 Changed 3 years ago by YesNo801

I tried to buid with "sudo port install libgcc9 configure.compiler=macports-clang-7.0" but I got the same error: ... info:build libstdc++-symbols.ver \ :info:build .libs/compatibility.o .libs/compatibility-debug_list.o .libs/compatibility-debug_list-2.o .libs/compatibility-c++0x.o .libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o .libs/compatibility-condvar.o \ :info:build `echo ../libsupc++/libsupc++convenience.la ../src/c++98/libc++98convenience.la ../src/c++11/libc++11convenience.la ../src/c++17/libc++17convenience.la | \ :info:build sed 's,/\([/.]*\)\.la,/.libs/\1.a,g'` \

:info:build > libstdc++-symbols.explist
(rm -f libstdc++-symbols.explist ; exit 1)

:info:build /opt/local/bin/nm -P .libs/compatibility.o .libs/compatibility-debug_list.o .libs/compatibility-debug_list-2.o .libs/compatibility-c++0x.o .libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o .libs/compatibility-condvar.o ../libsupc++/.libs/libsupc++convenience.a ../src/c++98/.libs/libc++98convenience.a ../src/c++11/.libs/libc++11convenience.a ../src/c++17/.libs/libc++17convenience.a|Can't exec "c++filt": No such file or directory at /opt/local/lib/perl5/5.28/IPC/Open3.pm line 281. :info:build open2: exec of c++filt -_ failed: No such file or directory at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc9/libgcc9/work/gcc-9.4.0/libstdc++-v3/scripts/make_exports.pl line 95. :info:build warning: /opt/local/bin/nm: no name list :info:build warning: /opt/local/bin/nm: no name list :info:build make[6]: * [libstdc++-symbols.explist] Error 1 ...

comment:4 Changed 3 years ago by rmottola (Riccardo)

I am suffering the same issue I fear, attached my Log. The nm appear to be only warnings though, nothing fatal - I cannot find the fatal error in the log.

Perhaps we are using the wrong nm version as already happened for other port?

Changed 3 years ago by rmottola (Riccardo)

Attachment: main.log.2.zip added

Riccardo's build log

comment:5 Changed 3 years ago by kencu (Ken)

Riccardo, can you try with parallel build turned off?

gcc is touchy to races sometimes.

comment:6 Changed 3 years ago by RobK88

I can build libgcc9 on my Mac running 10.7.5. But I cannot copy the files into destroot. See https://trac.macports.org/ticket/63016

comment:7 Changed 3 years ago by kencu (Ken)

Ok, so I just built libgcc9 on my 10.7.5 system without any trouble. During the destroot phase, all the files are copied into the destroot just as you would expect them to be, it appears. But then somehow they are all deleted again (by the Portfile, I presume) and so in the end nothing is left in the destroot folder, and ergo the error here.

So the question is -- why is everything being deleted from the destroot folder? I have a feeling I might know ... perhaps nothing from libgcc9 is actually needed?

comment:8 Changed 3 years ago by kencu (Ken)

Yeah, that's it. At least on 10.7.5, everything is deleted from the destroot by the portfile. You can prove this by leaving a little turd behind in the libdir, by adding this to the gcc9 Portfile:

    post-destroot {

        # Create temporary lib dir
        file mkdir ${destroot}${prefix}/lib/libgcc.merged
+         system "echo ${subport} leaves a turd behind > ${destroot}${prefix}/lib/libgcc.merged/README"

        # Loop over the specific libs provided by this port
        foreach dylib ${install_dylibs} {

which then installs libgcc9:

$ port -v installed libgcc9
The following ports are currently installed:
  libgcc9 @9.4.0_0 (active) requested_variants='' platform='darwin 11' archs='x86_64' date='2021-06-10T00:21:17-0700'

and leaves behind our turd:

$ port contents libgcc9
Port libgcc9 contains:
  /opt/local/lib/libgcc/README

and then no doubt gcc9 will install without issues if we want it to. That'll be next.

The question is -- what is libgcc9 installing on 10.8 through 11.0? Why is 10.7 different?

comment:9 Changed 3 years ago by kencu (Ken)

Cc: cjones051073 added
Keywords: Lion added; libgcc9 removed
Summary: Failed to build libgcc9 on Mac OS X 10.7.5libgcc9 doesn't install any files on 10.7.5, so destroot fails

Chris -- libgcc9 doesn't seem to install anything on 10.7.5, so the destroot is empty and fails.

At this moment I don't know why it doesn't have any libs to install on 10.7.5, but apparently does on 10.8+...

comment:10 Changed 3 years ago by kencu (Ken)

I presume this lib doesn't build on 10.7.5, but does on newer systems:

  /opt/local/lib/libgcc/libasan.5.dylib

as this is the only thing installed by libgcc9...

comment:11 Changed 3 years ago by kencu (Ken)

I did not see the nm error when building this, btw.

So the initial issue with nm may or may not be still an issue.....

comment:12 Changed 3 years ago by kencu (Ken)

I think there was probably a typo in this commit, and asan was accidentally disabled in x86_64 darwin11 (but left on for i386)

https://github.com/gcc-mirror/gcc/commit/1a3f2d7898ea1369ac110eb8cf2331836a89ab90

let me try turning it back on

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:13 Changed 3 years ago by kencu (Ken)

OTOH, this commit seems pretty clear that the real intention is to enable asan on 10.8+, at least on trunk:

https://github.com/gcc-mirror/gcc/commit/63cc547f6d85819192afa795e9ade14f0800eda9#diff-8a01802253af36ba3056ca6162877b247f73a30a77c69c09f7074829c7176a24

comment:14 Changed 3 years ago by kencu (Ken)

Once you sort out how MacPorts is handling libgcc9, then gcc9 itself installs without any trouble on 10.7.5:

$ port -v installed gcc9
The following ports are currently installed:
  gcc9 @9.4.0_0 (active) requested_variants='' platform='darwin 11' archs='x86_64' date='2021-06-10T05:09:41-0700'

again, I don't see any "nm" errors in this build.

comment:15 Changed 3 years ago by ken-cunningham-webuse

Owner: set to ken-cunningham-webuse
Resolution: fixed
Status: newclosed

In 10bdaa73a75a5d5a0c591a839c0258505d031d29/macports-ports (master):

libgcc9: stub port on < darwin12

libgcc9 supplies libasan.5.dylib only on darwin12+
closes: #63018
closes: #63016

Note: See TracTickets for help on using tickets.