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

lua.pkgs.luv.libluv fails to build on Darwin which causes Neovim to fail to build as well #70077

Closed
malob opened this issue Sep 30, 2019 · 2 comments · Fixed by #70215
Closed

Comments

@malob
Copy link
Member

malob commented Sep 30, 2019

Describe the bug
In PR #68882, lua.pkgs.luv.libluv was added as a build input for Neovim. This PR is now live on the nixpkgs-unstable channel. On macOS 10.14.6 Neovim now fails to build for me. As best I can tell this is because libluv is failing to build. I'm not certain whether getting libluv building on Darwin will lead to Neovim building successfully on Darwin, but it seems like it's at least a necessary step.

(#64400 might also be relevant here.)

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/NixOS/nixpkgs.git
  2. cd nixpkgs
  3. nix-build ./ -A lua.pkgs.luv.libluv

Expected behavior
lua.pkgs.luv.libluv builds successfully.

Additional context

Output of `nix-build ./ -A lua.pkgs.luv.libluv`:

these derivations will be built:
  /nix/store/nhxqa4mi9cxvwv9fw2qysgl86vwscq0x-lua5.2-luv-1.30.0-0.drv
building '/nix/store/nhxqa4mi9cxvwv9fw2qysgl86vwscq0x-lua5.2-luv-1.30.0-0.drv'...
unpacking sources
unpacking source archive /nix/store/iqsk16lkjsixwmrq9w3b6szh4nm3mpcf-luv-1.30.0-0.src.rock

Done. You may now enter directory
luv-1.30.0-0/luv-1.30.0-0
and type 'luarocks make' to build.
source root is ./luv-1.30.0-0/luv-1.30.0-0
setting SOURCE_DATE_EPOCH to timestamp 1561806879 of file ./luv-1.30.0-0/luv-1.30.0-0/src/work.c
patching sources
configuring
building
patching script interpreter paths in .
./deps/lua-compat-5.3/tests/test.lua: interpreter directive changed from "/usr/bin/env lua" to "/nix/store/km29a2p809hb81xxdq1fybkwnmrciryn-lua-5.2.4/bin/lua"
installing
Warning: unmatched variable LUA_LIBDIR
-- The C compiler identification is Clang 7.1.0
-- The ASM compiler identification is Clang
-- Found assembler: /nix/store/z298gvhxk2z8l0asyn1dxhbfgkyqbdzw-clang-wrapper-7.1.0/bin/clang
-- Check for working C compiler: /nix/store/z298gvhxk2z8l0asyn1dxhbfgkyqbdzw-clang-wrapper-7.1.0/bin/clang
-- Check for working C compiler: /nix/store/z298gvhxk2z8l0asyn1dxhbfgkyqbdzw-clang-wrapper-7.1.0/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found LIBUV: /nix/store/c2vpx0pdyzl6r0s1nixkkqnml50081s5-libuv-1.30.1/lib/libuv.dylib
-- Lua: using information from luarocks
-- LUA_LIBDIR:
-- LUA_INCDIR: /nix/store/km29a2p809hb81xxdq1fybkwnmrciryn-lua-5.2.4/include
-- LUA: /nix/store/km29a2p809hb81xxdq1fybkwnmrciryn-lua-5.2.4/bin/lua
-- Lua library: LUA_LIBRARIES-NOTFOUND
-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   luv

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /tmp/nix-build-lua5.2-luv-1.30.0-0.drv-0/luv-1.30.0-0/luv-1.30.0-0/build.luarocks
Scanning dependencies of target luv
[ 50%] Building C object CMakeFiles/luv.dir/src/luv.c.o
[100%] Linking C shared library libluv.dylib
Undefined symbols for architecture x86_64:
  "_luaL_addlstring", referenced from:
      _thread_dump in luv.c.o
  "_luaL_argerror", referenced from:
      _luv_cancel in luv.c.o
      _luv_timer_start in luv.c.o
      _luv_timer_stop in luv.c.o
      _luv_timer_again in luv.c.o
      _luv_timer_set_repeat in luv.c.o
      _luv_timer_get_repeat in luv.c.o
      _luv_prepare_start in luv.c.o
      ...
  "_luaL_buffinit", referenced from:
      _luv_thread_dumped in luv.c.o
  "_luaL_checkinteger", referenced from:
      _luv_send_buffer_size in luv.c.o
      _luv_recv_buffer_size in luv.c.o
      _luv_timer_start in luv.c.o
      _luv_timer_set_repeat in luv.c.o
      _luv_new_poll in luv.c.o
      _luv_new_socket_poll in luv.c.o
      _luv_kill in luv.c.o
      ...
  "_luaL_checklstring", referenced from:
      _luv_signal_start in luv.c.o
      _luv_signal_start_oneshot in luv.c.o
      _luv_spawn in luv.c.o
      _luv_write in luv.c.o
      _luv_write2 in luv.c.o
      _luv_try_write in luv.c.o
      _luv_tcp_bind in luv.c.o
      ...
  "_luaL_checknumber", referenced from:
      _luv_udp_set_ttl in luv.c.o
      _luv_fs_utime in luv.c.o
      _luv_fs_futime in luv.c.o
  "_luaL_checkoption", referenced from:
      _luv_run in luv.c.o
      _luv_poll_start in luv.c.o
      _luv_udp_set_membership in luv.c.o
  "_luaL_checktype", referenced from:
      _luv_walk in luv.c.o
      _luv_new_async in luv.c.o
      _luv_spawn in luv.c.o
      _luv_shutdown in luv.c.o
      _luv_write in luv.c.o
      _luv_write2 in luv.c.o
      _luv_stream_set_blocking in luv.c.o
      ...
  "_luaL_checkudata", referenced from:
      _luv_cancel in luv.c.o
      _luv_timer_start in luv.c.o
      _luv_timer_stop in luv.c.o
      _luv_timer_again in luv.c.o
      _luv_timer_set_repeat in luv.c.o
      _luv_timer_get_repeat in luv.c.o
      _luv_prepare_start in luv.c.o
      ...
  "_luaL_error", referenced from:
      _luaopen_luv in luv.c.o
      _luv_close in luv.c.o
      _luv_spawn in luv.c.o
      _luv_tcp_bind in luv.c.o
      _luv_tcp_connect in luv.c.o
      _luv_udp_bind in luv.c.o
      _luv_fs_open in luv.c.o
      ...
  "_luaL_getmetafield", referenced from:
      _luv_check_callback in luv.c.o
  "_luaL_loadbufferx", referenced from:
      _luv_thread_cb in luv.c.o
      _luv_work_cb in luv.c.o
  "_luaL_newmetatable", referenced from:
      _luaopen_luv in luv.c.o
  "_luaL_newstate", referenced from:
      _luv_thread_acquire_vm in luv.c.o
  "_luaL_openlibs", referenced from:
      _luv_thread_acquire_vm in luv.c.o
  "_luaL_optinteger", referenced from:
      _luv_fs_opendir in luv.c.o
      _luv_os_getenv in luv.c.o
  "_luaL_pushresult", referenced from:
      _luv_thread_dumped in luv.c.o
  "_luaL_ref", referenced from:
      _luv_shutdown in luv.c.o
      _luv_write in luv.c.o
      _luv_write2 in luv.c.o
      _luv_tcp_connect in luv.c.o
      _luv_pipe_connect in luv.c.o
      _luv_udp_send in luv.c.o
      _luv_fs_close in luv.c.o
      ...
  "_luaL_setfuncs", referenced from:
      _luaopen_luv in luv.c.o
  "_luaL_unref", referenced from:
      _luv_shutdown in luv.c.o
      _luv_write in luv.c.o
      _luv_write2 in luv.c.o
      _luv_tcp_connect in luv.c.o
      _luv_udp_send in luv.c.o
      _luv_fs_close in luv.c.o
      _luv_fs_open in luv.c.o
      ...
  "_lua_absindex", referenced from:
      _luv_spawn in luv.c.o
  "_lua_callk", referenced from:
      _luv_traceback in luv.c.o
  "_lua_close", referenced from:
      _luv_thread_release_vm in luv.c.o
  "_lua_createtable", referenced from:
      _luaopen_luv in luv.c.o
      _luv_os_get_passwd in luv.c.o
      _luv_cpu_info in luv.c.o
      _luv_getrusage in luv.c.o
      _luv_interface_addresses in luv.c.o
      _luv_os_uname in luv.c.o
      _parse_sockaddr in luv.c.o
      ...
  "_lua_dump", referenced from:
      _luv_thread_dumped in luv.c.o
  "_lua_getfield", referenced from:
      _luv_traceback in luv.c.o
      _luaopen_luv in luv.c.o
      _luv_spawn in luv.c.o
      _luv_tcp_bind in luv.c.o
      _luv_udp_bind in luv.c.o
      _luv_fs_event_start in luv.c.o
      _luv_fs_symlink in luv.c.o
      ...
  "_lua_getglobal", referenced from:
      _luv_thread_acquire_vm in luv.c.o
  "_lua_getmetatable", referenced from:
      _luv_check_handle in luv.c.o
      _luv_check_stream in luv.c.o
  "_lua_gettop", referenced from:
      _luv_stack_dump in luv.c.o
      _luv_cfpcall in luv.c.o
      _luv_async_send in luv.c.o
      _luv_new_thread in luv.c.o
      _luv_new_work in luv.c.o
      _luv_queue_work in luv.c.o
      _luv_thread_dumped in luv.c.o
      ...
  "_lua_insert", referenced from:
      _luv_cfpcall in luv.c.o
      _luv_async_cb in luv.c.o
      _luv_poll_cb in luv.c.o
      _luv_signal_cb in luv.c.o
      _exit_cb in luv.c.o
      _luv_shutdown_cb in luv.c.o
      _luv_connection_cb in luv.c.o
      ...
  "_lua_isnumber", referenced from:
      _luv_signal_start in luv.c.o
      _luv_signal_start_oneshot in luv.c.o
      _luv_process_kill in luv.c.o
      _luv_kill in luv.c.o
      _luv_fs_open in luv.c.o
      _luv_fs_access in luv.c.o
      _luv_getaddrinfo in luv.c.o
      ...
  "_lua_isstring", referenced from:
      _luv_traceback in luv.c.o
      _luv_signal_start in luv.c.o
      _luv_signal_start_oneshot in luv.c.o
      _luv_process_kill in luv.c.o
      _luv_kill in luv.c.o
      _luv_write in luv.c.o
      _luv_write2 in luv.c.o
      ...
  "_lua_newuserdata", referenced from:
      _luv_context in luv.c.o
      _luaopen_luv in luv.c.o
      _luv_new_timer in luv.c.o
      _luv_new_prepare in luv.c.o
      _luv_new_check in luv.c.o
      _luv_new_idle in luv.c.o
      _luv_new_async in luv.c.o
      ...
  "_lua_next", referenced from:
      _luv_spawn in luv.c.o
  "_lua_pcallk", referenced from:
      _luv_cfpcall in luv.c.o
  "_lua_pushboolean", referenced from:
      _luaopen_luv in luv.c.o
      _luv_run in luv.c.o
      _luv_loop_alive in luv.c.o
      _luv_is_active in luv.c.o
      _luv_is_closing in luv.c.o
      _luv_has_ref in luv.c.o
      _luv_is_readable in luv.c.o
      ...
  "_lua_pushcclosure", referenced from:
      _luv_cfpcall in luv.c.o
      _luaopen_luv in luv.c.o
  "_lua_pushfstring", referenced from:
      _luv_loop_close in luv.c.o
      _luv_run in luv.c.o
      _luv_loop_alive in luv.c.o
      _luv_backend_fd in luv.c.o
      _luv_cancel in luv.c.o
      _luv_is_active in luv.c.o
      _luv_is_closing in luv.c.o
      ...
  "_lua_pushinteger", referenced from:
      _luv_traceback in luv.c.o
      _luaopen_luv in luv.c.o
      _luv_loop_close in luv.c.o
      _luv_backend_fd in luv.c.o
      _luv_backend_timeout in luv.c.o
      _luv_now in luv.c.o
      _luv_cancel in luv.c.o
      ...
  "_lua_pushlstring", referenced from:
      _luv_pipe_getsockname in luv.c.o
      _luv_pipe_getpeername in luv.c.o
      _luv_fs_event_getpath in luv.c.o
      _luv_fs_poll_getpath in luv.c.o
      _luv_os_homedir in luv.c.o
      _luv_os_tmpdir in luv.c.o
      _luv_cwd in luv.c.o
      ...
  "_lua_pushnil", referenced from:
      _luv_loop_close in luv.c.o
      _luv_run in luv.c.o
      _luv_loop_alive in luv.c.o
      _luv_backend_fd in luv.c.o
      _luv_cancel in luv.c.o
      _luv_is_active in luv.c.o
      _luv_is_closing in luv.c.o
      ...
  "_lua_pushnumber", referenced from:
      _luv_cpu_info in luv.c.o
      _luv_get_total_memory in luv.c.o
      _luv_get_free_memory in luv.c.o
      _luv_hrtime in luv.c.o
      _luv_loadavg in luv.c.o
      _luv_uptime in luv.c.o
      _luv_os_getppid in luv.c.o
      ...
  "_lua_pushstring", referenced from:
      _luv_context in luv.c.o
      _luaopen_luv in luv.c.o
      _luv_loop_close in luv.c.o
      _luv_run in luv.c.o
      _luv_loop_alive in luv.c.o
      _luv_backend_fd in luv.c.o
      _luv_cancel in luv.c.o
      ...
  "_lua_pushvalue", referenced from:
      _luv_traceback in luv.c.o
      _luv_shutdown in luv.c.o
      _luv_write in luv.c.o
      _luv_write2 in luv.c.o
      _luv_tcp_connect in luv.c.o
      _luv_pipe_connect in luv.c.o
      _luv_udp_send in luv.c.o
      ...
  "_lua_rawget", referenced from:
      _luv_context in luv.c.o
      _luv_check_handle in luv.c.o
      _luv_check_stream in luv.c.o
      _luv_work_cb in luv.c.o
  "_lua_rawgeti", referenced from:
      _luv_traceback in luv.c.o
      _luv_spawn in luv.c.o
      _luv_fs_close in luv.c.o
      _luv_fs_open in luv.c.o
      _luv_fs_read in luv.c.o
      _luv_fs_unlink in luv.c.o
      _luv_fs_write in luv.c.o
      ...
  "_lua_rawlen", referenced from:
      _luv_spawn in luv.c.o
      _luv_interface_addresses in luv.c.o
      _luv_prep_bufs in luv.c.o
  "_lua_rawset", referenced from:
      _luv_context in luv.c.o
      _luaopen_luv in luv.c.o
      _luv_work_cb in luv.c.o
  "_lua_rawseti", referenced from:
      _luv_cpu_info in luv.c.o
      _luv_interface_addresses in luv.c.o
      _push_fs_result in luv.c.o
      _luv_pushaddrinfo in luv.c.o
  "_lua_remove", referenced from:
      _luv_cfpcall in luv.c.o
      _luv_traceback in luv.c.o
      _luv_translate_sys_error in luv.c.o
      _luv_fs_cb in luv.c.o
      _luv_thread_acquire_vm in luv.c.o
  "_lua_setfield", referenced from:
      _luaopen_luv in luv.c.o
      _luv_os_get_passwd in luv.c.o
      _luv_cpu_info in luv.c.o
      _luv_getrusage in luv.c.o
      _luv_interface_addresses in luv.c.o
      _luv_os_uname in luv.c.o
      _parse_sockaddr in luv.c.o
      ...
  "_lua_setmetatable", referenced from:
      _luaopen_luv in luv.c.o
      _luv_new_thread in luv.c.o
      _luv_thread_self in luv.c.o
      _luv_new_work in luv.c.o
      _luv_setup_handle in luv.c.o
      _luv_thread_arg_push in luv.c.o
      _luv_thread_arg_clear in luv.c.o
      ...
  "_lua_settable", referenced from:
      _luaopen_luv in luv.c.o
  "_lua_settop", referenced from:
      _luv_cfpcall in luv.c.o
      _luv_traceback in luv.c.o
      _luv_context in luv.c.o
      _luaopen_luv in luv.c.o
      _luv_new_timer in luv.c.o
      _luv_new_prepare in luv.c.o
      _luv_new_check in luv.c.o
      ...
  "_lua_status", referenced from:
      _luv_stack_dump in luv.c.o
  "_lua_toboolean", referenced from:
      _luv_spawn in luv.c.o
      _luv_stream_set_blocking in luv.c.o
      _luv_tcp_nodelay in luv.c.o
      _luv_tcp_keepalive in luv.c.o
      _luv_tcp_simultaneous_accepts in luv.c.o
      _luv_tcp_bind in luv.c.o
      _luv_new_pipe in luv.c.o
      ...
  "_lua_tolstring", referenced from:
      _luv_stack_dump in luv.c.o
      _luv_cfpcall in luv.c.o
      _luv_spawn in luv.c.o
      _luv_process_kill in luv.c.o
      _luv_kill in luv.c.o
      _luv_fs_open in luv.c.o
      _luv_fs_access in luv.c.o
      ...
  "_lua_tonumberx", referenced from:
      _luv_stack_dump in luv.c.o
      _luv_signal_start in luv.c.o
      _luv_signal_start_oneshot in luv.c.o
      _luv_spawn in luv.c.o
      _luv_process_kill in luv.c.o
      _luv_kill in luv.c.o
      _luv_new_tcp in luv.c.o
      ...
  "_lua_touserdata", referenced from:
      _luv_stack_dump in luv.c.o
      _luv_context in luv.c.o
      _luv_check_handle in luv.c.o
      _luv_setup_handle in luv.c.o
      _luv_check_stream in luv.c.o
      _luv_handle_gc in luv.c.o
  "_lua_type", referenced from:
      _luv_stack_dump in luv.c.o
      _luv_traceback in luv.c.o
      _luv_context in luv.c.o
      _luaopen_luv in luv.c.o
      _luv_close in luv.c.o
      _luv_send_buffer_size in luv.c.o
      _luv_recv_buffer_size in luv.c.o
      ...
  "_lua_typename", referenced from:
      _luv_stack_dump in luv.c.o
      _luv_check_callback in luv.c.o
      _luv_thread_arg_push in luv.c.o
      _luv_thread_arg_set in luv.c.o
      _luv_work_cb in luv.c.o
ld: symbol(s) not found for architecture x86_64
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/luv.dir/build.make:85: libluv.1.30.0.dylib] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/luv.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Error: Build error: Failed building.

builder for '/nix/store/nhxqa4mi9cxvwv9fw2qysgl86vwscq0x-lua5.2-luv-1.30.0-0.drv' failed with exit code 1
error: build of '/nix/store/nhxqa4mi9cxvwv9fw2qysgl86vwscq0x-lua5.2-luv-1.30.0-0.drv' failed

Metadata

 - system: `"x86_64-darwin"`
 - host os: `Darwin 18.7.0, macOS 10.14.6`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.2.2`
 - channels(malo): `"unstable-20.03pre194582.dd2701e82d8"`
 - channels(root): `"nixpkgs-19.03pre173553.6420e2649fa"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
- `neovim`
@malob
Copy link
Member Author

malob commented Sep 30, 2019

CCing some relevant folks, @rvolosatovs, @manveru, @teto.

@teto
Copy link
Member

teto commented Oct 1, 2019

CC @NixOS/darwin-maintainers

@LnL7 LnL7 mentioned this issue Oct 1, 2019
10 tasks
kevingriffin added a commit to kevingriffin/nix-config that referenced this issue Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants