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

luajit fails to build on macOS 10.14 Mojave #31483

Closed
fxcoudert opened this issue Aug 26, 2018 · 1 comment
Closed

luajit fails to build on macOS 10.14 Mojave #31483

fxcoudert opened this issue Aug 26, 2018 · 1 comment
Labels
10.14 Mojave is specifically affected outdated PR was locked due to age

Comments

@fxcoudert
Copy link
Member

fxcoudert commented Aug 26, 2018

Part of #28817 . luajit fails to build on macOS 10.14 Mojave. During the make amalg step, it errors out with:

HOSTLINK  host/minilua
ld: library not found for -lgcc_s.10.4
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [host/minilua] Error 1

macOS 10.14 / Xcode 10 have removed libgcc_s.10.4, but I do not know why this is called because nothing specifies -mmacosx-min. The clang command is the following:

clang called with: -o host/minilua host/minilua.o -lm
superenv added:    -pipe -w -O2 -march=native -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -isystem/usr/local/include -isystem/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libxml2 -isystem/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers -L/usr/local/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries -Wl,-headerpad_max_install_names
superenv executed: clang -pipe -w -O2 -march=native -o host/minilua host/minilua.o -lm -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -isystem/usr/local/include -isystem/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libxml2 -isystem/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers -L/usr/local/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries -Wl,-headerpad_max_install_names

What is very weird is that actually running this exact command shown above, from the shell, succeeds in building host/minilua correctly.

@fxcoudert fxcoudert added the 10.14 Mojave is specifically affected label Aug 26, 2018
@fxcoudert
Copy link
Member Author

The bug can be reproduced outside of Homebrew and superenv:

einstein:LuaJIT-2.0.5 fx$ make amalg
Building LuaJIT 2.0.5
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src amalg
+--------------------------------------------------------------------------+
| WARNING: Compiling the amalgamation needs a lot of virtual memory        |
| (around 300 MB with GCC 4.x)! If you don't have enough physical memory   |
| your machine will start swapping to disk and the compile will not finish |
| within a reasonable amount of time.                                      |
| So either compile on a bigger machine or use the non-amalgamated build.  |
+--------------------------------------------------------------------------+
/Applications/Xcode.app/Contents/Developer/usr/bin/make all "LJCORE_O=ljamalg.o"
gcc     -o host/minilua host/minilua.o -lm   
ld: library not found for -lgcc_s.10.4
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [host/minilua] Error 1
make[1]: *** [amalg] Error 2
make: *** [amalg] Error 2

@DomT4 DomT4 closed this as completed in f39c2dd Aug 30, 2018
@lock lock bot added the outdated PR was locked due to age label Sep 30, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
10.14 Mojave is specifically affected outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

1 participant