OCaml Forge
SCM

Detail: [#1255] Incorrectly linked libcurl with when multiple versions are available

Issues: Browse | Download .csv | Monitor

[#1255] Incorrectly linked libcurl with when multiple versions are available

Date:
2013-02-07 20:56
Priority:
3
State:
Closed
Submitted by:
Hezekiah Carty (hcarty)
Assigned to:
ygrek (ygrek)
Resolution:
Fixed
Severity:
normal
Summary:
Incorrectly linked libcurl with when multiple versions are available

Detailed description
Found/tested on OCaml 3.12.1 64bit, RHEL 5

ocurl's configure script cuts pieces out of the 'curl-config --libs' output. This can result in linking against a different version of libcurl than the one curl-config points to.

For example, if you have a system libcurl under /usr and a custom version under $HOME,

curl-config --libs | cut -d ' ' -f 2-

will drop the -L$HOME/path/to/lib flag. This will cause the library to link against the system libcurl.so under /usr.

Followup

Message
Date: 2013-07-29 10:28
Sender: Hezekiah Carty

It is fixed in 0.5.6 - thank you!
Date: 2013-07-29 05:30
Sender: ygrek

Sorry, I didn't notice this report on time. Looks like it is fixed already in 0.5.6, please test. Thank you!
Date: 2013-02-25 18:37
Sender: Hezekiah Carty

A similar error occurs on CentOS 6 using the system libcurl packages. The pipe through 'cut' drops the -lcurl which breaks linking.
Date: 2013-02-07 21:13
Sender: Hezekiah Carty

And a patch against the latest master to implement the change.
Date: 2013-02-07 21:01
Sender: Hezekiah Carty

A local fix seems to be to drop the pipe to cut from line 9 of configure.in/line 1797 of configure (latest git revision in master as of February 2, 2013). I don't know why cut was included here originally or what other negative effects this could have for other users.

Attached Files:

Attachments:
ocurl-configure.patch

Changes:

Field Old Value Date By
status_idOpen2013-07-29 05:30ygrek
close_dateNone2013-07-29 05:30ygrek
assigned_tonone2013-07-29 05:30ygrek
ResolutionNone2013-07-29 05:30ygrek
File Added203: ocurl-configure.patch2013-02-07 21:13hcarty