Hi, Am Donnerstag, den 10.03.2011, 11:31 +0000 schrieb Iain Lane: > On Thu, Mar 10, 2011 at 01:45:39PM +0530, Joachim Breitner wrote: > >ghc builds failed on sparc and the kfreebsd’s due to sem_* functions > >missing (and it mentions sem_unlink, sem_open and sem_post. It seems > >quite random which one is reported, so this seems to be unimportant). I > >wonder why it works with amd64 now? > > Great! Ian suggested on the other thread that the hack will be needed > to bootstrap a working GHC which can then be used without hacks > thereafter. amd64 probably works because your previous binary upload > wasn't misbuilt for whatever reason. > > I'll try and get you a patch later. If you want to do it in the > meantime: > > * Patch configure to pass -optl-pthread when building ghc-pwd > * Add -optl-pthread to SRC_HC_OPTS in d/rules to explicitly link with > pthread everywhere > > Then when this is built and uploaded everywhere you can hopefully > revert the patch and upload what is essentially -3 again. are you sure this is sufficient? Note that we once successfully built ghc_7.0.2-1 on kfreebsd-amd64 (however that happened), but it still fails to build ghc_7.0.2-3: https://buildd.debian.org/fetch.cgi?pkg=ghc&arch=kfreebsd-amd64&ver=7.0.2-3&stamp=1299704456&file=log&as=raw So bootstrapping the new version is not the only problem. Also, what is the invalid operation here? Is that an indicator for another problem. configure: Building in-tree ghc-pwd /usr/bin/ld: /usr/lib/ghc-7.0.2/unix-2.4.2.0/libHSunix-2.4.2.0.a(Semaphore.o): undefined reference to symbol 'sem_open@@GLIBC_2.3' /usr/bin/ld: note: 'sem_open@@GLIBC_2.3' is defined in DSO //lib/libpthread.so.0 so try adding it to the linker command line //lib/libpthread.so.0: could not read symbols: Invalid operation collect2: ld returned 1 exit status So, looking into ghc_7.0.2-1_kfreebsd-amd64.deb resp. ghc_7.0.2-3_amd64.deb, I see that on amd64, we have extra-libraries: rt util dl pthread in var/lib/ghc-7.0.2/package.conf.d/unix-2.4.2.0-*, while we have extra-libraries: rt util dl in the kfreebsd package. And indeed, the configure script building ghc6_7.0.2-1 on kfreebsd-amd64 is of this opinion: checking for library containing sem_close... none required whereas on amd64 it found: checking for library containing sem_close... -lpthread So why did the configure script go wrong? In what versions of eglibc is that required in in what versions is it not required? The changelog is not helpful. But maybe we should just try the bootstrapping work-around and if it goes well be happy with it. If you’d create a patch, I’d be thankful. Greetings, Joachim -- Joachim Breitner e-Mail: mail@joachim-breitner.de Homepage: http://www.joachim-breitner.de ICQ#: 74513189 Jabber-ID: nomeata@joachim-breitner.de
Attachment:
signature.asc
Description: This is a digitally signed message part