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
Hi Philip,
I'm trying to package Bustle[1], and so I first need to package ghc-hgettext and ghc-setlocale as dependencies.
Great!
but when I try to package ghc-hgettext[3], I get:
/usr/bin/ld: cannot find -lHSsetlocale-0.0.3-ghc7.4.2 collect2: error: ld returned 1 exit status
Maybe you have a user install of setlocale too?
What does "ghc-pkg list setlocale" say?
You can try "ghc-pkg unregister setlocale" to uninstall the user library.
Ideally Cabal should prefer the system library in this case but I think it doesn't.
Hope that helps, Jens
/usr/bin/ld: cannot find -lHSsetlocale-0.0.3-ghc7.4.2 collect2: error: ld returned 1 exit status
Reproduced on F19 with:
$ cabal install setlocale $ cblrpm local setlocale $ sudo rpm -ivh $(arch)/ghc-setlocale* $ cblrpm local hgettext
You can try "ghc-pkg unregister setlocale" to uninstall the user library.
That fixed it for me.
Ideally Cabal should prefer the system library in this case but I think it doesn't.
I think this is fixed with the Cabal in ghc-7.6.3. So upgrading to F20 should also fix this issue.
I am happy to help review the packages.
Jens
On Mon, 2014-06-30 at 23:48 -0400, Jens Petersen wrote:
/usr/bin/ld: cannot find -lHSsetlocale-0.0.3-ghc7.4.2 collect2: error: ld returned 1 exit status
Reproduced on F19 with:
$ cabal install setlocale $ cblrpm local setlocale $ sudo rpm -ivh $(arch)/ghc-setlocale* $ cblrpm local hgettext
You can try "ghc-pkg unregister setlocale" to uninstall the user library.
That fixed it for me.
Fixed it for me too, thanks!
Ideally Cabal should prefer the system library in this case but I think it doesn't.
I think this is fixed with the Cabal in ghc-7.6.3. So upgrading to F20 should also fix this issue.
Right. I need to set aside a weekend for doing that. This is my work laptop, so there are very few windows of opportunity to upgrade.
I am happy to help review the packages.
ghc-setlocale: https://bugzilla.redhat.com/show_bug.cgi?id=1115885 ghc-hgettext: https://bugzilla.redhat.com/show_bug.cgi?id=1115894
The Bustle package itself is waiting on two upstream branches to be merged, and a point release made.
Thanks! Philip
haskell@lists.fedoraproject.org