tech-pkg archive

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

Re: lang/gcc10 does not compile with Darwin 20.5.0 + Xcode 11.4





On 6/18/21 10:40 AM, Adam wrote:
I read through that too and thought it really meant —with-dwarf2 as well.

However, we use that option for older versions of Darwin:

.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
CONFIGURE_ARGS+=	--with-dwarf2
.endif

This is Darwin 20.2.0, so I don’t think that matches.

In any case, the discussion of including differing debug information seems more plausible, although I have not had a chance to check and I don’t know the implications of that.  For reference, here is what the gcc docs [1] say about that option:

‘bootstrap-debug’
Verifies that the compiler generates the same executable code, whether or not it is asked to emit debug information. To this end, this option builds stage2 host programs without debug information, and uses contrib/compare-debug to compare them with the stripped stage3 object files. If BOOT_CFLAGS is overridden so as to not enable debug information, stage2 will have it, and stage3 won’t. This option is enabled by default when GCC bootstrapping is enabled, if strip can turn object files compiled with and without debug info into identical object files. In addition to better test coverage, this option makes default bootstraps faster and leaner.

Perhaps someone who knows this better than I will chime in.

Thanks.

Cheers,
Brook

I have added these to Makefile

CONFIGURE_ARGS+=	--disable-bootstrap
CONFIGURE_ARGS+=	--with-build-config=bootstrap-O1

and GCC builds turbo fast (one stage, I guess) without complaining.

Cheers,
Adam


I got a successful install by disabling the stage 2-3 comparison in the generated Makefile and it seems to work, but it's a matter of how much we trust the build to produce correct output with these checks disabled.

I think it's not as critical to Darwin pkgsrc users as it is to Linux users who use GCC for everything, but it would be better to understand why the stage comparison is failing in any case.

My build just finished and showed that enabling --with-dwarf2 alone is not enough, so I guess we'll have

-.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
+# Avert stage 2 & 3 compare errors
+.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) || !empty(MACHINE_PLATFORM:MDarwin-20.*-*)
 CONFIGURE_ARGS+=	--with-dwarf2
 .endif

Darwin abalone.acadix bacon ~/Pkgsrc/pkgsrc/lang/gcc10 82: (pkgsrc): grep dwarf work/build/config.log $ ../gcc-10.3.0/configure --disable-libstdcxx-pch --disable-nls --enable-__cxa_atexit --with-gxx-include-dir=/Users/bacon/Pkgsrc/pkg/gcc10/include/c++/ --enable-libssp --enable-languages=c obj-c++ objc fortran c++ --enable-shared --enable-long-long --with-local-prefix=/Users/bacon/Pkgsrc/pkg/gcc10 --enable-threads=posix --with-boot-ldflags=-static-libstdc++ -static-libgcc -L/Users/bacon/Pkgsrc/pkg/lib --with-system-zlib --without-zstd --with-dwarf2 --disable-multilib --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --prefix=/Users/bacon/Pkgsrc/pkg/gcc10 --build=x86_64-apple-darwin20 --host=x86_64-apple-darwin20 --infodir=/Users/bacon/Pkgsrc/pkg/gcc10/info --mandir=/Users/bacon/Pkgsrc/pkg/gcc10/man

The "strip" command doesn't seem to work on Darwin, so I'm still not clear on how to confirm that the differences are just debug info.

Darwin abalone.acadix bacon ~/Pkgsrc/pkgsrc/lang/gcc10 80: (pkgsrc): find work/ -name yn.o -ls 22512786 56 -rw-r--r-- 1 bacon staff 27156 Jun 18 08:40 work//build/stage1-mpfr/src/yn.o 22572858 56 -rw-r--r-- 1 bacon staff 28060 Jun 18 10:41 work//build/stage3-mpfr/src/yn.o 22543202 24 -rw-r--r-- 1 bacon staff 12148 Jun 18 09:24 work//build/stage2-mpfr/src/yn.o



Home | Main Index | Thread Index | Old Index