small hugs98-Sep2003 build problem on FreeBSD 4.8

Reinhard Speyerer rspmn at arcor.de
Mon Sep 29 01:57:24 EDT 2003


Trying to install hugs98-Sep2003 on FreeBSD 4.8 produced the following error:

$ ./configure
...
checking for function_dlopen... yes
checking for function_shl_load... no
checking for library_dld... no
...
$ cd ..
$ make
...
env HUGSDIR='../hugsdir' HUGSFLAGS='-W' unix/BuildFFI
Compiling ../../hugsdir/libraries/Foreign/C/Error.hs
Compiling ../../hugsdir/libraries/Foreign/Marshal/Alloc.hs
Compiling ../../hugsdir/libraries/Foreign/Marshal/Utils.hs
Compiling ../../hugsdir/libraries/System/Posix/Internals.hs
Compiling ../../hugsdir/libraries/Text/Regex/Posix.hs
Compiling ../../hugsdir/libraries/Network/BSD.hs
Compiling ../../hugsdir/libraries/Network/Socket.hs
Compiling ../../hugsdir/libraries/System/Posix/Directory.hs
/usr/libexec/elf/ld: cannot find -ldl
runhugs: Error occurred
ERROR "../../hugsdir/libraries/System/Posix/Directory.hs" - Error while running compilation command 'gcc -g   -shared -fPIC -D__HUGS__ "-I../hugsdir/include" "../../hugsdir/libraries/System/Posix/Directory.c" -o "../../hugsdir/libraries/System/Posix/Directory.so" -I../../hugsdir/libraries/System/Posix -I../../hugsdir/libraries -I../../hugsdir/include -I/home/rls/hugs98-Sep2003/fptools/libraries/unix/include -ldl'

The problem seems to be caused by the fact that FreeBSD (and possibly
other BSD-derived systems) have dlopen() etc. in libc, there is no libdl.
configure #defines HAVE_LIBDL to 1 if either dlopen() etc. are found in libc
or when linking with -ldl. fptools/libraries/unix/package.conf.in however
uses #ifdef HAVE_LIBDL to check whether -ldl should be added to
extra_libraries.

After manually deleting the

#ifdef HAVE_LIBDL
			  , "dl"
#endif

block from package.conf.in make completed successfully and make
LibStatus completed without producing errors.

Regards,
Reinhard


More information about the Hugs-Bugs mailing list