[MacPorts] #64204: R: 4.1.2 fails to build on macOS 12.0.1 on M1 mac
MacPorts
noreply at macports.org
Mon May 23 17:31:35 UTC 2022
#64204: R: 4.1.2 fails to build on macOS 12.0.1 on M1 mac
-----------------------+------------------------
Reporter: colmconn | Owner: i0ntempest
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Resolution: | Keywords: arm64
Port: R |
-----------------------+------------------------
Comment (by kencu):
I built Iain's current gcc11 branch on 12.3.1 Intel. It uses @rpaths
exclusively, and it works just fine.
example fortran program compiles with no errors:
{{{
% cat hello.f90
program hello
print *, "Hello World!"
end program
% gfortran-mp-11 hello.f90
}}}
works
{{{
% ./a.out
Hello World!
}}}
has @rpath linkages to gcc libraries as Iain wants and requires:
{{{
% otool -L a.out
a.out:
@rpath/libgfortran.5.dylib (compatibility version 6.0.0, current
version 6.0.0)
@rpath/libgcc_s.1.1.dylib (compatibility version 1.0.0, current
version 1.1.0)
@rpath/libquadmath.0.dylib (compatibility version 1.0.0, current
version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 1311.100.3)
}}}
but automatically adds the needed rpath search path for gcc-built
executables to find the libraries, as Iain said it did:
{{{
% otool -l a.out | grep LC_RPATH -A2
cmd LC_RPATH
cmdsize 32
path @loader_path (offset 12)
--
cmd LC_RPATH
cmdsize 72
path /opt/local/lib/gcc11/gcc/x86_64-apple-darwin21/11.3.0
(offset 12)
--
cmd LC_RPATH
cmdsize 80
path /opt/local/lib/gcc11/gcc/x86_64-apple-
darwin21/11.3.0/../../.. (offset 12)
% ls -la /opt/local/lib/gcc11/gcc/x86_64-apple-darwin21/11.3.0/../../..
total 40776
drwxr-xr-x 46 root admin 1472 23 May 10:19 .
drwxr-xr-x 1438 root wheel 46016 23 May 10:19 ..
drwxr-xr-x 3 root admin 96 23 May 10:19 gcc
lrwxr-xr-x 1 root admin 37 23 May 10:17 libasan.6.dylib ->
/opt/local/lib/libgcc/libasan.6.dylib
lrwxr-xr-x 1 root admin 15 23 May 10:17 libasan.dylib ->
libasan.6.dylib
-rw-r--r-- 1 root admin 5600 23 May 10:17 libasan_preinit.o
lrwxr-xr-x 1 root admin 39 23 May 10:17 libatomic.1.dylib ->
/opt/local/lib/libgcc/libatomic.1.dylib
-rw-r--r-- 1 root admin 253552 23 May 10:17 libatomic.a
lrwxr-xr-x 1 root admin 17 23 May 10:17 libatomic.dylib ->
libatomic.1.dylib
-rwxr-xr-x 1 root admin 155872 23 May 10:17 libcc1.0.so
lrwxr-xr-x 1 root admin 11 23 May 10:17 libcc1.so ->
libcc1.0.so
lrwxr-xr-x 1 root admin 40 23 May 10:17 libgcc_s.1.1.dylib ->
/opt/local/lib/libgcc/libgcc_s.1.1.dylib
lrwxr-xr-x 1 root admin 38 23 May 10:17 libgcc_s.1.dylib ->
/opt/local/lib/libgcc/libgcc_s.1.dylib
-rwxr-xr-x 1 root admin 25405744 23 May 10:17 libgccjit.0.dylib
lrwxr-xr-x 1 root admin 17 23 May 10:17 libgccjit.dylib ->
libgccjit.0.dylib
lrwxr-xr-x 1 root admin 41 23 May 10:17 libgfortran.5.dylib ->
/opt/local/lib/libgcc/libgfortran.5.dylib
-rw-r--r-- 1 root admin 10333568 23 May 10:17 libgfortran.a
lrwxr-xr-x 1 root admin 19 23 May 10:17 libgfortran.dylib ->
libgfortran.5.dylib
-rw-r--r-- 1 root admin 195 23 May 10:17 libgfortran.spec
lrwxr-xr-x 1 root admin 37 23 May 10:17 libgomp.1.dylib ->
/opt/local/lib/libgcc/libgomp.1.dylib
-rw-r--r-- 1 root admin 1497672 23 May 10:17 libgomp.a
lrwxr-xr-x 1 root admin 15 23 May 10:17 libgomp.dylib ->
libgomp.1.dylib
-rw-r--r-- 1 root admin 169 23 May 10:17 libgomp.spec
lrwxr-xr-x 1 root admin 36 23 May 10:17 libitm.1.dylib ->
/opt/local/lib/libgcc/libitm.1.dylib
-rw-r--r-- 1 root admin 1379024 23 May 10:17 libitm.a
lrwxr-xr-x 1 root admin 14 23 May 10:17 libitm.dylib ->
libitm.1.dylib
-rw-r--r-- 1 root admin 162 23 May 10:17 libitm.spec
lrwxr-xr-x 1 root admin 41 23 May 10:17 libobjc-gnu.4.dylib ->
/opt/local/lib/libgcc/libobjc-gnu.4.dylib
-rw-r--r-- 1 root admin 395856 23 May 10:17 libobjc-gnu.a
lrwxr-xr-x 1 root admin 19 23 May 10:17 libobjc-gnu.dylib ->
libobjc-gnu.4.dylib
lrwxr-xr-x 1 root admin 41 23 May 10:17 libquadmath.0.dylib ->
/opt/local/lib/libgcc/libquadmath.0.dylib
-rw-r--r-- 1 root admin 1020704 23 May 10:17 libquadmath.a
lrwxr-xr-x 1 root admin 19 23 May 10:17 libquadmath.dylib ->
libquadmath.0.dylib
-rw-r--r-- 1 root admin 327 23 May 10:17 libsanitizer.spec
lrwxr-xr-x 1 root admin 36 23 May 10:17 libssp.0.dylib ->
/opt/local/lib/libgcc/libssp.0.dylib
-rw-r--r-- 1 root admin 62224 23 May 10:17 libssp.a
lrwxr-xr-x 1 root admin 14 23 May 10:17 libssp.dylib ->
libssp.0.dylib
-rw-r--r-- 1 root admin 2408 23 May 10:17 libssp_nonshared.a
lrwxr-xr-x 1 root admin 39 23 May 10:17 libstdc++.6.dylib ->
/opt/local/lib/libgcc/libstdc++.6.dylib
-rw-r--r-- 1 root admin 2402 23 May 10:17 libstdc++.6.dylib-
gdb.py
-rw-r--r-- 1 root admin 18971840 23 May 10:17 libstdc++.a
lrwxr-xr-x 1 root admin 17 23 May 10:17 libstdc++.dylib ->
libstdc++.6.dylib
-rw-r--r-- 1 root admin 4051736 23 May 10:17 libstdc++fs.a
-rw-r--r-- 1 root admin 858224 23 May 10:17 libsupc++.a
lrwxr-xr-x 1 root admin 38 23 May 10:17 libubsan.1.dylib ->
/opt/local/lib/libgcc/libubsan.1.dylib
lrwxr-xr-x 1 root admin 16 23 May 10:17 libubsan.dylib ->
libubsan.1.dylib
}}}
So IMHO the solution to the @path issue for arm64 (now) for gcc11 would be
to switch gcc11 on arm to Iain's gcc11 repo, current commit.
--
Ticket URL: <https://trac.macports.org/ticket/64204#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list