fPIC issues

Jan Stolarek jan.stolarek at p.lodz.pl
Fri Jan 24 10:45:30 UTC 2014


A couple of days ago I realized that I can't compile latest HEAD on my Debian Squeeze laptop. 
Some -fPIC issues prevented compilation of integer-gmp library. I reported this as #8666. Today I 
got another PIC-related error on a different machine with openSUSE 11.4:

/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: 
dist/build/compile/compile-tmp/Data/Singletons/Core.dyn_o: re
location R_X86_64_PC32 against undefined symbol `DataziSingletonsziTypes_Proved_con_info' can not 
be used when making a shared object; recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: final link failed: Bad 
value
collect2: ld returned 1 exit status

This happened with HEAD when I tried to compile testsuite configured via cabal file (on 7.6.3 all 
is fine):

test-suite compile
  type:               exitcode-stdio-1.0
  ghc-options:        -Wall -O0 -main-is Test.Main
  default-language:   Haskell2010
  main-is:            Test/Main.hs

Before I fil in another bug report could someone offer me a straightforward explanation of what is 
this whole -fPIC thing? Why does it break my code? Is this a known issue? Is there any kind of 
workaround for this?

Janek



More information about the ghc-devs mailing list