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

static build produces dynamic-linked file(monero-wallet-cli) #9563

Open
dtcomp opened this issue Nov 11, 2024 · 3 comments
Open

static build produces dynamic-linked file(monero-wallet-cli) #9563

dtcomp opened this issue Nov 11, 2024 · 3 comments
Labels

Comments

@dtcomp
Copy link

dtcomp commented Nov 11, 2024

I wanted to build a static monero-wallet-cli.
The compile finished, but apparently products are not static:

make -j6 release-static-linux-x86_64
cd build/Linux/_HEAD_detached_at_v0.18.3.4_/release/bin/
file monero-wallet-cli 
monero-wallet-cli: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=0c9d04df7b181472cef6d098b03b97d745192356, for GNU/Linux 3.2.0, with debug_info, not stripped

Linux bookworm 6.1.0-27-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) x86_64 GNU/Linux

@0xFFFC0000
Copy link
Collaborator

Can you run ldd on your binary and put the results here.

E.g.

image

@dtcomp
Copy link
Author

dtcomp commented Nov 11, 2024

ldd monero-wallet-cli
linux-vdso.so.1 (0x00007ffc1435a000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f9e6624f000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9e64b21000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9e64940000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9e66289000)
Debian Bookworm

@dtcomp
Copy link
Author

dtcomp commented Nov 12, 2024

It looks like 2 libs prevent static link - libudev and libgssapi_krb5.
It was simple to get a static libudev, but still working on libgssapi_krb5.
update: mebbe not worth the bother: the above-mentioned libs define the same function (memdup) - so link-time errors...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants