[Haskell-cafe] pcre-light install fails with undefined reference
to _impure_ptr
Stephen Tetley
stephen.tetley at gmail.com
Sun Dec 27 04:23:41 EST 2009
Hi Patrick
I think the problem is because PCRE uses c++, and doing a quick web
search shows that _impure_ptr link errors are a recurrent problem for
the PCRE binding with GHC. Funnily enough 6.10.3 worked fine - I
posted to the list a month or two ago with instructions how to do it,
but 6.12.1 fails for me in the same was as it fails for you.
I'll try next with MinGW to see if that works...
Best wishes
Stpehen
2009/12/27 Patrick Caldon <patc at pessce.net>:
>
> Not seen this one before.
>
> I'm trying to install pcre-light with WinXP 64, Cygwin 1.7.1, Cabal 0.8.0,
> and ghc 6.12.1. Trying to reinstall "base" with cabal fails as well with an
> internal error (see below), but I'm assuming that's
> quasi-intentional/unsupported feature or something.
>
> Any ideas? My ultimate goal is to install ghc-core to help track down some
> performance problems I'm having.
>
> Thanks,
> Patrick.
>
>
> patc at rose ~/rp4/loansim
> $ cabal install pcre-light --extra-lib-dirs=C:\\cygwin\\lib
> --extra-include-dirs=C:\\cygwin\\usr\\include --reinstall
> Resolving dependencies...
> Configuring pcre-light-0.3.1...
> Preprocessing library pcre-light-0.3.1...
> In file included from C:/cygwin/usr/include/pcre.h:90,
> from Text\Regex\PCRE\Light\Base.hsc:103:
> C:/cygwin/usr/include/stdlib.h:104: warning: `warning' attribute directive
> ignored
> C:/cygwin/usr/include/stdlib.h:109: warning: `warning' attribute directive
> ignored
> dist\build\Text\Regex\PCRE\Light\Base_hsc_make.o:Base_hsc_make.c:(.text+0x47):
> undefined reference to `_impure_ptr'
> dist\build\Text\Regex\PCRE\Light\Base_hsc_make.o:Base_hsc_make.c:(.text+0x7b):
> undefined reference to `_impure_ptr'
> dist\build\Text\Regex\PCRE\Light\Base_hsc_make.o:Base_hsc_make.c:(.text+0x93):
> undefined reference to `_impure_ptr'
> dist\build\Text\Regex\PCRE\Light\Base_hsc_make.o:Base_hsc_make.c:(.text+0xc7):
> undefined reference to `_impure_ptr'
> dist\build\Text\Regex\PCRE\Light\Base_hsc_make.o:Base_hsc_make.c:(.text+0xf3):
> undefined reference to `_impure_ptr'
> dist\build\Text\Regex\PCRE\Light\Base_hsc_make.o:Base_hsc_make.c:(.text+0x127):
> more undefined references to `_impure_ptr' follow
> collect2: ld returned 1 exit status
> linking dist\build\Text\Regex\PCRE\Light\Base_hsc_make.o failed
> command was: C:\ghc\ghc-6.12.1\mingw\bin\gcc.exe -LC:\cygwin\lib -lpcre
> -LC:\ghc\ghc-6.12.1\bytestring-0.9.1.5 -LC:\ghc\ghc-6.12.1\base-3.0.3.2
> -LC:\ghc\ghc-6.12.1\syb-0.1.0.2 -LC:\ghc\ghc-6.12.1\base-4.2.0.0 -lwsock32
> -luser32 -lshell32 -LC:\ghc\ghc-6.12.1\integer-gmp-0.2.0.0
> -LC:\ghc\ghc-6.12.1\ghc-prim-0.2.0.0 -LC:\ghc\ghc-6.12.1
> -LC:\ghc\ghc-6.12.1/gcc-lib -lm -lwsock32 -LC:\ghc\ghc-6.12.1
> dist\build\Text\Regex\PCRE\Light\Base_hsc_make.o -o
> dist\build\Text\Regex\PCRE\Light\Base_hsc_make.exe
> cabal.exe: Error: some packages failed to install:
> pcre-light-0.3.1 failed during the building phase. The exception was:
> exit: ExitFailure 1
>
> patc at rose ~/rp4/loansim
> $ cabal --version
> cabal-install version 0.8.0
> using version 1.8.0.2 of the Cabal library
>
> patc at rose ~/rp4/loansim
> $ ghc --version
> The Glorious Glasgow Haskell Compilation System, version 6.12.1
>
> patc at rose ~/rp4/loansim
> $ cabal install base --reinstall -p
> Resolving dependencies...
> cabal.exe: internal error: impossible
>
> patc at rose ~/rp4/loansim
> $
>
>
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
More information about the Haskell-Cafe
mailing list