I recently built ghc 5.00.2 on a debian linux system.
The batch compiler seems to work okay, but ghci
dies upon startup:
Loading package std ... ghc-5.00.2: can't find .o
or .so/.DLL for: m (lib.so: cannot open
shared object file: No such file or directory)
I have a binary distribution for 5.00 which works
fine. I compared the strace of each version and it
looks like 5.00.2 is looking in weird directories
for some libraries. I suspect that this is a problem
with my configuration options when I built 5.00.2.
Basically I just used ghc 5.00 to build 5.00.2.
I have included the output from configure
as an attachment
An strace of 5.00.2 gives the following output, which
I think points to the source of the problem.
Notice that once it doesn't find m.o it starts to look
in some weird places like /lib/i586/mmx:
\begin{output from strace, for ghci for 5.00.2}
stat("/usr/local/lib/ghc-5.00.2/HSstd.o",
{st_mode=S_IFREG|0644, st_size=3481493, ...}) = 0
stat("/usr/local/lib/ghc-5.00.2/HSstd_cbits.o",
{st_mode=S_IFREG|0644, st_size=32068, ...}) = 0
stat("/usr/local/lib/ghc-5.00.2/m.o", 0xbfffd8fc) = -1
ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=19196, ...}) = 0
old_mmap(NULL, 19196, PROT_READ, MAP_PRIVATE, 3, 0) =
0x40014000
close(3) = 0
open("/lib/i586/mmx/lib.so", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat("/lib/i586/mmx", 0xbfffd47c) = -1 ENOENT (No
such file or directory)
open("/lib/i586/lib.so", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat("/lib/i586", 0xbfffd47c) = -1 ENOENT (No
such file or directory)
open("/lib/mmx/lib.so", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat("/lib/mmx", 0xbfffd47c) = -1 ENOENT (No
such file or directory)
open("/lib/lib.so", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/i586/mmx/lib.so", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat("/usr/lib/i586/mmx", 0xbfffd47c) = -1 ENOENT (No
such file or directory)
open("/usr/lib/i586/lib.so", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat("/usr/lib/i586", 0xbfffd47c) = -1 ENOENT (No
such file or directory)
open("/usr/lib/mmx/lib.so", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat("/usr/lib/mmx", 0xbfffd47c) = -1 ENOENT (No
such file or directory)
open("/usr/lib/lib.so", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=15360,
...}) = 0
\end{output from strace, for ghci for 5.00.2}
When I strace ghci 5.00 it also doesn't find
m.o, but then looks in /usr/lib/libm.so
and continues along happily.
Bernie Pope