-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Description
I did this
When building --with-libssh2 a minor warning is triggered during the configure process where the "-L" specification erroneously gets added to LIBS. Also "-lssh2" appears twice (some other libraries like ssl+crypto, zstd, z, and brotlidec also appear multiple times for some reason, but that doesn't trigger warnings at least.)
$ ./configure \
--prefix=/usr/local/mystuff/curl/8.2.1 \
--with-openssl \
--with-libssh2 \
--with-brotli \
…
->
…
configure: using LIBS: -lcares -lnghttp2 -lidn2 -lrtmp -lz -lssl -lcrypto -lssh2 -L/usr/local/mystuff/libssh2/latest/lib -lssh2 -lssl -lcrypto -lssl -lcrypto -lzstd -lzstd -lbrotlidec -lbrotlidec -lz -lpsl -lgsasl
configure: LIBS note: LIBS should only be used to specify libraries (-lname).
configure: WARNING: Continuing even with errors mentioned immediately above this line.
…
The specifications only can get generated via the pkg-config system (I only hotlink the .pc files in /usr/local/lib/pkgconfig, and nothing else directly in the standard paths). So I'm guessing the configure script itself causes the problem. Maybe it is not using the correct --libs-only-l?
$ pkg-config --libs libssh2
-L/usr/local/mystuff/libssh2/latest/lib -lssh2
$ pkg-config --libs-only-l libssh2
-lssh2
$ pkg-config --libs-only-L libssh2
-L/usr/local/mystuff/libssh2/latest/lib
This pretty matches what other libs, like nghttp2, etc., are providing there too. And those don't trigger this faux pas.
I expected the following
…
configure: using LIBS: -lcares -lnghttp2 -lidn2 -lrtmp -lssl -lcrypto -lssh2 -lzstd -lbrotlidec -lz -lpsl -lgsasl
…
curl/libcurl version
curl 8.2.1
operating system
Mac OS X 10.10.5 (Yosemite)