Hi all,
I'm trying to package Bustle[1], and so I first need to package ghc-hgettext and ghc-setlocale as dependencies.
I can generate a ghc-setlocale package[2] easily enough using cabal-rpm, but when I try to package ghc-hgettext[3], I get:
+ ./Setup build Building hgettext-0.1.30... Preprocessing library hgettext-0.1.30... [1 of 2] Compiling Distribution.Simple.I18N.GetText ( src/Distribution/Simple/I18N/GetText.hs, dist/build/Distribution/Simple/I18N/GetText.o ) [2 of 2] Compiling Text.I18N.GetText ( src/Text/I18N/GetText.hs, dist/build/Text/I18N/GetText.o ) [1 of 2] Compiling Distribution.Simple.I18N.GetText ( src/Distribution/Simple/I18N/GetText.hs, dist/build/Distribution/Simple/I18N/GetText.p_o ) [2 of 2] Compiling Text.I18N.GetText ( src/Text/I18N/GetText.hs, dist/build/Text/I18N/GetText.p_o ) [1 of 2] Compiling Distribution.Simple.I18N.GetText ( src/Distribution/Simple/I18N/GetText.hs, dist/build/Distribution/Simple/I18N/GetText.dyn_o ) [2 of 2] Compiling Text.I18N.GetText ( src/Text/I18N/GetText.hs, dist/build/Text/I18N/GetText.dyn_o ) /usr/bin/ld: cannot find -lHSsetlocale-0.0.3-ghc7.4.2 collect2: error: ld returned 1 exit status
That's with my ghc-setlocale package installed:
$ ls -l /usr/lib64/ghc-7.4.2/setlocale-0.0.3/ total 500 -rw-r--r--. 1 root root 152134 Jun 28 10:44 libHSsetlocale-0.0.3.a -rwxr-xr-x. 1 root root 91384 Jun 28 10:44 libHSsetlocale-0.0.3-ghc7.4.2.so -rw-r--r--. 1 root root 259548 Jun 28 10:44 libHSsetlocale-0.0.3_p.a drwxr-xr-x. 1 root root 12 Jun 28 10:47 System
I'm stumped. If I rebuild ghc-hgettext with shared libraries disabled, it works, but that's not really acceptable. I'm afraid I don't know enough about the Cabal/rpmbuild/Haskell build and linking process to be able to diagnose this without spending too much time on it. Hopefully the answer is obvious to someone else!
Thanks, Philip
[1]: http://willthompson.co.uk/bustle/ [2]: http://people.collabora.com/~pwith/packaging/ghc-setlocale.spec [3]: http://people.collabora.com/~pwith/packaging/ghc-hgettext.spec