From: Matthias A. <mat...@gm...> - 2022-04-01 16:43:50
|
Am 30.03.22 um 19:08 schrieb Dennis Putnam: > Hi Matthias, > > Openssl 3 seemed to install correctly or at least it passed 'make > test'. However, I am not able to run it as I get this: > > >/opt/openssl3/bin/openssl version > /opt/openssl3/bin/openssl: error while loading shared libraries: > libssl.so.3: cannot open shared object file: No such file or directory > > It appears a library did not get built or put in the right place. > Unless I am missing a prereq but then I would have expected the test > to have failed. > The cause is rather that the RPATH has not made it into the output files, so the run-time linker does not know where to find libssl.so.3. You can use readelf -d or objdump -p + some ELF executable to figure, example below. So, sorry for the confusion. I have just taken the time to tweak for Fedora 35, and I figured that the -Wl,-rpath isn't trivially passed through, but requires a specific syntax (see NOTES-UNIX.md) to be recognized and not silently ignored. For Fedora Linux 35 on amd64, I also figured that the default output directory would be /opt/openssl3/lib64 (mind the 64). > $ readelf -d /opt/openssl3/bin/openssl > > Dynamic section at offset 0xc1da8 contains 27 entries: > Tag Type Name/Value > 0x0000000000000001 (NEEDED) Shared library: [libssl.so.3] > 0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.3] > 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] > 0x000000000000001d (RUNPATH) Library runpath: > [/opt/openssl3/lib64] > ... On Fedora 35, I received a successful build and working install with (note comma, not assignment/equals, between -Wl,-rpath and the path): > mkdir _build > cd _build > ../config --prefix=/opt/openssl3 -Wl,-rpath,/opt/openssl3/lib64 > --openssldir=/etc/pki/tls > make -j8 > sudo make -j8 install adjust -j8 to -j followed by the number of availble CPU threads. This, for me on Fedora 35, yields an openssl that works, with /opt/openssl3/bin/openssl version -a /opt/openssl3/bin/openssl s_client -connect fetchmail.sourceforge.io:443 -CAfile /etc/ssl/certs/ca-bundle.trust.crt -verify 5 HTH. Regards, Matthias |