cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Compile error: libtool: link: require no space between `-L' and `-lssl3' after adding nss support

From: xufeng zhang <xufeng.zhang_at_windriver.com>
Date: Mon, 29 Nov 2010 16:50:10 +0800

Thanks for your reply.

On 11/29/2010 04:33 PM, Kamil Dudka wrote:
> On Monday 29 November 2010 04:18:24 xufeng zhang wrote:
>
>> Take a loot at the LIBCURL_LIBS flags in lib/Makefile, it is:
>> LIBCURL_LIBS = -lidn -lrt -lz -Wl,-rpath-link, -L -lssl3 -lsmime3 -lnss3
>> -lnssutil3
>> I find there is am empty space between "-rpath-link," and "-L".
>>
> The problem is that -L gets no argument.
>
I see, but it should get argument, when I run 'nss-config --libs' in the
terminal:
    \> nss-config --libs
      -Wl,-rpath-link,/usr/lib64 -L/usr/lib64 -lssl3 -lsmime3 -lnss3
-lnssutil3
>
>> Here is what I do to resolve the problem:
>> 1. After I remove the empty space, compile can be successful.
>> 2. I know where the "-Wl,-rpath-link, -L -lssl3 -lsmime3 -lnss3
>> -lnssutil3" added to LIBCURL_LIBS,
>> in configure.ac, I find this:
>> addlib=`nss-config --libs`
>> LIBS="$LIBS $addlib"
>> 3. when run 'nss-config --libs' under terminal, the output is:
>> -Wl,-rpath-link,/usr/lib64 -L/usr/lib64 -lssl3 -lsmime3 -lnss3
>> -lnssutil3
>> 4. Below the above analysis, I think "/usr/lib64" may be stripped from
>> 'nss-config --libs' output,
>>
> How? I don't see any code that strips /usr/lib64 in configure.ac.
>
yeah, it's just a guess, I'm not very sure.
>
>> and it maybe in curl.spec file, however, After I remove
>> "/usr/lib64" from "sed -i -e 's,-L/usr/lib ,,g;s,-L/usr/lib64
>> ,,g;s,-L/usr/lib$,,g;s,-L/usr/lib64$,,g' Makefile libcurl.pc",
>> it still can't works.
>>
> Which curl.spec? There is no sed in the curl.spec we provide.
>
I got curl.spec file from curl-7.20.0-4.fc13.src.rpm, and below is
the configure part:
%configure --without-ssl --with-nss --enable-ipv6 \
         --with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt \
         --with-gssapi=%{_prefix}/kerberos --with-libidn \
         --enable-ldaps --disable-static --with-libssh2 --enable-manual
--enable-ares
sed -i -e 's,-L/usr/lib ,,g;s,-L/usr/lib64
,,g;s,-L/usr/lib$,,g;s,-L/usr/lib64$,,g' \
         Makefile libcurl.pc

# uncomment to turn off optimizations
# find -name Makefile | xargs sed -i 's/-O2/-O0/'

# Remove bogus rpath
sed -i \
         -e
's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
         -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

Thanks,
Xufeng Zhang
> Kamil
>
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-29