Opened 12 months ago
Last modified 12 months ago
#68639 assigned defect
reduce @20211019_0: error: ld: symbol(s) not found for architecture arm64
Reported by: | zzanderr | Owned by: | mbrethen |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | sonoma arm64 | Cc: | mbrethen |
Port: | reduce |
Description
Build fails on MacBook Pro, M2, Sonoma 14.1, Xcode 15.1 Beta
:info:build libtool: link: gcc -dynamiclib -o .libs/libffi.7.dylib src/.libs/prep_cif.o src/ .libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ ffi64.o src/x86/.libs/unix64.o src/x86/.libs/ffiw64.o src/x86/.libs/win64.o -arch x86_64 -a rch x86_64 -arch x86_64 -install_name /opt/local/var/macports/build/_opt_local_var_macports _sources_rsync.macports.org_macports_release_tarballs_ports_math_reduce/reduce/work/Reduce-svn 6110-src/cslbuild/aarch64-apple-darwin23.1.0/libffi/build-x86_64/../x86_64/lib/libffi.7.dylib -compatibility_version 9 -current_version 9.0 14522 :info:build gcc: warning: this compiler does not support x86 ('-arch' option ignored) 14523 :info:build Undefined symbols for architecture arm64: 14524 :info:build "_ffi_call", referenced from: 14525 :info:build _ffi_raw_call in raw_api.o 14526 :info:build _ffi_java_raw_call in java_raw_api.o 14527 :info:build "_ffi_prep_cif_machdep", referenced from: 14528 :info:build _ffi_prep_cif_core in prep_cif.o 14529 :info:build "_ffi_prep_closure_loc", referenced from: 14530 :info:build _ffi_prep_closure in prep_cif.o 14531 :info:build _ffi_prep_raw_closure_loc in raw_api.o 14532 :info:build _ffi_prep_java_raw_closure_loc in java_raw_api.o 14533 :info:build ld: symbol(s) not found for architecture arm64 14534 :info:build collect2: error: ld returned 1 exit status 14535 :info:build gmake[7]: *** [Makefile:1070: libffi.la] Error 1
Attachments (1)
Change History (13)
Changed 12 months ago by zzanderr
comment:1 Changed 12 months ago by zzanderr
I'm not really sure why the compiler claims not to support x86 if it's the Xcode compiler. I've built a few universal binaries with Xcode's Clang without any trouble.
There are additional warnings in the configure stage reporting many macros to be obsolete and that autoupdate should be run:
9645 :info:configure /opt/local/share/aclocal/libvideogfx.m4:7: or see https://www.gnu.org/softwa re/automake/manual/automake.html#Extending-aclocal 9646 :info:configure autoreconf: running: /opt/local/bin/autoconf --force 9647 :info:configure configure.ac:8: warning: The macro `AC_CANONICAL_SYSTEM' is obsolete. 9648 :info:configure configure.ac:8: You should run autoupdate. 9649 :info:configure ./lib/autoconf/general.m4:2081: AC_CANONICAL_SYSTEM is expanded from... 9650 :info:configure configure.ac:8: the top level 9651 :info:configure configure.ac:41: warning: The macro `AC_PROG_LIBTOOL' is obsolete. 9652 :info:configure configure.ac:41: You should run autoupdate. 9653 :info:configure m4/libtool.m4:100: AC_PROG_LIBTOOL is expanded from... 9654 :info:configure configure.ac:41: the top level 9655 :info:configure configure.ac:68: warning: The macro `AC_TRY_COMPILE' is obsolete. 9656 :info:configure configure.ac:68: You should run autoupdate. 9657 :info:configure ./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from... 9658 :info:configure lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from... 9659 :info:configure lib/m4sugar/m4sh.m4:699: AS_IF is expanded from... 9660 :info:configure ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from... 9661 :info:configure ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from... 9662 :info:configure acinclude.m4:3: AC_FUNC_MMAP_BLACKLIST is expanded from... 9663 :info:configure configure.ac:68: the top level
and so on until line 9714.
comment:3 Changed 12 months ago by zzanderr
Tried to autoupdate configure.ac and got:
$ sudo autoupdate configure.ac aclocal.m4:17: warning: this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.
Note: I am not at all sure if I did this correctly (i.e., I don't know what I'm doing). Just thought I'd throw it in if it helps.
comment:5 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | sonoma added; Sonoma removed |
---|---|
Owner: | set to mbrethen |
Status: | new → assigned |
Summary: | reduce@20211019_0 error: ld: symbol(s) not found for architecture arm64 → reduce @20211019_0: error: ld: symbol(s) not found for architecture arm64 |
Nobody knows what gcc
is on your system. This port is not UsingTheRightCompiler, so it could be anything.
Warnings from autoreconf
are for the developer to fix. As long as autoreconf
did not end in failure (which it didn't) I'm optimistic that the warnings are not the reason why the build failed.
comment:6 Changed 12 months ago by zzanderr
I have MacPorts gcc12 and gcc13; however, I haven't set 'port select' for either of them, as I only have them for other ports that depend on them.
comment:7 Changed 12 months ago by zzanderr
I deactivated both gcc12 and gcc13, and reduce built fine. Thanks for pointing me in the right direction.
I built reduce a few months ago with a late version of Xcode 14 and must have had MacPorts gcc12 activated at the time, but it wasn't pulled into the build. I don't think I had gcc13 installed at the time, but I'm not completely sure.
comment:8 Changed 12 months ago by zzanderr
No, I didn't have gcc13 installed the last time reduce built successfully.
comment:10 Changed 12 months ago by barracuda156
I tried the latest version, but it is broken for ppc
, or needs some different settings. Gonna return to this, but not today.
libtool: compile: /opt/local/bin/gcc-mp-13 -DHAVE_CONFIG_H -I. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_reduce/reduce/work/Reduce-svn6547-src/libraries/libffi -I. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_reduce/reduce/work/Reduce-svn6547-src/libraries/libffi/include -Iinclude -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_reduce/reduce/work/Reduce-svn6547-src/libraries/libffi/src -isystem/opt/local/include/LegacySupport -I/opt/local/include -I/opt/local/include -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -mcpu=970 -Wall -fexceptions -MT src/powerpc/ffi_darwin.lo -MD -MP -MF src/powerpc/.deps/ffi_darwin.Tpo -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_reduce/reduce/work/Reduce-svn6547-src/libraries/libffi/src/powerpc/ffi_darwin.c -fno-common -DPIC -o src/powerpc/.libs/ffi_darwin.o /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_reduce/reduce/work/Reduce-svn6547-src/libraries/libffi/src/powerpc/ffi_darwin.c:1114:22: error: unknown type name 'ffi_go_closure'; did you mean 'ffi_raw_closure'? 1114 | ffi_prep_go_closure (ffi_go_closure* closure, | ^~~~~~~~~~~~~~ | ffi_raw_closure /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_reduce/reduce/work/Reduce-svn6547-src/libraries/libffi/src/powerpc/ffi_darwin.c:1172:31: error: unknown type name 'ffi_go_closure'; did you mean 'ffi_raw_closure'? 1172 | ffi_go_closure_helper_DARWIN (ffi_go_closure*, void *, | ^~~~~~~~~~~~~~ | ffi_raw_closure /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_reduce/reduce/work/Reduce-svn6547-src/libraries/libffi/src/powerpc/ffi_darwin.c:1434:31: error: unknown type name 'ffi_go_closure'; did you mean 'ffi_raw_closure'? 1434 | ffi_go_closure_helper_DARWIN (ffi_go_closure *closure, void *rvalue, | ^~~~~~~~~~~~~~ | ffi_raw_closure gmake[4]: *** [Makefile:1281: src/powerpc/ffi_darwin.lo] Error 1
comment:11 Changed 12 months ago by kencu (Ken)
I fixed this ppc issue in our libffi port a few years ago:
https://github.com/macports/macports-ports/commit/5287b4e585c1277c33540e78cc8c8ef626dd776e
It looks like reduce is using a bundled libffi, so doesn’t have that fix.
BTW, I updated and installed reduce on arm64 yesterday… it builds but crashed on launch, so needs some testing and may need some sortingbout.
comment:12 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)
Making reduce use MacPorts libffi instead of a bundled copy would be a good idea too.
reduce build.log