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 of "ipv6calc" is not working in case of OpenSSL EVP or libmd MD5 is used #29

Open
pbiering opened this issue Sep 16, 2021 · 3 comments

Comments

@pbiering
Copy link
Owner

pbiering commented Sep 16, 2021

current "master" contains now support for OpenSSL 3 which deprecated the really old MD5 functions.

But after switching to new EVP MD5 functions, static build reports a warning, don't know how to solve this proper.

$ gcc -o ipv6calc-static ipv6calc.o showinfo.o ipv6calchelp_local.o  -L../lib/ -L../databases/lib/ -lipv6calc_db_wrapper -lipv6calc    -lm -lpthread -lc -lcrypto -ldl -lz  -static
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/libcrypto.a(fips.o): in function `verify_checksums':
(.text+0x4e6): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/libcrypto.a(b_addr.o): in function `BIO_lookup_ex':
(.text+0xd35): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/libcrypto.a(b_sock.o): in function `BIO_gethostbyname':
(.text+0x75): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
@paravoid
Copy link

paravoid commented Dec 2, 2023

A tiny bit off-topic, but have you considered just using libmd?
https://www.hadrons.org/software/libmd/

The API is really similar to OpenSSL's (basically, s/MD5_/MD5/', e.g. MD5_Init->MD5Init`). It's a dependency of dpkg's (and written by the same author) so guaranteed to be present in Debian/Ubuntu systems.

It's a port of code found in the BSDs. On those systems it'd be unnecessary, as the base system already supports these functions.

Honestly if I were you, I'd just switch to it and remove all OpenSSL support + both embedded copies.

@pbiering
Copy link
Owner Author

pbiering commented Dec 5, 2023

Thank you for the hint using libmd, for now optional support implemented by cf02e4d

Found that at least on Fedora Linux 39 also libmd misses support for static build.

@paravoid
Copy link

paravoid commented Dec 5, 2023

Awesome :)

@pbiering pbiering changed the title static build of "ipv6calc" is not working in case of OpenSSL EVP MD5 is used static build of "ipv6calc" is not working in case of OpenSSL EVP or libmd MD5 is used Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants