[mercury-users] Problem running Mercury on Mandrake 9.0
Michael Wybrow
mjwybrow at cs.mu.OZ.AU
Wed Jan 29 11:56:46 AEDT 2003
Ok, so I just recently upgraded my Linux machine at home to Mandrake 9.0.
I have installed Mercury from source (specifically 0.11.1-beta-2003-01-22)
and it all seemed to work fine.
Unfortunately, whenever I try to compile anything `ml' fails with:
[mjwybrow at archroy tmp]$ ml
/usr/bin/ld: cannot find -lm
collect2: ld returned 1 exit status
The reason for this is that shared libraries are not used as the default
on Linux but on this machine there is no static version of libm:
[mjwybrow at archroy tmp]$ gcc --static -lm
/usr/bin/ld: cannot find -lm
collect2: ld returned 1 exit status
[mjwybrow at archroy tmp]$ locate libm.{a,so}
/usr/lib/libm.so
/lib/i686/libm.so.6
/lib/libm.so.6
The simple solution for me was to edit `ml' to manually set the variable
all_libs:
all_libs=shared
This seems to be similar to the situation documented for Solaris/x86 in
`ml':
# shared libraries are not the default on Linux
# -- see README.Linux
# Likewise for FreeBSD and Cygwin
#
# We don't do this for Solaris/x86 because -ldl is
# only available for dynamically linked executables
# XXX With these defaults linking with Mercury libraries
# other than the standard library will fail.
Is this a case that should perhaps be checked for by the configure
script?
Cheers,
Michael
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list