Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile on macOS with M1 #25

Open
TheSpyder opened this issue Dec 24, 2020 · 1 comment
Open

Cannot compile on macOS with M1 #25

TheSpyder opened this issue Dec 24, 2020 · 1 comment

Comments

@TheSpyder
Copy link

I'm using branch 1_1_1h+esy with esy version 0.6.8-macos.arm64.dev.3. On a fresh checkout running esy eventually fails. This is the output where the errors start:

ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ar: creating archive libcrypto.a
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd (3 slices)ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd (3 slices)

Undefined symbols for architecture i386:
  "___stderrp", referenced from:
      _main in shlibloadtest.o
  "_dlclose", referenced from:
      _main in shlibloadtest.o
  "_dlopen", referenced from:
      _main in shlibloadtest.o
  "_dlsym", referenced from:
      _main in shlibloadtest.o
  "_fclose", referenced from:
      _atexit_handler in shlibloadtest.o
  "_fopen$UNIX2003", referenced from:
      _atexit_handler in shlibloadtest.o
  "_fwrite$UNIX2003", referenced from:
      _main in shlibloadtest.o
      _atexit_handler in shlibloadtest.o
  "_strcmp", referenced from:
      _main in shlibloadtest.o
ld: symbol(s) not found for architecture i386
ld: dynamic main executables must link with libSystem.dylib for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [test/shlibloadtest] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [test/rsa_complex] Error 1
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(async_null.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(async_win.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(cms_cd.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(dso_dl.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(dso_openssl.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(dso_vms.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(dso_win32.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(ebcdic.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(ecp_nistp224.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(ecp_nistp256.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(ecp_nistp521.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(ecp_nistputil.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(e_rc5.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(m_md2.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(rand_egd.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(rand_vms.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(rand_win.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(threads_none.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(threads_win.o) has no symbols
ranlib -c libcrypto.a || echo Never mind.
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(async_null.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(async_win.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(cms_cd.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(dso_dl.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(dso_openssl.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(dso_vms.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(dso_win32.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(ebcdic.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(ecp_nistp224.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(ecp_nistp256.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(ecp_nistp521.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(ecp_nistputil.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(e_rc5.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(m_md2.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(rand_egd.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(rand_vms.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(rand_win.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(threads_none.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcrypto.a(threads_win.o) has no symbols
make: *** [all] Error 2
error: command failed: 'make' '-j4' (exited with 2)
esy-build-package: exiting with errors above...
error: build failed with exit code: 1

Full output:
esy compile.txt

I noticed a bunch of lines above this are compiling for i386, e.g.

cc -Iinclude -arch i386 -O3 -fomit-frame-pointer -D_REENTRANT -DNDEBUG -MMD -MF test/buildtest_x509v3.d.tmp -MT test/buildtest_x509v3.o -c -o test/buildtest_x509v3.o test/buildtest_x509v3.c

@TheSpyder
Copy link
Author

TheSpyder commented Dec 24, 2020

Appears to be fixed by openssl/openssl@61168b5

Compiling works now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant