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

lame: prevent build failure from using outdated symbol list #31174

Merged
merged 1 commit into from Nov 4, 2017

Conversation

eqyiel
Copy link
Contributor

@eqyiel eqyiel commented Nov 3, 2017

Before this change, trying to build LAME on Darwin would throw an error:

Undefined symbols for architecture x86_64:
"_lame_init_old", referenced from:
-exported_symbol[s_list] command line option
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)

Other platforms may have been affected too.

Motivation for this change

Just want to rebuild mpv, which depends on ffmpeg, which depends on this.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Before this change, trying to build LAME on Darwin would throw an error:

Undefined symbols for architecture x86_64:
  "_lame_init_old", referenced from:
     -exported_symbol[s_list] command line option
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)
@dezgeg
Copy link
Contributor

dezgeg commented Nov 3, 2017

cc @NixOS/darwin-maintainers.

(If there's a better way to 'assign' Darwin tickets, let me know...)

@LnL7 LnL7 added the 6.topic: darwin Running or building packages on Darwin label Nov 3, 2017
@LnL7
Copy link
Member

LnL7 commented Nov 3, 2017

@GrahamcOfBorg lame ffmpeg mpv

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For system: x86_64-darwin


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

(use '--show-trace' to show detailed location information)

@LnL7
Copy link
Member

LnL7 commented Nov 3, 2017

hrm, that must be something recent

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For system: x86_64-linux

shrinking RPATHs of ELF executables and libraries in /nix/store/rh0d63r3nwg10xinfprbv9y8b1y2rz01-mpv-0.27.0
shrinking /nix/store/rh0d63r3nwg10xinfprbv9y8b1y2rz01-mpv-0.27.0/bin/.mpv-wrapped
shrinking /nix/store/rh0d63r3nwg10xinfprbv9y8b1y2rz01-mpv-0.27.0/lib/libmpv.so.1.25.0
gzipping man pages under /nix/store/rh0d63r3nwg10xinfprbv9y8b1y2rz01-mpv-0.27.0/share/man/
stripping (with flags -S) in /nix/store/rh0d63r3nwg10xinfprbv9y8b1y2rz01-mpv-0.27.0/lib  /nix/store/rh0d63r3nwg10xinfprbv9y8b1y2rz01-mpv-0.27.0/bin
patching script interpreter paths in /nix/store/rh0d63r3nwg10xinfprbv9y8b1y2rz01-mpv-0.27.0
checking for references to /tmp/nix-build-mpv-0.27.0.drv-0 in /nix/store/rh0d63r3nwg10xinfprbv9y8b1y2rz01-mpv-0.27.0...
/nix/store/hcd67wjwrx5sd708mpxvjddp075pxzgv-lame-3.100
/nix/store/7bbz4j43zbhwi1n83dc7r2jfvg6pc4kd-ffmpeg-3.4-bin
/nix/store/rh0d63r3nwg10xinfprbv9y8b1y2rz01-mpv-0.27.0

@eqyiel
Copy link
Contributor Author

eqyiel commented Nov 4, 2017 via email

@LnL7
Copy link
Member

LnL7 commented Nov 4, 2017

@GrahamcOfBorg lame ffmpeg

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For system: x86_64-linux

/nix/store/hcd67wjwrx5sd708mpxvjddp075pxzgv-lame-3.100
/nix/store/7bbz4j43zbhwi1n83dc7r2jfvg6pc4kd-ffmpeg-3.4-bin

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For system: x86_64-darwin

Moving /nix/store/cp8861rlnnmhvvw8prf5wjh9ygxlira8-ffmpeg-3.4/share/ffmpeg/examples to /nix/store/m2pxrxnrb2kd0092zcv4b17s4d0a5ns5-ffmpeg-3.4-doc/share/ffmpeg/examples
rmdir: failed to remove '/nix/store/cp8861rlnnmhvvw8prf5wjh9ygxlira8-ffmpeg-3.4/share/ffmpeg': Directory not empty
copying 5 paths...
copying path '/nix/store/6j5ji2814j7ka1qyxa99a2kzxlwb3hw9-ffmpeg-3.4-man'...
copying path '/nix/store/cp8861rlnnmhvvw8prf5wjh9ygxlira8-ffmpeg-3.4'...
copying path '/nix/store/m2pxrxnrb2kd0092zcv4b17s4d0a5ns5-ffmpeg-3.4-doc'...
copying path '/nix/store/gy804jk276j3bk0isjxwq7dw5py5lz76-ffmpeg-3.4-bin'...
copying path '/nix/store/hy7if975y77my4i952z8vkbx63z5m4kk-ffmpeg-3.4-dev'...
/nix/store/djx6azq355mc0669cimcqqjd6nngic8d-lame-3.100
/nix/store/gy804jk276j3bk0isjxwq7dw5py5lz76-ffmpeg-3.4-bin

@LnL7 LnL7 merged commit de62516 into NixOS:master Nov 4, 2017
@LnL7
Copy link
Member

LnL7 commented Nov 4, 2017

@eqyiel Pretty sure it worked a while back, packages with a bunch of feature flags often break on darwin. I usually change the defaults to !stdenv.isDarwin if the dependency doesn't fail in an obvious way.

@LnL7 LnL7 added the 8.has: port to stable A PR already has a backport to the stable release. label Nov 4, 2017
@eqyiel
Copy link
Contributor Author

eqyiel commented Nov 4, 2017

Thanks!

@eqyiel eqyiel deleted the fix-lame branch November 3, 2020 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 8.has: port to stable A PR already has a backport to the stable release. 10.rebuild-darwin: 11-100 10.rebuild-linux: 101-500
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants