Subject: [2006Q3][swi-prolog-lite] Cannot find -lgmp
To: pkgsrc users list <pkgsrc-users@netbsd.org>
From: Nico, Ryoko et Anna <nicolas.pelletier3@ebony.plala.or.jp>
List: pkgsrc-users
Date: 10/22/2006 12:21:40
Hello pkgsrc users,

I am a new NetBSD (3.0.1, i386) and pkgsrc user. I would like to use SWI
Prolog (packages swi-prolog-lite, swi-prolog-packages and swi-prolog) on
my NetBSD machine.

However my connection to ftp.NetBSD.org is not good enough to install
packages over the network (the ftp link fails regularly in the middle of
a download) and the sites listed as mirrors in the area do not seem to
have the binary packages available. So I resolved to get pkgsrc-2006Q3
from one of these sites and install the swi-prolog packages on my
machine from source using pkgsrc.

While the installation goes smoothly for packages which I know SWI
Prolog can take advantage of (readline, gmp, unixodbc), I have the
following 2 problems when compiling and installing swi-prolog-lite:

- first, while libgmp is installed on my system, it is not found when I
type 'make' in the pkgsrc/lang/swi-prolog-lite directory. The error
listed in config.log is 'ld: cannot find -lgmp'. I managed to work
around this issue by editing swi-prolog-lite/Makefile and adding an
.include line to point to gmp/buildlink3.mk. Thus libgmp is found when
building swi-prolog-lite. But this workaround is not satisfactory; I
would rather be able to install a full-blown SWI Prolog without having
to tickle Makefiles.

- second, when I go to work/pl-5.6.17/src and run a 'gmake check' there,
all tests pass but the one checking date formats. In that test, the
result is the format argument passed ti strftime, and not the
transformed date. I am not sure if this is a problem with SWI Prolog on
NetBSD or more generally a SWI Prolog bug (independent of the OS) as I
have not yet had to make computations on dates with SWI Prolog and do
not have another machine with SWI Prolog available now. For information,
while the SWI Prolog code calling strftime says that the date conversion
is not safe in the presence of threads, the result of 'gmake check' does
not change if I enable multi-threading (which I would like to, by the
way) by editing swi-prolog-lite/Makefile.

Could someone help me with these issues, please ?

Regards,

-- 
Nicolas