bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH] build: Fix shared build with gcc-7.


From: Samuel Thibault
Subject: Re: [PATCH] build: Fix shared build with gcc-7.
Date: Sat, 14 Mar 2020 17:07:57 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Hello,

Jan Nieuwenhuizen, le sam. 14 mars 2020 11:35:18 +0100, a ecrit:
> i586-pc-gnu-gcc -L. -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libbpf/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libcons/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libdiskfs/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libfshelp/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libftpconn/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libhurdbugaddr/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libhurd-slab/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libihash/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libiohelp/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libnetfs/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libpager/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libpipe/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libports/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libps/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libshouldbeinlibc/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libstore/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libthreads/ 
> -L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libtrivfs/ -std=gnu99 
> -fgnu89-inline -Wall -g -O3 -fno-strict-aliasing  -g -O2  
> -Wl,-rpath=/gnu/store/fx77mhyfi9mx0ihg1wi76gxpfqsyi0vn-hurd-0.9-1.91a5167/lib 
>  -uargp_program_bug_address -o test-fcntl \
>               test-fcntl.o \
>       '-Wl,-(' ../libhurdbugaddr/libhurdbugaddr.so ../libfshelp/libfshelp.so \
>               -lpthread \
>       '-Wl,-)'
> i586-pc-gnu-ld: warning: libshouldbeinlibc.so.0.3, needed by 
> ../libfshelp/libfshelp.so, not found (try using -rpath or -rpath-link)

? One shouldn't need to add rpaths for this to succeed, -L
should be more than enough.  What seems odd in your build log is
-L/tmp/guix-build-hurd-0.9-1.91a5167.drv-0/source/libshouldbeinlibc/
which seems to be pointing to the source instead of the build tree. I
guess that's where something needs to be fixed.  When I build the Hurd,
I'd have something like this instead:

gcc -L. -L../libihash/ -L../libports/ -L../libiohelp/ -L../libhurdbugaddr/ 
-L../libshouldbeinlibc/ -L../libfshelp/ -std=gnu99 -fgnu89-inline -Wall -g -O3 
-fno-strict-aliasing  -g -O2    -uargp_program_bug_address -o test-fcntl \
              test-fcntl.o \
      '-Wl,-(' ../libhurdbugaddr/libhurdbugaddr.so ../libfshelp/libfshelp.so \
                -lpthread \
      '-Wl,-)'

and then gcc can find libshouldbeinlibc.so.0.3 in ../libshouldbeinlibc/
as expected.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]