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 you 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.

My bad, I was in the wrong directory... The last <.> line from .work.log works 
fine in the work/openssl-3.3.1/ directory, no errors:

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) 
COMPILER_PATH=/usr/pkg/gcc7/libexec/gcc/x86_64--netbsd/7.5.0/:/usr/pkg/gcc7/
libexec/gcc/x86_64--netbsd/7.5.0/:/usr/pkg/gcc7/libexec/gcc/x86_64--netbsd/:/
usr/pkg/gcc7/lib/gcc/x86_64--netbsd/7.5.0/:/usr/pkg/gcc7/lib/gcc/x86_64--
netbsd/
LIBRARY_PATH=/usr/pkg/gcc7/lib/gcc/x86_64--netbsd/7.5.0/:/usr/pkg/gcc7/lib/
gcc/x86_64--netbsd/7.5.0/../../../../x86_64--netbsd/lib/:/usr/pkg/gcc7/lib/
gcc/x86_64--netbsd/7.5.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-fcommon' '-fstack-protector-strong' '-D' 
'_FORTIFY_SOURCE=2' '-fPIC' '-pthread' '-O2' '-I' '/usr/pkgsrc/security/
openssl/work/.buildlink/include' '-L/usr/pkg/gcc7/lib/gcc/x86_64--netbsd/
7.5.0' '-L/usr/pkgsrc/security/openssl/work/.buildlink/lib' '-o' 'test/
asn1_internal_test' '-pthread' '-pie' '-mtune=nocona' '-march=nocona'
 /usr/pkg/gcc7/libexec/gcc/x86_64--netbsd/7.5.0/collect2 -plugin /usr/pkg/
gcc7/libexec/gcc/x86_64--netbsd/7.5.0/liblto_plugin.so -plugin-opt=/usr/pkg/
gcc7/libexec/gcc/x86_64--netbsd/7.5.0/lto-wrapper -plugin-opt=-fresolution=/
tmp//cctMosN3.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-
lgcc_s -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -
plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-
hdr -dc -dp -e _start -dynamic-linker /usr/libexec/ld.elf_so -pie -o test/
asn1_internal_test /usr/lib/crt0.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/
pkg/gcc7/lib/gcc/x86_64--netbsd/7.5.0 -L/usr/pkgsrc/security/openssl/
work/.buildlink/lib -L/usr/pkg/gcc7/lib/gcc/x86_64--netbsd/7.5.0 -L/usr/pkg/
gcc7/lib/gcc/x86_64--netbsd/7.5.0/../../../../x86_64--netbsd/lib -L/usr/pkg/
gcc7/lib/gcc/x86_64--netbsd/7.5.0/../../.. -R/usr/pkg/gcc7/x86_64--netbsd/
lib/. -R/usr/pkg/gcc7/lib/. -zrelro -rpath /usr/pkg/gcc7/lib/gcc/x86_64--
netbsd/7.5.0 -zrelro -rpath /usr/pkg/lib test/asn1_internal_test-bin-
asn1_internal_test.o test/libtestutil.a libcrypto.a -lgcc --as-needed -lgcc_s 
--no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/
lib/crtend.o /usr/lib/crtn.o
COLLECT_GCC_OPTIONS='-v' '-fcommon' '-fstack-protector-strong' '-D' 
'_FORTIFY_SOURCE=2' '-fPIC' '-pthread' '-O2' '-I' '/usr/pkgsrc/security/
openssl/work/.buildlink/include' '-L/usr/pkg/gcc7/lib/gcc/x86_64--netbsd/
7.5.0' '-L/usr/pkgsrc/security/openssl/work/.buildlink/lib' '-o' 'test/
asn1_internal_test' '-pthread' '-pie' '-mtune=nocona' '-march=nocona'

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



Home | Main Index | Thread Index | Old Index