Linker cannot find Parsec library

I am trying to do some web scraping using HXT , but one dependency hxt-regex-xmlschema-9.2.0

always fails. Error ld: library not found for -lHSparsec-3.1.7-ghc7.8.3

. I don't understand why the connection is not working. I have parsec installed - cabal install parsec-3.1.7

worked fine. I am running OSX 10.10.1, GHC 7.8.3 and gcc 4.9.1.

EDIT: Output from cabal install hxt-regex-xmlschema-9.2.0

:

Configuring hxt-regex-xmlschema-9.2.0...
Dependency base ==4.7.0.1: using base-4.7.0.1
Dependency bytestring ==0.10.4.0: using bytestring-0.10.4.0
Dependency hxt-charproperties ==9.2.0.0: using hxt-charproperties-9.2.0.0
Dependency parsec ==3.1.7: using parsec-3.1.7
Dependency text ==1.2.0.3: using text-1.2.0.3
/usr/local/bin/ghc --info
Using Cabal-1.18.1.4 compiled by ghc-7.8
Using compiler: ghc-7.8.3
Using install prefix: /Users/rjayatilleka/.cabal
Binaries installed in: /Users/rjayatilleka/.cabal/bin
Libraries installed in:
/Users/rjayatilleka/.cabal/lib/x86_64-osx-ghc-7.8.3/hxt-regex-xmlschema-9.2.0
Private binaries installed in: /Users/rjayatilleka/.cabal/libexec
Data files installed in:
/Users/rjayatilleka/.cabal/share/x86_64-osx-ghc-7.8.3/hxt-regex-xmlschema-9.2.0
Documentation installed in:
/Users/rjayatilleka/.cabal/share/doc/x86_64-osx-ghc-7.8.3/hxt-regex-xmlschema-9.2.0
Configuration files installed in: /Users/rjayatilleka/.cabal/etc
Using alex version 3.0.5 found on system at: /usr/local/bin/alex
Using ar found on system at: /usr/bin/ar
Using c2hs version 0.17.2 found on system at:
/Users/rjayatilleka/.cabal/bin/c2hs
Using cpphs version 1.18.5 found on system at:
/Users/rjayatilleka/.cabal/bin/cpphs
No ffihugs found
Using gcc version 4.9.1 found on system at: /usr/local/bin/gcc
Using ghc version 7.8.3 found on system at: /usr/local/bin/ghc
Using ghc-pkg version 7.8.3 found on system at: /usr/local/bin/ghc-pkg
No greencard found
Using haddock version 2.14.3 found on system at: /usr/local/bin/haddock
Using happy version 1.18.10 found on system at: /usr/local/bin/happy
No hmake found
Using hpc version 0.67 found on system at: /usr/local/bin/hpc
Using hsc2hs version 0.67 found on system at: /usr/local/bin/hsc2hs
Using hscolour version 1.20 found on system at:
/Users/rjayatilleka/.cabal/bin/HsColour
No hugs found
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
No nhc98 found
Using pkg-config version 0.28 found on system at: /usr/local/bin/pkg-config
Using ranlib found on system at: /usr/bin/ranlib
Using strip found on system at: /usr/bin/strip
Using tar found on system at: /usr/bin/tar
No uhc found
Component build order: library
creating dist/build
creating dist/build/autogen
Building hxt-regex-xmlschema-9.2.0...
Preprocessing library hxt-regex-xmlschema-9.2.0...
Building library...
/usr/local/bin/ghc --info
/usr/local/bin/ghc --info
creating dist/build
/usr/local/bin/ghc --make -fbuilding-cabal-package -O -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -isrc -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -package-name hxt-regex-xmlschema-9.2.0 -hide-all-packages -package-db dist/package.conf.inplace -package-id base-4.7.0.1-c64d224738ec7af4085e89ca9c12c37b -package-id bytestring-0.10.4.0-18fe2f3ce284617c82da1702e16772cf -package-id hxt-charproperties-9.2.0.0-36acaa39288f4b2bce2f5dc5cd48c479 -package-id parsec-3.1.7-764aedfe24d8f24850146ae17e380232 -package-id text-1.2.0.3-ebea8c0126422e0e6e5e972676f2f18d -XHaskell2010 Text.Regex.Glob.String Text.Regex.Glob.Generic Text.Regex.Glob.Generic.RegexParser Text.Regex.XMLSchema.String Text.Regex.XMLSchema.Generic Text.Regex.XMLSchema.Generic.Matching Text.Regex.XMLSchema.Generic.RegexParser Text.Regex.XMLSchema.Generic.Regex Text.Regex.XMLSchema.Generic.StringLike -threaded -rtsopts -Wall -fwarn-tabs -funbox-strict-fields
[1 of 9] Compiling Text.Regex.XMLSchema.Generic.StringLike ( src/Text/Regex/XMLSchema/Generic/StringLike.hs, dist/build/Text/Regex/XMLSchema/Generic/StringLike.o )
[2 of 9] Compiling Text.Regex.XMLSchema.Generic.Regex ( src/Text/Regex/XMLSchema/Generic/Regex.hs, dist/build/Text/Regex/XMLSchema/Generic/Regex.o )
[3 of 9] Compiling Text.Regex.XMLSchema.Generic.RegexParser ( src/Text/Regex/XMLSchema/Generic/RegexParser.hs, dist/build/Text/Regex/XMLSchema/Generic/RegexParser.o )
[4 of 9] Compiling Text.Regex.XMLSchema.Generic.Matching ( src/Text/Regex/XMLSchema/Generic/Matching.hs, dist/build/Text/Regex/XMLSchema/Generic/Matching.o )
[5 of 9] Compiling Text.Regex.XMLSchema.Generic ( src/Text/Regex/XMLSchema/Generic.hs, dist/build/Text/Regex/XMLSchema/Generic.o )
[6 of 9] Compiling Text.Regex.XMLSchema.String ( src/Text/Regex/XMLSchema/String.hs, dist/build/Text/Regex/XMLSchema/String.o )
[7 of 9] Compiling Text.Regex.Glob.Generic.RegexParser ( src/Text/Regex/Glob/Generic/RegexParser.hs, dist/build/Text/Regex/Glob/Generic/RegexParser.o )
[8 of 9] Compiling Text.Regex.Glob.Generic ( src/Text/Regex/Glob/Generic.hs, dist/build/Text/Regex/Glob/Generic.o )
[9 of 9] Compiling Text.Regex.Glob.String ( src/Text/Regex/Glob/String.hs, dist/build/Text/Regex/Glob/String.o )
Linking...
/usr/bin/ar -r -s dist/build/libHShxt-regex-xmlschema-9.2.0.a dist/build/Text/Regex/Glob/String.o dist/build/Text/Regex/Glob/Generic.o dist/build/Text/Regex/Glob/Generic/RegexParser.o dist/build/Text/Regex/XMLSchema/String.o dist/build/Text/Regex/XMLSchema/Generic.o dist/build/Text/Regex/XMLSchema/Generic/Matching.o dist/build/Text/Regex/XMLSchema/Generic/RegexParser.o dist/build/Text/Regex/XMLSchema/Generic/Regex.o dist/build/Text/Regex/XMLSchema/Generic/StringLike.o
ar: creating archive dist/build/libHShxt-regex-xmlschema-9.2.0.a
/usr/local/bin/ghc -shared -dynamic -package-name hxt-regex-xmlschema-9.2.0 -no-auto-link-packages -package-db dist/package.conf.inplace -package-id base-4.7.0.1-c64d224738ec7af4085e89ca9c12c37b -package-id bytestring-0.10.4.0-18fe2f3ce284617c82da1702e16772cf -package-id hxt-charproperties-9.2.0.0-36acaa39288f4b2bce2f5dc5cd48c479 -package-id parsec-3.1.7-764aedfe24d8f24850146ae17e380232 -package-id text-1.2.0.3-ebea8c0126422e0e6e5e972676f2f18d dist/build/Text/Regex/Glob/String.dyn_o dist/build/Text/Regex/Glob/Generic.dyn_o dist/build/Text/Regex/Glob/Generic/RegexParser.dyn_o dist/build/Text/Regex/XMLSchema/String.dyn_o dist/build/Text/Regex/XMLSchema/Generic.dyn_o dist/build/Text/Regex/XMLSchema/Generic/Matching.dyn_o dist/build/Text/Regex/XMLSchema/Generic/RegexParser.dyn_o dist/build/Text/Regex/XMLSchema/Generic/Regex.dyn_o dist/build/Text/Regex/XMLSchema/Generic/StringLike.dyn_o -o dist/build/libHShxt-regex-xmlschema-9.2.0-ghc7.8.3.dylib
ld: library not found for -lHSparsec-3.1.7-ghc7.8.3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Ready to install hxt-regex-xmlschema-9.2.0
Waiting for install task to finish...
Extracting
/Users/rjayatilleka/.cabal/packages/hackage.haskell.org/hxt-regex-xmlschema/9.2.0/hxt-regex-xmlschema-9.2.0.tar.gz
to
/var/folders/71/k93g7g992nlf9t6mkqbykv600000gn/T/hxt-regex-xmlschema-9.2.0-64074...
Updating hxt-regex-xmlschema.cabal with the latest revision from the index.
creating
/var/folders/71/k93g7g992nlf9t6mkqbykv600000gn/T/hxt-regex-xmlschema-9.2.0-64074/hxt-regex-xmlschema-9.2.0/dist/setup
creating
/var/folders/71/k93g7g992nlf9t6mkqbykv600000gn/T/hxt-regex-xmlschema-9.2.0-64074/hxt-regex-xmlschema-9.2.0/dist
creating
/var/folders/71/k93g7g992nlf9t6mkqbykv600000gn/T/hxt-regex-xmlschema-9.2.0-64074/hxt-regex-xmlschema-9.2.0/dist/setup
/Users/rjayatilleka/.cabal/setup-exe-cache/setup-Cabal-1.18.1.4-ghc-7.8.3
configure --verbose=2 --ghc --prefix=/Users/rjayatilleka/.cabal --user
--constraint=text ==1.2.0.3 --constraint=parsec ==3.1.7
--constraint=hxt-charproperties ==9.2.0.0 --constraint=bytestring ==0.10.4.0
--constraint=base ==4.7.0.1 --disable-tests --disable-benchmarks
creating
/var/folders/71/k93g7g992nlf9t6mkqbykv600000gn/T/hxt-regex-xmlschema-9.2.0-64074/hxt-regex-xmlschema-9.2.0/dist/setup
/Users/rjayatilleka/.cabal/setup-exe-cache/setup-Cabal-1.18.1.4-ghc-7.8.3
build --verbose=2
Failed to install hxt-regex-xmlschema-9.2.0
World file is already up to date.
cabal: Error: some packages failed to install:
hxt-regex-xmlschema-9.2.0 failed during the building phase. The exception was:
ExitFailure 1

      

+3


source to share


1 answer


Okay, I somehow left it for a while and came back to it now. For some reason, it worked. The only thing I can think of is that I have upgraded from GHC 7.8.3 to 7.8.4. If anyone else comes up with this, try another version of GHC.



0


source







All Articles