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

pkgsStatic.protobuf fails to build #76873

Closed
FRidh opened this issue Jan 3, 2020 · 2 comments · Fixed by #163489
Closed

pkgsStatic.protobuf fails to build #76873

FRidh opened this issue Jan 3, 2020 · 2 comments · Fixed by #163489
Labels
0.kind: bug Something is broken 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: static

Comments

@FRidh
Copy link
Member

FRidh commented Jan 3, 2020

Describe the bug

libtool: link: x86_64-unknown-linux-musl-ranlib .libs/libprotoc.a
libtool: link: ( cd ".libs" && rm -f "libprotoc.la" && ln -s "../libprotoc.la" "libprotoc.la" )
/nix/store/86ap9r7vjvcy44kskgms1yc1wxdsiq2z-bash-4.4-p23/bin/bash ../libtool  --tag=CXX   --mode=link x86_64-unknown-linux-musl-g++ -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -O2 -g -std=c++>
libtool: link: x86_64-unknown-linux-musl-g++ -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -O2 -g -std=c++11 -DNDEBUG -pthread -o protoc google/protobuf/compiler/main.o  ./.libs/libprotobuf.a .>
/nix/store/394p75bacqaiv0xvyna0kazf2lg16sjs-x86_64-unknown-linux-musl-binutils-2.31.1/bin/x86_64-unknown-linux-musl-ld: attempted static link of dynamic object `/nix/store/yqhy357p4spkggdnklsai99gby5z4515-x86_64>
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:3924: protoc] Error 1
make[2]: Leaving directory '/build/source/src'
make[1]: *** [Makefile:1597: all-recursive] Error 1
make[1]: Leaving directory '/build/source'
make: *** [Makefile:1504: all] Error 2

Nixpkgs at 016111e

@FRidh FRidh added the 0.kind: bug Something is broken label Jan 3, 2020
@FRidh
Copy link
Member Author

FRidh commented Jan 3, 2020

Potential fix

diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix
index 7ff8d7529ca..1b688a73722 100644
--- a/pkgs/development/compilers/gcc/9/default.nix
+++ b/pkgs/development/compilers/gcc/9/default.nix
@@ -5,7 +5,7 @@
 , langGo ? false
 , profiledCompiler ? false
 , staticCompiler ? false
-, enableShared ? true
+, enableShared ? !stdenv.targetPlatform.isMusl
 , enableLTO ? true
 , texinfo ? null
 , perl ? null # optional, for texi2pod (then pod2man)

Suppose this breaks pkgsMusl.protobuf?

@stale
Copy link

stale bot commented Jul 1, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: static
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant