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

WIP linuxPackages.sysdig: 0.24.2 -> 0.25 #59006

Merged
merged 1 commit into from Apr 26, 2019
Merged

Conversation

terlar
Copy link
Contributor

@terlar terlar commented Apr 5, 2019

Motivation for this change

A new version of sysdig has been released: https://github.com/draios/sysdig/releases/tag/0.25

The current version is not compatible with Linux 5.0.

Things done

I have not managed to get this to build yet, any assistance appreciated. Since a few new features was added with gRPC support etc. I had to add a few new dependencies, but I get the output such as this when building:

/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: (.text+0x1ad): undefined reference to `gpr_free'
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: /nix/store/83xh6xap4l4x5xqynwb7fbkf1bf2xcqa-grpc-1.18.0/lib/libgrpc_unsecure.a(client_load_reporting_filter.cc.o): in function `destroy_call_elem(grpc_call_element*, grpc_call_final_info const*, grpc_closure*)':
(.text+0x265): undefined reference to `gpr_free'
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: /nix/store/83xh6xap4l4x5xqynwb7fbkf1bf2xcqa-grpc-1.18.0/lib/libgrpc_unsecure.a(xds_client_stats.cc.o): in function `grpc_core::XdsLbClientStats::AddCallDroppedLocked(char*)':
(.text+0xc4): undefined reference to `gpr_strdup'
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: (.text+0x146): undefined reference to `gpr_malloc'
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: (.text+0x1aa): undefined reference to `gpr_free'
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: (.text+0x1bc): undefined reference to `gpr_free'
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: (.text+0x1f1): undefined reference to `gpr_malloc'
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: (.text+0x25d): undefined reference to `gpr_free'
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: (.text+0x279): undefined reference to `gpr_free'
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: (.text+0x281): undefined reference to `gpr_free'
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: (.text+0x2ad): undefined reference to `gpr_free'
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: /nix/store/83xh6xap4l4x5xqynwb7fbkf1bf2xcqa-grpc-1.18.0/lib/libgrpc_unsecure.a(xds_client_stats.cc.o): in function `grpc_core::XdsLbClientStats::GetLocked(long*, long*, long*, long*, std::unique_ptr<grpc_core::InlinedVector<grpc_core::XdsLbClientStats::DropTokenCount, 10ul>, grpc_core::DefaultDelete<grpc_core::InlinedVector<grpc_core::XdsLbClientStats::DropTokenCount, 10ul> > >*)':
(.text+0x352): undefined reference to `gpr_free'
/nix/store/0y7jmqnj48ikjh37n3dl9kqw9hnn68nq-binutils-2.31.1/bin/ld: /nix/store/83xh6xap4l4x5xqynwb7fbkf1bf2xcqa-grpc-1.18.0/lib/libgrpc_unsecure.a(xds_client_stats.cc.o):(.text+0x36e): more undefined references to `gpr_free' follow
collect2: error: ld returned 1 exit status
make[2]: *** [userspace/sysdig/CMakeFiles/csysdig.dir/build.make:116: userspace/sysdig/csysdig] Error 1
make[1]: *** [CMakeFiles/Makefile2:255: userspace/sysdig/CMakeFiles/csysdig.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
builder for '/nix/store/67900awb9g3vk92vj7np4f2wfkl4sxk8-sysdig-0.25.drv' failed with exit code 2

I cannot fully remember, but I guess I have to do some special thing to get the libraries from grpc package linked. Or perhaps even patch the references. Feel free to close this if you take this on and know what to do.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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 nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@7c6f434c
Copy link
Member

7c6f434c commented Apr 5, 2019

Apparently we build gRPC as a static library, maybe we need to link against it in some other way (or maybe we should just buid a shared version)

@c0bw3b
Copy link
Contributor

c0bw3b commented Apr 26, 2019

gRPC shared libs should be available since #59232

@GrahamcOfBorg build sysdig

@c0bw3b
Copy link
Contributor

c0bw3b commented Apr 26, 2019

@GrahamcOfBorg build linuxPackages.sysdig linuxPackages_5_0.sysdig

Copy link
Contributor

@c0bw3b c0bw3b left a comment

Choose a reason for hiding this comment

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

Also reviewed locally with nix-review

@c0bw3b c0bw3b merged commit 3567860 into NixOS:master Apr 26, 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 this pull request may close these issues.

None yet

4 participants