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

Nix built binary is dynamically linked and missing RUNPATH/RPATH #265

Closed
2 of 3 tasks
vkryachko opened this issue Oct 22, 2024 · 0 comments · Fixed by #269
Closed
2 of 3 tasks

Nix built binary is dynamically linked and missing RUNPATH/RPATH #265

vkryachko opened this issue Oct 22, 2024 · 0 comments · Fixed by #269
Labels
bug Something isn't working done Done, awaiting release

Comments

@vkryachko
Copy link
Contributor

Defect

Make sure that these boxes are checked before submitting your issue -- thank you!

  • Included the relevant configuration snippet
  • Included the relevant process-compose log (log location: process-compose info)
  • Included a [Minimal, Complete, and Verifiable example] (https://stackoverflow.com/help/mcve)

Version of process-compose:

Any version build with nix. Example nix build github:F1bonacc1/process-compose/main

OS environment:

Any linux distro

Steps or code to reproduce the issue:

  1. run nix build github:F1bonacc1/process-compose/main or install from nixpkgs
  2. ldd ./result/bin/process-compose

Expected result:

I would expect one of 2 things:

  1. The binary is reported as not a dynamic executable, this is the case with the binaries downloaded from https://github.com/F1bonacc1/process-compose/releases
  2. The binary has appropriate RUNPATH/RPATH that informs ld.so where to look for shared libraries

Actual result:

Running ldd on the nix built binary results in the following warnings and .so listings:

$ ldd /nix/store/dc6x42b1l0hyj3pskl1hp38y22j66gyh-process-compose-1.34.0/bin/process-compose 
/nix/store/dc6x42b1l0hyj3pskl1hp38y22j66gyh-process-compose-1.34.0/bin/process-compose: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /nix/store/dc6x42b1l0hyj3pskl1hp38y22j66gyh-process-compose-1.34.0/bin/process-compose)
/nix/store/dc6x42b1l0hyj3pskl1hp38y22j66gyh-process-compose-1.34.0/bin/process-compose: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/dc6x42b1l0hyj3pskl1hp38y22j66gyh-process-compose-1.34.0/bin/process-compose)
        linux-vdso.so.1 (0x00007fff5b1fc000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f57a7234000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f57a7060000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f57a7046000)
        /nix/store/apab5i73dqa09wx0q27b6fbhd1r18ihl-glibc-2.39-31/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f57a725b000)

readelf is missing RUNPATH

$ readelf -d ./result/bin/process-compose 

Dynamic section at offset 0xfe3aa0 contains 20 entries:
  Tag        Type                         Name/Value
 0x0000000000000004 (HASH)               0xf20b00
 0x0000000000000006 (SYMTAB)             0xf20ec0
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000005 (STRTAB)             0xf20be0
 0x000000000000000a (STRSZ)              709 (bytes)
 0x0000000000000007 (RELA)               0xf20628
 0x0000000000000008 (RELASZ)             24 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x0000000000000003 (PLTGOT)             0x13e3be0
 0x0000000000000015 (DEBUG)              0x0
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libresolv.so.2]
 0x000000006ffffffe (VERNEED)            0xf20aa0
 0x000000006fffffff (VERNEEDNUM)         1
 0x000000006ffffff0 (VERSYM)             0xf20a40
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000002 (PLTRELSZ)           1008 (bytes)
 0x0000000000000017 (JMPREL)             0xf20640
 0x0000000000000000 (NULL)               0x0
@F1bonacc1 F1bonacc1 added bug Something isn't working done Done, awaiting release labels Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done Done, awaiting release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants