|
GHC 6.2.1 and FedoraCore2: ar-related build problem, looked like readline p: msg#00005lang.haskell.glasgow.bugs
Interestingly, I first thought this problem was related to the long "readline story", since the build process complained about "readline" when it failed. But that turned out not to be the case! The subject of the mail reflects this, hopefully making this mail easier to find should someone face similar problems. Background: I'm trying to build GHC 6.2.1 on a Fedora Core 2 (FC2) Linux box. The reason is that ghci from the available binary releases (the RH9 rpm and the generic Linux version for glibc 2.3) segfaults. However, the compiler itself seems to run fine, so I decided to try to build and install a system from sources, using the GHC compiler from the generic binary release. Problem: After a long time with a lot of activity, the build process halts with the following error: /home/henrik/ghc-6.2.1/libraries/readline/libHSreadline.a: could not read symbols: Archive has no index; run ranlib to add one collect2: ld returned 1 exit status <<ghc: 3845976 bytes, 2 GCs, 129524/129524 avg/max bytes residency (1 samples), 5M in use, 0.00 INIT (0.00 elapsed), 0.01 MUT (3.80 elapsed), 0.00 GC (0.00 elapsed) :ghc>> It turns out that "libHSreadline.a" actually isn't an archive at all: the building of it has failed, but somehow this has gone unnoticed. What happened was this: seshat-31% make libHSreadline.a rm -f libHSreadline.a libHSreadline.a.tmp echo System/Console/Readline_stub.o > libHSreadline.a.list echo HsReadline_cbits.o System/Console/Readline_hsc.o >> \ libHSreadline.a.list echo >> libHSreadline.a.list /usr/bin/find System/Console/Readline_split \ System/Console/SimpleLineEditor_split \ -name '*.o' -print >> libHSreadline.a.list /usr/bin/ar q libHSreadline.a -input libHSreadline.a.list /usr/bin/ar: creating libHSreadline.a /usr/bin/ar: '-input': No such file rm -f libHSreadline.a.list : libHSreadline.a The resulting in an archive essentially containing a list of filenames, rather than binary object code. The reason for this, in turn, as can be seen, is that the GNU version of "ar", at least the ones shipped with FC2 (and Mandrake 9.2, which I also checked), does not support the "-input" option. Temporary Solution: I then checked in the "mk" directory, and in "config.mk" I found the line ArSupportsInput = -input Changing this to ArSupportsInput = allows "libHSreadline.a" to be built correctly, using a different way of passing the desired file name arguments to "ar". I do not know why the configuration scripts concluded that the version of "ar" on my system supports "-input". So, in summary, there were two problems: * The configuration tools somehow thinks the system's "ar" supports "-input". * The build system fails to detect when "ar" failed in the first place. /Henrik -- Henrik Nilsson School of Computer Science and Information Technology The University of Nottingham nhn@xxxxxxxxxxxxx This message has been scanned but we cannot guarantee that it and any attachments are free from viruses or other damaging content: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-1018656 ] closure type 54000, SourceForge.net |
|---|---|
| Next by Date: | Re: GHC 6.2.1 and FedoraCore2: ar-related build problem, looked like readline problem, Henrik Nilsson |
| Previous by Thread: | [ ghc-Bugs-1018656 ] closure type 54000, SourceForge.net |
| Next by Thread: | Re: GHC 6.2.1 and FedoraCore2: ar-related build problem, looked like readline problem, Henrik Nilsson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |