[GHC] #9498: GHC links against unversioned .so files
GHC
ghc-devs at haskell.org
Fri Nov 14 17:56:43 UTC 2014
#9498: GHC links against unversioned .so files
-------------------------------------+-------------------------------------
Reporter: Kritzefitz | Owner:
Type: feature | Status: new
request | Milestone:
Priority: low | Version: 7.6.3
Component: Compiler | Keywords: Debian
(FFI) | Architecture: Unknown/Multiple
Resolution: | Difficulty: Unknown
Operating System: Linux | Blocked By:
Type of failure: Other | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by Kritzefitz):
I will demonstrate with the curl package:
Assuming I have installed the libcurl3 package but not the libcurl-dev
package.
This means I have the following shared libraries belonging to curl
installed:
/usr/lib/i386-linux-gnu/libcurl-gnutls.so.3
/usr/lib/i386-linux-gnu/libcurl.so.3
(I actually have some curl version 4 libraries installed, but those
shouldn't matter now.)
Then I start ghci and try to use curl:
{{{
$ ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> import Network.Curl
Prelude Network.Curl> curlGet "http://weltraumschlangen.de/" []
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package containers-0.5.0.0 ... linking ... done.
Loading package curl-1.3.8 ... can't load .so/.DLL for: libcurl.so
(libcurl.so: cannot open shared object file: No such file or directory)
Prelude Network.Curl>
}}}
So it seems it tries to load libcurl.so, which is contained in libcurl-
dev, instead of libcurl.so.3.
It's not working when compiling a file either:
test.hs:
{{{
import Network.Curl
main = curlGet "http://weltraumschlangen.de/" []
}}}
compiling:
{{{
$ ghc --make test.hs
[1 of 1] Compiling Main ( test.hs, test.o )
Linking test ...
/usr/bin/ld: cannot find -lcurl
collect2: error: ld returned 1 exit status
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9498#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list