Opened 2 years ago

Closed 5 weeks ago

#64922 closed defect (fixed)

gcc10-bootstrap @10.3.0_4 failed at destroot on Leopard

Reported by: barracuda156 Owned by: catap (Kirill A. Korinsky)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: powerpc, leopard, ppc64 Cc: cooljeanius (Eric Gallager)
Port: gcc10-bootstrap

Description

Command failed: /usr/bin/cmp -s "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libatomic.1.dylib" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libatomic.1.dylib" && /bin/cp -v "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libatomic.1.dylib" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-powerpc//opt/local/libexec/gcc10-bootstrap/lib"
Exit code: 1
Command failed: /usr/bin/cmp -s "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libatomic.a" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libatomic.a" && /bin/cp -v "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libatomic.a" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-powerpc//opt/local/libexec/gcc10-bootstrap/lib"
Exit code: 1
/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libatomic.la -> /opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-powerpc//opt/local/libexec/gcc10-bootstrap/lib/libatomic.la
Command failed: /usr/bin/cmp -s "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libcc1.0.so" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libcc1.0.so" && /bin/cp -v "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libcc1.0.so" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-powerpc//opt/local/libexec/gcc10-bootstrap/lib"
Exit code: 1
Command failed: /usr/bin/cmp -s "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libcc1.la" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libcc1.la" && /bin/cp -v "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libcc1.la" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-powerpc//opt/local/libexec/gcc10-bootstrap/lib"
Exit code: 1
/usr/bin/lipo: can't figure out the architecture type of: /opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libcc1.la
Command failed: /usr/bin/lipo -create "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libcc1.la" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libcc1.la" -output "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-powerpc//opt/local/libexec/gcc10-bootstrap/lib/libcc1.la"
Exit code: 1
/usr/bin/libtool: file: /opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libcc1.la is not an object file (not allowed in a library)
/usr/bin/libtool: file: /opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libcc1.la is not an object file (not allowed in a library)
Command failed: /usr/bin/libtool "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libcc1.la" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libcc1.la" -o "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-powerpc//opt/local/libexec/gcc10-bootstrap/lib/libcc1.la"
Exit code: 1
Command failed: /usr/bin/cmp -s "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib" && /bin/cp -v "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-powerpc//opt/local/libexec/gcc10-bootstrap/lib"
Exit code: 1
/usr/bin/lipo: /opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib and /opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib have the same architectures (ppc) and can't be in the same fat output file
Command failed: /usr/bin/lipo -create "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib" -output "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-powerpc//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib"
Exit code: 1
/usr/bin/libtool: file: /opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib is a dynamic library, not added to the static library
/usr/bin/libtool: file: /opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib is a dynamic library, not added to the static library
/usr/bin/libtool: file: /opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib is a dynamic library, not added to the static library
/usr/bin/libtool: file: /opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib is a dynamic library, not added to the static library
/usr/bin/libtool: no library created (no object files in input files)
Command failed: /usr/bin/libtool "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib" -o "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-powerpc//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib"
Exit code: 1
Command failed: test "`head -c2 /opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib`" = '#!'
Exit code: 1
Command failed: /usr/bin/diff -dw --old-group-format='#ifndef __LP64__
%<#endif
'  --new-group-format='#ifdef __LP64__
%>#endif
'  --unchanged-group-format='%='  --changed-group-format='#ifndef __LP64__
%<#else
%>#endif
' "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib" "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib" > "/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-powerpc//opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib"; test $? -le 1
Exit code: 1
Error: Failed to destroot gcc10-bootstrap: /opt/local/libexec/gcc10-bootstrap/lib/libgcc_ehs.1.1.dylib differs in /opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc and /opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/work/destroot-ppc64 and cannot be merged
Error: See /opt/local/var/macports/logs/_opt_PPCLeopardPorts_lang_gcc10-bootstrap/gcc10-bootstrap/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there
is a bug.

I have successfully built it earlier version though before:

36-109:~ svacchanda$ port -v installed gcc10-bootstrap
The following ports are currently installed:
  gcc10-bootstrap @10.3.0_0+universal (active) requested_variants='+universal' platform='darwin 9' archs='ppc ppc64' date='2022-02-17T06:36:40+0800'

Attachments (2)

main.log.zip (1.6 MB) - added by barracuda156 2 years ago.
main_icu_fails_with_gcc10bootstrap_muniversal.log (714.8 KB) - added by barracuda156 2 years ago.
Failure of gcc10-bootstrap built with muniversal instead of multilib

Change History (35)

Changed 2 years ago by barracuda156

Attachment: main.log.zip added

comment:1 Changed 2 years ago by Gcenx

I’d explained this problem already, a quick fix is removing the following from the Portfile

    configure.args-replace \
                     --disable-multilib \
                     --enable-multilib

    configure.args-replace \
                     --disable-multiarch \
                     --enable-multiarch

A more correct fix to this would be swapping around the configuration of those flags so none universal builds default to enabled and gets disabled in universal builds, but as all builds are considered universal currently that would also need to be resolved.

comment:2 in reply to:  1 ; Changed 2 years ago by barracuda156

Replying to Gcenx:

I’d explained this problem already, a quick fix is removing the following from the Portfile

    configure.args-replace \
                     --disable-multilib \
                     --enable-multilib

    configure.args-replace \
                     --disable-multiarch \
                     --enable-multiarch

A more correct fix to this would be swapping around the configuration of those flags so none universal builds default to enabled and gets disabled in universal builds, but as all builds are considered universal currently that would also need to be resolved.

If these flags are removed, the port gonna build for 1 arch, is it right? I want to build it as universal (ppc+ppc64), and it was building as such in an earlier version.

comment:3 in reply to:  2 ; Changed 2 years ago by Gcenx

Replying to barracuda156:

If these flags are removed, the port gonna build for 1 arch, is it right? I want to build it as universal (ppc+ppc64), and it was building as such in an earlier version.

Yes but that’s what you want when making a target compiler, when building as +universal (the default) you want only a single arch as destroot will lipo everything together resulting in your universal binary.

comment:4 in reply to:  3 Changed 2 years ago by barracuda156

Replying to Gcenx:

Replying to barracuda156:

If these flags are removed, the port gonna build for 1 arch, is it right? I want to build it as universal (ppc+ppc64), and it was building as such in an earlier version.

Yes but that’s what you want when making a target compiler, when building as +universal (the default) you want only a single arch as destroot will lipo everything together resulting in your universal binary.

Thank you, awesome, it worked! I noticed that my earlier +universal build was fake, actual binaries were ppc-only. And same goes for gcc7. This time binaries are ppc+ppc64.

Shouldn't this perhaps be fixed, and not just in gcc10-bootstrap Portfile, but for other gccs? It's a multi-hour endeavor even on G5 Quad, I guess it makes sense to save others' time.

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

not an ideal fix either, and Iain advises against this, but I know how we got here in this particular wacky situation.

gcc is partially broken like this…the x86_64 gcc is unable to compile i386, for example, which it can and should and would be expected to do.

If this spread to the general gcc ports, hundreds of universal builds would break and have to be redone.

So this should not be done in the general gcc ports, and ideally would not be needed here. gcc should be built multilib enabled, but if using the muniversal portgroup to allow an i386/x86_64 gcc itself, only one of the libsets included (the other deleted prior to merging to avoid the confluct).

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

comment:6 in reply to:  5 Changed 2 years ago by barracuda156

Replying to kencu:

not an ideal fix either, and Iain advises against this, but I know how we got here in this particular wacky situation. gcc should be built multilib enabled

For whatever reason --enable-multilib doesn't work for gcc in Macports. But you mentioned that earlier too, I recall. What is the difference in terms of resulting binaries though – in cases of multilib vs no multilib, but muniversal? (And I rather rebuild ports early that later, personally: fewer ports to rebuild.)

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

of course it does work. We have been using it for many years, and we use it today.

It doesn’t work in this gcc10-bootstrap scenario yet, because of the way we are trying to use the muniversal portgroup.

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

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

you have to do something else normal with macports to get a full appreciation for what goes on.

Have a machine running Intel doing this too somewhere.

99.999% of people do not use ppc, and of those who do, nobody tries to build ppc/ppc64 except for about two people.

So while tweaks for you are OK, we can’t mess up everything else in the process….

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

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

more specifically, multilib is enabled by default when building gcc on darwin.

on the non-universal build of gcc on macports, multilib is disabled.

for the universal build of gcc on macports that configure arg to disable multilib is removed, and so the default behavior with multilib enabled is allowed:

https://github.com/macports/macports-ports/blob/2eddbe49ba5105058d84617cc217e49062ee2ed9/lang/gcc7/Portfile#L378

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

the other flag, multiarch, has no meaning on darwin, and has never done anything on darwin.

not sure how that got added into this mix, but just dump that as it adds needless confusion.

comment:11 in reply to:  10 ; Changed 2 years ago by barracuda156

Replying to kencu:

the other flag, multiarch, has no meaning on darwin, and has never done anything on darwin.

not sure how that got added into this mix, but just dump that as it adds needless confusion.

Important update: gcc10-bootstrap built with muniversal (and with removed flags as suggested above) is essentially broken. While an earlier build ("fake universal") builds icu successfully as +universal, new version ("true universal") FAILS to do the same with the whole list of wrong symbols. Another 7 hrs wasted, heh.

Changed 2 years ago by barracuda156

Failure of gcc10-bootstrap built with muniversal instead of multilib

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

getting this right will require someone sitting down with it and working out all the kinks, and then posting up a finished, fixed, product.

It is hard to fix it using buildbots and tickets as the build/test/debug method.

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

comment:13 in reply to:  12 Changed 2 years ago by barracuda156

Replying to kencu:

getting this right will require someone sitting down with it and working out all the kinks, and then posting up a finished, fixed, product.

It is hard to fix it using buildbots and tickets as the build/test/debug method.

Fair enough. I rather left this as a warning to others who may consider following this procedure.

comment:14 in reply to:  11 ; Changed 2 years ago by Gcenx

Replying to barracuda156:

Important update: gcc10-bootstrap built with muniversal (and with removed flags as suggested above) is essentially broken. While an earlier build ("fake universal") builds icu successfully as +universal, new version ("true universal") FAILS to do the same with the whole list of wrong symbols. Another 7 hrs wasted, heh.

This sounds to me like you’ve not modified icu accordingly to use the desired target compiler so naturally it would fail to compile.

If you want to directly use the compiled gcc etc binary’s then build for a single arch with multlib/arch enabled instead.

I’ve got this up and running correctly on my Intel system and m1 Mac mini and compiled clang-11-bootstrap as +universal, I’ve checked the arches and yet it actually provided i386|x86_64 on Intel and aarch64|x86_64 on my m1 Mac mini.

Last edited 2 years ago by Gcenx (previous) (diff)

comment:15 Changed 2 years ago by catap (Kirill A. Korinsky)

(sorry guys, haven't got enough time to read all of this and response, in a week or so things should be much better)

Gcenx's fix probably a good idea and the last PR from just fixed an issue inside Portfile which, technically, ignores it.

comment:16 in reply to:  14 ; Changed 2 years ago by barracuda156

Replying to Gcenx:

This sounds to me like you’ve not modified icu accordingly to use the desired target compiler so naturally it would fail to compile. If you want to directly use the compiled gcc etc binary’s then build for a single arch with multlib/arch enabled instead.

Sorry, could you explain a bit?

If I build without muniversal and with --enable-multilib, I get gcc which Macports thinks is universal but it is not, yet it can build universal binaries of other ports. If I build with muniversal and with --disable-multilib, I get gcc which is universal itself, but fails to build universal binaries. If use both muniversal and --enable-multilib, I get destroot failure.

So what is the correct way to build gcc as universal (that is, for gcc binaries to have both ppc and ppc64 archs), which will be able to then build universal ports?

  1. S. Outside of Macports problem is non-existent. Configuring gcc with --enable-multilib gets gcc build as ppc+ppc64. For some reason, the same does not work inside Macports.

comment:17 in reply to:  16 ; Changed 2 years ago by kencu (Ken)

Replying to barracuda156:

If use both muniversal and --enable-multilib, I get destroot failure.

I believe this is the right fix, in the end, but you have to fix the destroot as I described above.

(ie delete one of the built multilib folders prior to merging).

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

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

getting this right will require someone sitting down with it and working out all the kinks, and then posting up a finished, fixed, product.

It is hard to fix it using buildbots and tickets as the build/test/debug method.

comment:19 in reply to:  17 Changed 2 years ago by Gcenx

Replying to kencu:

Replying to barracuda156:

If use both muniversal and --enable-multilib, I get destroot failure.

I believe this is the right fix, in the end, but you have to fix the destroot as I described above.

(ie delete one of the built multilib folders prior to merging).

Having --enable-multilib and setting +universal will result in compiling libgcc for the architecture twice that's rather a waste.


If the resulting build is being treated as a cross-compiler what I've explained will work just fine.

For example; powerpc-apple-${os.platform}${os.major}-gcc for ppc & powerpc64-apple-${os.platform}${os.major}-gcc for ppc64

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

not really a waste, as you have to build libgcc both times anyway :)

problem with your cross-compiler method is it works differently than every other gcc compiler works now, so nobody, eg barracuda here, will understand how the heck to use it. Ergo, more and more and more endless tickets.

OTOH, as a cross-arch compiler, it works.

OTOOH, cross-arch compiling will NEVER work smoothly in MacPorts with gcc until somebody updates driverdriver.c to make it work like clang works, in the existing infrastructure.

SO… it’s all a kludgey mess until that happens.

comment:21 in reply to:  20 Changed 2 years ago by Gcenx

Replying to kencu:

not really a waste, as you have to build libgcc both times anyway :)

Doesn’t multilib end up compiling twice per arch in that case?


problem with your cross-compiler method is it works differently than every other gcc compiler works now, so nobody, eg barracuda here, will understand how the heck to use it. Ergo, more and more and more endless tickets.

As the gcc10-bootstrap provides usage instructions in the notes section wouldn’t this fall under user error?

As this isn’t intended to replace a standard macports compiler it shouldn’t be used as such.


OTOH, as a cross-arch compiler, it works.

If it didn’t I’d have been surprised lol


OTOOH, cross-arch compiling will NEVER work smoothly in MacPorts with gcc until somebody updates driverdriver.c to make it work like clang works, in the existing infrastructure.

SO… it’s all a kludgey mess until that happens.

Unless someone like iains does this I don’t see driverdriver getting fixed up.

However as this is intended to get libcxx working on 10.6 and be used to quickly get to a fully functional macports compiler toolchain should this even matter?, I’d be more included for forgo the muniversal group and simply build for the current architecture.

Last edited 2 years ago by Gcenx (previous) (diff)

comment:22 Changed 2 years ago by catap (Kirill A. Korinsky)

comment:23 Changed 2 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:24 in reply to:  22 Changed 22 months ago by barracuda156

Replying to catap:

This should be closed after https://github.com/macports/macports-ports/commit/b6a329e41618359408e5e76889f20cc9f93e8073

I will check it next month. Away from PPC hardware atm.

comment:25 Changed 21 months ago by catap (Kirill A. Korinsky)

I'd like to confirm that I can just successfully had built gcc10-bootstrap on macOS 10.5 Leopard i386:

macos-leopard:~ catap$ sh -c 'echo "macOS $(sw_vers -productVersion) $(sw_vers -buildVersion) $(uname -m)"; xcode=$(xcodebuild -version 2>/dev/null); if [ $? == 0 ]; then echo "$(e
cho "$xcode" | awk '\''NR==1{x=$0}END{print x" "$NF}'\'')"; else echo "Command Line Tools $(pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | awk '\''/version:/ {print $2}'\''
)"; fi'
macOS 10.5.8 9L34 i386
Xcode 3.1.4 9M2809
macos-leopard:~ catap$ file /opt/local/libexec/gcc10-bootstrap/bin/gcc
/opt/local/libexec/gcc10-bootstrap/bin/gcc: Mach-O universal binary with 2 architectures
/opt/local/libexec/gcc10-bootstrap/bin/gcc (for architecture ppc7400):	Mach-O executable ppc
/opt/local/libexec/gcc10-bootstrap/bin/gcc (for architecture i386):	Mach-O executable i386
macos-leopard:~ catap$ port echo installed | grep gcc10
gcc10-bootstrap                @10.3.0_5+universal 
macos-leopard:~ catap$ 

comment:26 in reply to:  25 ; Changed 21 months ago by barracuda156

Replying to catap:

I'd like to confirm that I can just successfully had built gcc10-bootstrap on macOS 10.5 Leopard i386:

Sounds great. We will also need to test ppc+ppc64.

comment:27 in reply to:  26 ; Changed 21 months ago by catap (Kirill A. Korinsky)

Replying to barracuda156:

Sounds great. We will also need to test ppc+ppc64.

Can you test it and if it works => close the issue? :)

comment:28 in reply to:  27 Changed 21 months ago by barracuda156

Replying to catap:

Replying to barracuda156:

Sounds great. We will also need to test ppc+ppc64.

Can you test it and if it works => close the issue? :)

Will do, sure, but I gonna be back to my PowerMac by the end of month. Will update then.

comment:29 in reply to:  27 Changed 19 months ago by barracuda156

Replying to catap:

Replying to barracuda156:

Sounds great. We will also need to test ppc+ppc64.

Can you test it and if it works => close the issue? :)

Looks like it is still doing something wrong. Look at the flags:

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/build-ppc/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/build-ppc/./gcc/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/bin/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/lib/ -isystem /opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/include -isystem /opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/sys-include   -fno-checking -g -O2 -pipe -arch ppc -m64 -O2  -g -O2 -pipe -arch ppc -DIN_GCC    -W -Wall -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -mmacosx-version-min=10.4 -Wa,-force_cpusubtype_ALL -fno-common -mlong-double-128 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -mmacosx-version-min=10.4 -Wa,-force_cpusubtype_ALL -fno-common -mlong-double-128 -I. -I. -I../../.././gcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/../gcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/../include    -o unwind-dw2-fde-darwin.o -MT unwind-dw2-fde-darwin.o -MD -MP -MF unwind-dw2-fde-darwin.dep -fexceptions -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/config/unwind-dw2-fde-darwin.c -fvisibility=hidden -DHIDE_EXPORTS
xgcc: warning: m64 conflicts with ppc (arch flags ignored)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/build-ppc/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/build-ppc/./gcc/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/bin/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/lib/ -isystem /opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/include -isystem /opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/sys-include   -fno-checking -g -O2 -pipe -arch ppc -m64 -O2  -g -O2 -pipe -arch ppc -DIN_GCC    -W -Wall -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -mmacosx-version-min=10.4 -Wa,-force_cpusubtype_ALL -fno-common -mlong-double-128 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -mmacosx-version-min=10.4 -Wa,-force_cpusubtype_ALL -fno-common -mlong-double-128 -I. -I. -I../../.././gcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/../gcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/../include    -o unwind-c.o -MT unwind-c.o -MD -MP -MF unwind-c.dep -fexceptions -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/unwind-c.c -fvisibility=hidden -DHIDE_EXPORTS
xgcc: warning: m64 conflicts with ppc (arch flags ignored)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/build-ppc/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/build-ppc/./gcc/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/bin/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/lib/ -isystem /opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/include -isystem /opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/sys-include   -fno-checking -g -O2 -pipe -arch ppc -O2  -g -O2 -pipe -arch ppc -DIN_GCC    -W -Wall -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -mmacosx-version-min=10.4 -Wa,-force_cpusubtype_ALL -fno-common -mlong-double-128 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -mmacosx-version-min=10.4 -Wa,-force_cpusubtype_ALL -fno-common -mlong-double-128 -I. -I. -I../.././gcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/../gcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/../include    -o _powisf2.o -MT _powisf2.o -MD -MP -MF _powisf2.dep -DL_powisf2 -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/build-ppc/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/build-ppc/./gcc/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/bin/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/lib/ -isystem /opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/include -isystem /opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin9/sys-include   -fno-checking -g -O2 -pipe -arch ppc -m64 -O2  -g -O2 -pipe -arch ppc -DIN_GCC    -W -Wall -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -mmacosx-version-min=10.4 -Wa,-force_cpusubtype_ALL -fno-common -mlong-double-128 -DEMUTLS_ATTR='__attribute__((__weak__,__visibility__("default")))' -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -mmacosx-version-min=10.4 -Wa,-force_cpusubtype_ALL -fno-common -mlong-double-128 -DEMUTLS_ATTR='__attribute__((__weak__,__visibility__("default")))' -I. -I. -I../../.././gcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/../gcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/../include    -o emutls.o -MT emutls.o -MD -MP -MF emutls.dep -fexceptions -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.3.0/libgcc/emutls.c -fvisibility=hidden -DHIDE_EXPORTS
xgcc: warning: m64 conflicts with ppc (arch flags ignored)

comment:30 Changed 18 months ago by catap (Kirill A. Korinsky)

I really have no idea.

Did build fails? If fails how?

comment:31 Changed 17 months ago by barracuda156

The build on 10.5.8 succeeds and binaries have correct archs. I had not yet had a chance to try compiling with those, but provisionally all is good.

comment:32 Changed 17 months ago by catap (Kirill A. Korinsky)

So, the issue should be close when!

comment:33 Changed 5 weeks ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.