-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
libmpack: fix darwin build #31759
libmpack: fix darwin build #31759
Conversation
@GrahamcOfBorg build libmpack luaPackages.mpack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failure for system: x86_64-darwin
_lmpack_unpacker_new in lmpack-2d54d3.o
_lmpack_packer_new in lmpack-2d54d3.o
_lmpack_session_new in lmpack-2d54d3.o
...
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:117: mpack.so] Error 1
error: build of '/nix/store/yas2ybwc4d6k7dqqlyw12za2mzaxqj5z-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99.drv' failed on ‘mac1’
builder for '/nix/store/yas2ybwc4d6k7dqqlyw12za2mzaxqj5z-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99.drv' failed with exit code 2
error: build of ‘/nix/store/yas2ybwc4d6k7dqqlyw12za2mzaxqj5z-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99.drv’ failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success for system: x86_64-linux
mkdir -p "$out/lib/lua/5.2"
install -Dm755 mpack.so "$out/lib/lua/5.2/mpack.so"
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/1ly149a8iy8i7zb4jb7malpp027i315r-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99
shrinking /nix/store/1ly149a8iy8i7zb4jb7malpp027i315r-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99/lib/lua/5.2/mpack.so
stripping (with flags -S) in /nix/store/1ly149a8iy8i7zb4jb7malpp027i315r-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99/lib
patching script interpreter paths in /nix/store/1ly149a8iy8i7zb4jb7malpp027i315r-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99
checking for references to /tmp/nix-build-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99.drv-0 in /nix/store/1ly149a8iy8i7zb4jb7malpp027i315r-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99...
/nix/store/hf7smfj41jjb0sbzvp7ryjc0avw8dmas-libmpack-1.0.5
/nix/store/1ly149a8iy8i7zb4jb7malpp027i315r-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99
ec93be5
to
d6225a0
Compare
@GrahamcOfBorg build libmpack luaPackages.mpack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success for system: x86_64-darwin
installing
install flags: install PREFIX=\$\(out\) LUA_LIBDIR=\$\(out\)/lib/lua/5.2 LUA_INC=-I/nix/store/qfvnm0phz11skqzr1kp4kl92567bqrah-lua-5.2.3/include CFLAGS=-llua USE_SYSTEM_LUA=yes USE_SYSTEM_MPACK=yes MPACK_LUA_VERSION=5.2.3 LUA_CMOD_INSTALLDIR=\$\$out/lib/lua/5.2
clang -shared -llua -I/usr/include/lua5.2 lmpack.c -o mpack.so -L/nix/store/j6sv33zmbxl143wh7a6jral3527vgiz0-libmpack-1.0.5/lib -lmpack
mkdir -p "$out/lib/lua/5.2"
install -Dm755 mpack.so "$out/lib/lua/5.2/mpack.so"
post-installation fixup
stripping (with flags -S) in /nix/store/0kivf60rd3jdv20b2lj32vw1nd1j1lfn-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99/lib
patching script interpreter paths in /nix/store/0kivf60rd3jdv20b2lj32vw1nd1j1lfn-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99
/nix/store/j6sv33zmbxl143wh7a6jral3527vgiz0-libmpack-1.0.5
/nix/store/0kivf60rd3jdv20b2lj32vw1nd1j1lfn-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success for system: x86_64-linux
install -Dm755 mpack.so "$out/lib/lua/5.2/mpack.so"
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/85n2f4m9c9hyijw21x2k9njhg610dsgj-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99
shrinking /nix/store/85n2f4m9c9hyijw21x2k9njhg610dsgj-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99/lib/lua/5.2/mpack.so
stripping (with flags -S) in /nix/store/85n2f4m9c9hyijw21x2k9njhg610dsgj-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99/lib
patching script interpreter paths in /nix/store/85n2f4m9c9hyijw21x2k9njhg610dsgj-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99
checking for references to /tmp/nix-build-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99.drv-0 in /nix/store/85n2f4m9c9hyijw21x2k9njhg610dsgj-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99...
warning: SQLite database is busy
/nix/store/hf7smfj41jjb0sbzvp7ryjc0avw8dmas-libmpack-1.0.5
/nix/store/85n2f4m9c9hyijw21x2k9njhg610dsgj-lua5.2-lua-mpack-1.0.7_ef025224a799066b818120fb1f30a308543a6e99
needs to be (if lib.hasPrefix "luajit" lua.name then "CFLAGS=-lluajit-${lua.luaversion}" else "CFLAGS=-llua") |
On darwin we need the correct prefix during the buildPhase, otherwise the dynamic libraries have an incorrect install_name.
d6225a0
to
b7ed086
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orivej mpack w/ luajit, and by extension neovim, are still broken as of that commit, with ld complaining that all the _lua_* symbols are not found |
@orivej Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pikajude are you sure?
-- Installing: /nix/store/cg87wyq8rfd272dcph9z0569vx5avnvg-neovim-0.2.1/share/nvim/runtime/print/mac-roman.ps
-- Installing: /nix/store/cg87wyq8rfd272dcph9z0569vx5avnvg-neovim-0.2.1/share/nvim/runtime/print/prolog.ps
-- Installing: /nix/store/cg87wyq8rfd272dcph9z0569vx5avnvg-neovim-0.2.1/share/nvim/runtime/tutor/en/vim-01-beginner.tutor
-- Installing: /nix/store/cg87wyq8rfd272dcph9z0569vx5avnvg-neovim-0.2.1/share/nvim/runtime/tutor/tutor.tutor
post-installation fixup
gzipping man pages under /nix/store/cg87wyq8rfd272dcph9z0569vx5avnvg-neovim-0.2.1/share/man/
stripping (with flags -S) in /nix/store/cg87wyq8rfd272dcph9z0569vx5avnvg-neovim-0.2.1/bin
patching script interpreter paths in /nix/store/cg87wyq8rfd272dcph9z0569vx5avnvg-neovim-0.2.1
/nix/store/cg87wyq8rfd272dcph9z0569vx5avnvg-neovim-0.2.1/share/nvim/runtime/macros/less.sh: interpreter directive changed from "/bin/sh" to "/nix/store/i6xy9nh39wwzs048hh6fabb2fbqphvya-bash-4.4-p12/bin/sh"
/nix/store/cg87wyq8rfd272dcph9z0569vx5avnvg-neovim-0.2.1
@LnL7 what commit are you on? I just pulled and still get the ld error |
False alarm, my |
On darwin we need the correct prefix during the buildPhase, otherwise
the dynamic libraries have an incorrect install_name.
Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)