pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Building OpenSSL 3.3.1 links with system libcrypto and libssl



On Monday, 30 September 2024 16.41.54 CEST Jonathan Perkin wrote:
> * On 2024-09-30 at 15:18 BST, Mads Rasmussen wrote:
> >I am going to hammer on this, until its resolved. I think the issues with
> >the order of -L parameters and the presence of /usr/local/lib should be
> >resolved,
> Before this thread descends any further, it must be pointed out that
> just because the output may show /usr/local/lib it does not mean that
> the path is actually being used.
> 
> pkgsrc uses compiler wrappers to transform all input command
> lines and modify them based on a number of different parameters.  If you
> look at .work.log in the work directory you will see lines that start:
> 
>   [*] ...
> 
> followed by lines that start:
> 
>   <.> ...
> 
> The first one is the unmodified command line which probably matches the
> one that you are looking at in the output.  The second one is the
> transformed one that is actually being executed, and it will almost
> certainly not include /usr/local/lib.
> 
> You should also see that buildlink reordered paths so that the buildlink
> library directory comes first, and the symlinks inside that directory
> are configured to point to either the native or pkgsrc versions of each
> library dependency.
> 
> This is fundamental to how pkgsrc works to ensure that when you select a
> builtin or a pkgsrc version of something, it is actually used correctly
> and doesn't just happen by random.  If this _isn't_ working, then it's a
> serious bug.
> 
> One thing that can happen when you use a bootstrapped compiler from
> pkgsrc is that even with the wrappers in place, depending on how the
> compiler is configured it can still pull in things from places we've
> tried to tell it not to look.  You may want to start there, e.g. copy
> pasting the <.> commands from the work log and adding -v and seeing what
> the search path ordering is.

The last <.> line from .work.log gives me this (with the gcc -v option):

gcc: error: fuzz/quic-rcidm-test-bin-fuzz_rand.o: No such file or directory
gcc: error: fuzz/quic-rcidm-test-bin-quic-rcidm.o: No such file or directory
gcc: error: fuzz/quic-rcidm-test-bin-test-corpus.o: No such file or directory
gcc: error: libssl.a: No such file or directory
gcc: error: libcrypto.a: No such file or directory
Using built-in specs.
COLLECT_GCC=/usr/pkgsrc/security/openssl/work/.gcc/bin/gcc
COLLECT_LTO_WRAPPER=/usr/pkg/gcc7/libexec/gcc/x86_64--netbsd/7.5.0/lto-wrapper
Target: x86_64--netbsd
Configured with: ../gcc-7.5.0/configure --disable-libstdcxx-pch --enable-nls 
--with-libiconv-prefix=/usr --enable-__cxa_atexit --with-gxx-include-dir=/usr/
pkg/gcc7/include/c++/ --disable-libssp --enable-languages='c obj-c++ objc 
fortran c++' --enable-shared --enable-long-long --with-local-prefix=/usr/pkg/
gcc7 --enable-threads=posix --with-boot-ldflags='-static-libstdc++ -static-
libgcc -Wl,-R/usr/pkg/lib -Wl,-zrelro ' --with-arch=nocona --with-tune=nocona 
--with-fpmath=sse --with-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as --with-
as=/usr/bin/as --prefix=/usr/pkg/gcc7 --build=x86_64--netbsd --host=x86_64--
netbsd --infodir=/usr/pkg/gcc7/info --mandir=/usr/pkg/gcc7/man
Thread model: posix
gcc version 7.5.0 (GCC) 

This is the line from .work.log:

/usr/pkgsrc/security/openssl/work/.gcc/bin/gcc -fcommon -fstack-protector-
strong -D_FORTIFY_SOURCE=2 -Wl,-zrelro -fPIC -pthread -Wa,--noexecstack -O2 -
O3 -pipe -I/usr/pkgsrc/security/openssl/work/.buildlink/include -L/usr/pkg/
gcc7/lib/gcc/x86_64--netbsd/7.5.0 -Wl,-rpath,/usr/pkg/gcc7/lib/gcc/x86_64--
netbsd/7.5.0 -Wl,-zrelro -L/usr/pkgsrc/security/openssl/work/.buildlink/lib -
Wl,-rpath,/usr/pkg/lib -o fuzz/quic-rcidm-test fuzz/quic-rcidm-test-bin-
fuzz_rand.o fuzz/quic-rcidm-test-bin-quic-rcidm.o fuzz/quic-rcidm-test-bin-
test-corpus.o libssl.a libcrypto.a -pthread -pie

I will try to make sense of this, and how and why its different from the 
errors reported by the make output

Attachment: signature.asc
Description: This is a digitally signed message part.



Home | Main Index | Thread Index | Old Index