https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122807
Bug ID: 122807
Summary: libgccjit silently fails to compile multiarch (OS X
10.11.6 Macports)
Product: gcc
Version: 15.2.0
Status: UNCONFIRMED
Keywords: build
Severity: normal
Priority: P3
Component: jit
Assignee: dmalcolm at gcc dot gnu.org
Reporter: fmw at actrix dot co.nz
CC: antoyo at gcc dot gnu.org
Target Milestone: ---
Host: OS X 10.11.6
Target: OS X 10.11.6
Build: gcc15 @15.2.0_0+stdlib_flag
The library libgccjit silently fails to compile multiarch (all other gcc
libraries are multiarch [universal]), hence restricting dependencies.
System:- OS X 10.11.6 Macports managed installs.
Because other ports now depend on libgccjit, they cannot be built +universal, &
hence restricting all their subsequent dependencies. My guess is that the
issue is buried within the gcc make process, and for some reason, the multiarch
logic is not being configured for just this libgccjit library. All other
libraries build multiarch. I am guessing it is a gcc matter, however I am not
an expert in the build process. I do not see any code in the macports port
file that treats libgccjit any differently to any of the other gcc15 library
files.
Perhaps this is the cause of some are other less detailed reports of libgccjit
failures I have discovered while searching for duplicates of this bug/software
problem report.
All other gcc libraries are multiarch (2 archs), except libgccjit:-
$ for i in /opt/local/lib/gcc15/*.[0-9]*.dylib ; do file $i | head -1 ; done
/opt/local/lib/gcc15/libatomic.1.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libgcc_s.1.1.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libgcc_s.1.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libgccjit.0.dylib: Mach-O 64-bit dynamically linked
shared library x86_64 <-----
/opt/local/lib/gcc15/libgfortran.5.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libgomp.1.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libitm.1.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libm2cor.20.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libm2iso.20.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libm2log.20.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libm2min.20.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libm2pim.20.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libobjc-gnu.4.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libquadmath.0.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libssp.0.dylib: Mach-O universal binary with 2
architectures
/opt/local/lib/gcc15/libstdc++.6.dylib: Mach-O universal binary with 2
architectures
I can report all recent versions from gcc10 on exhibit this single arch
libgccjit behaviour:-
$ find /opt/local/lib -name 'libgccjit.0.dylib' -exec file {} \;
/opt/local/lib/gcc10/libgccjit.0.dylib: Mach-O 64-bit dynamically linked
shared library x86_64
/opt/local/lib/gcc11/libgccjit.0.dylib: Mach-O 64-bit dynamically linked
shared library x86_64
/opt/local/lib/gcc12/libgccjit.0.dylib: Mach-O 64-bit dynamically linked
shared library x86_64
/opt/local/lib/gcc13/libgccjit.0.dylib: Mach-O 64-bit dynamically linked
shared library x86_64
/opt/local/lib/gcc14/libgccjit.0.dylib: Mach-O 64-bit dynamically linked
shared library x86_64
/opt/local/lib/gcc15/libgccjit.0.dylib: Mach-O 64-bit dynamically linked
shared library x86_64
The install normally builds multiarch libraries (except for libgccjit), even
when the compiler is built single arch. Tested building gcc14 +universal (2
arch i386 & x86_64), to see if this would build libgccjit +universal (2 arch).
It does not - a more significant or surprising failure perhaps (and it is not a
workaround).
$ port installed gcc14
gcc14 @14.2.0_1+stdlib_flag
gcc14 @14.3.0_0+stdlib_flag+universal (active)
$ file /opt/local/lib/gcc14/libgccjit.0.dylib
/opt/local/lib/gcc14/libgccjit.0.dylib: Mach-O 64-bit dynamically linked shared
library x86_64
I attach a Macports logfile of a forced upgrade rebuilding the +universal (i386
x86_64) gcc15 install.
$ sudo port clean gcc15
$ sudo port -kvd upgrade --enforce-variants +universal gcc15
$ zip gcc15+universal.main.log.zip `port logfile gcc15`
It is a full Macports verbose debug logfile!
$ port installed gcc15
The following ports are currently installed:
gcc15 @15.1.0_2+stdlib_flag
gcc15 @15.1.0_3+stdlib_flag
gcc15 @15.2.0_0+stdlib_flag
gcc15 @15.2.0_0+stdlib_flag+universal (active)
$
And I have checked libgccjit.0.dylib and it is still only single arch x86_64,
despite this fresh gcc15 universal build.