[CentOS] curl build system is broken and so is mock

Thu Aug 4 01:57:41 UTC 2016
Chris Adams <linux at cmadams.net>

Once upon a time, Alice Wonder <alice at domblogger.net> said:
> So when building curl, it links curl against the libcurl in the
> buildroot and not against the libcurl it just compiled?
> 
> No other packages I know of do that.

No, that is not what it does.  If you posted the full ldd output like I
asked, rather than grepping out bits, you'd see it loading the system
libcurl.

When you run ldd against an arbitrary binary, ldd uses the system
directories to resolve dependencies.  The libcurl you just built is not
in any of those directories, but the system libcurl (that is linked
against libssh2, which pulls in libssl/libcrypto) is.  The dynamic
linker uses the library it can find.

If you want to use a different library, you have to specify the path.
If you look at curl.spec, you will see it set LD_LIBRARY_PATH before
running tests, so that it gets its newly-built libcurl dependency.

There is absolutely nothing magic or broken in curl, its build setup, or
mock.

-- 
Chris Adams <linux at cmadams.net>