Кросс-компиляция curl с помощью zlib: проверка gzread в -lz ... НЕТ - PullRequest
1 голос
/ 17 апреля 2019

Я задал вопрос о создании curl с openssl недавно.Это решено, и теперь я встретил еще одну проблему с Zlib.

1.build Zlib

git clone https://github.com/madler/zlib.git -b v1.2.11 --depth 1 zlib-1.2.11
cd zlib-1.2.11
CC=arm-linux-gnueabihf ./configure --prefix=/usr
make -j$(nproc)
make DESTDIR=../armhf install

2.Build curl

git clone https://github.com/curl/curl.git -b curl-7_64_1 --depth 1 curl-7.64.1
cd curl-7.64.1
./buildconf

Тогда:

$ /configure --host=arm-linux-gnueabihf --prefix=/usr --with-ssl=(realpath ../armhf/usr) --with-zlib=(realpath ../armhf/usr)
...
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for gzread in -lz... no
configure: WARNING: configure found only the libz header file, not the lib!
...

Я проверил:

$ arm-linux-gnueabihf-readelf -Ws ../armhf/usr/lib/libz.so | grep gzread
    53: 0000000000013060   642 FUNC    GLOBAL DEFAULT   13 gzread
    81: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS gzread.c
   186: 0000000000013060   642 FUNC    GLOBAL DEFAULT   13 gzread

$ file ../armhf/usr/lib/libz.so
../armhf/usr/lib/libz.so: symbolic link to libz.so.1.2.11
$ file ../armhf/usr/lib/libz.so.1.2.11 
../armhf/usr/lib/libz.so.1.2.11: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=6ee28b2de2613b77eed48b12ebf9c42286d00d79, not stripped

Почему curl не нашел gzread в -lz?

...