curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Problem linking lib-cares

From: Jeffrey Walton via curl-library <curl-library_at_cool.haxx.se>
Date: Sat, 7 Mar 2020 17:29:28 -0500

On Sat, Mar 7, 2020 at 4:38 PM Ben Greear via curl-library
<curl-library_at_cool.haxx.se> wrote:
>
> On older platforms where libcares is old, it seems that my builds are broken
> because the -L/usr/lib comes before the -L that is generated with the --with-cares [dir]
> argument:
>
> From config.log:
>
> 21516 CPPFLAGS: -I/home/greearb/git/btbits/l4libs/c-ares.ct/include
> 21517 LDFLAGS: -L/usr/lib -L/home/greearb/git/btbits/l4libs/c-ares.ct/lib
>
> So, it is linking the OS library instead of the one I built from recent source.
>
> Any suggestions where to look to fix this? I think it must have been
> broken sometime in the last year or so, as builds worked fine before I
> rebased recently.

Set PKG_CONFIG_PATH to the location of your pkgconfig files. Autotools
will use the correct flags for the library.

Based on your LDFLAGS, I can't really tell what is should be. I'm not
clear on the directory structure in $HOME. If things were installed in
/usr/local, then the following would do it:

    # Everything goes into /usr/local
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    ./configure --prefix=/usr/local ...

Jeff
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-03-07