bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH] Add libraries to Makefiles.


From: Svante Signell
Subject: Re: [PATCH] Add libraries to Makefiles.
Date: Fri, 20 Jan 2023 12:18:58 +0100
User-agent: Evolution 3.42.0-2

On Wed, 2023-01-18 at 12:41 +0100, Samuel Thibault wrote:


> I'm not talking about libz.so, but about libstore.so. Is that
> libstore.so really a shared library that has libz in NEEDED? If so
> there is really no need to add -lz to linking storeio. Unless you
> actually send us the actual error message you get without an explicit
> -lz, we can't know why you'd have to add -lz.
> 

I compiled hurd-git natively, and no patches for zlib were needed. 

However cross-building errors out:
/cross-tools/bin/i686-pc-gnu-gcc -shared -Wl,-soname=libstore.so.0.3 -o
libstore.so.0.3 \
      -L. -L../libfshelp/ -L../libihash/ -L../libiohelp/ -L../libpager/
-L../libports/ -L../libshouldbeinlibc/ -Wl,-rpath-link=../libfshelp/ -
Wl,-rpath-link=../libihash/ -Wl,-rpath-link=../libiohelp/ -Wl,-rpath-
link=../libpager/ -Wl,-rpath-link=../libports/ -Wl,-rpath-
link=../libshouldbeinlibc/ -std=gnu99 -fgnu89-inline -Wall -g -O3 -fno-
strict-aliasing  -g -O2 -Wl,-verbose,-L/tools/lib \
      '-Wl,-(' create_pic.o derive_pic.o make_pic.o rdwr_pic.o
set_pic.o enc_pic.o encode_pic.o decode_pic.o clone_pic.o argp_pic.o
kids_pic.o flags_pic.o open_pic.o xinl_pic.o typed_pic.o map_pic.o
url_pic.o unknown_pic.o stripe_pic.o copy_pic.o device_pic.o file_pic.o
memobj_pic.o module_pic.o mvol_pic.o nbd_pic.o remap_pic.o task_pic.o
zero_pic.o gunzip_pic.o do-gunzip_pic.o util_pic.o
../libshouldbeinlibc/libshouldbeinlibc.so \
                -ldl -lpthread  -lz \
      '-Wl,-)' 

libz.so needed by ../libstore/libstore.so
...
/cross-tools/lib/gcc/i686-pc-gnu/12.2.0/../../../../i686-pc-gnu/bin/ld:
warning: libz.so, needed by ../libstore/libstore.so, not found (try
using -rpath or -rpath-link)

Adding -Wl,-rpath-link,$TARGET_ROOT/lib to LDFLAGS fixes the problem.

Thanks!



reply via email to

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