Nixpkgs: WeeChat fails to build on OS X

Created on 19 Oct 2016  Â·  5Comments  Â·  Source: NixOS/nixpkgs

Issue description

WeeChat fails to build on OS X with the below error

[ 43%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-server.o
[ 44%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-upgrade.o
[ 44%] Linking C shared module irc.so
Undefined symbols for architecture x86_64:
  "_res_9_init", referenced from:
      _irc_server_xfer_send_ready_cb in irc-server.o
ld: symbol(s) not found for architecture x86_64
clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/plugins/irc/CMakeFiles/irc.dir/build.make:694: src/plugins/irc/irc.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:703: src/plugins/irc/CMakeFiles/irc.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
builder for ‘/nix/store/3nirbm7p4c8sdfx2k0171hkbrddhi9r0-weechat-1.6.drv’ failed with exit code 2
error: build of ‘/nix/store/3nirbm7p4c8sdfx2k0171hkbrddhi9r0-weechat-1.6.drv’ failed

Steps to reproduce

nix-env -i weechat

Technical details

  • System: macOS Sierra
  • Nix version: 1.11.4
  • Nixpkgs version: 17.03pre93141.e3deccc
bug darwin

Most helpful comment

Got it building. Here's the changes https://github.com/ajevans85/nixpkgs/commit/4fe6e2d554ea591bc526d87c13bdad381fe82ddd .

I'll raise a PR at the weekend after I've read https://nixos.org/wiki/Contributing_to_nixpkgs

All 5 comments

I've see the res_9_init missing symbol thing before, but haven't had a chance to track down where it should be and why it isn't there. If anyone wants to poke around and answer those questions, I'd appreciate it!

I didn't know how to read the message, I was searching for Undefined symbols for architecture x86_64.

Searching for res_9_init I think it comes from libresolv on Darwin searching around.

I can see libresolv listed in pkgs/os-specific/darwin/apple-source-releases/default.nix, pkgs/os-specific/darwin/apple-source-releases/libresolve/default.nix and pkgs/os-specific/darwin/apple-source-releases/Libsytem/default.nix .

Only just started using nixpkgs so not sure how to pull it in to the Weechat derivation and test etc.

Got it building. Here's the changes https://github.com/ajevans85/nixpkgs/commit/4fe6e2d554ea591bc526d87c13bdad381fe82ddd .

I'll raise a PR at the weekend after I've read https://nixos.org/wiki/Contributing_to_nixpkgs

^ This change works for me!

@ajevans85 once you submit the PR, I think we can simultaneously close this and #13032 and #9156.

Was this page helpful?
0 / 5 - 0 ratings