Re: Making work JPL with Ubuntu 12.04 ?

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 03/10/2014 12:25 PM, Sergio Castro wrote:
>
>
> Hello,
>
> I am testing a library using JPL with different versions of Ubuntu.
> It works fine with Ubuntu 13.04, but I cannot make it work with
> version 12.04 (a third party image where I was required to install
> it).
>
> I am using swi Version 6.6.2-2-ge23683d (compiled from the git
> repository). The configuration in both OS is around the same, so my
> best guess is that a required package is missing in 12.04 (?) I
> installed first the packages mentioned as required from this OS in
> the swi site:
>
> sudo apt-get install \ build-essential autoconf curl chrpath \
> ncurses-dev libreadline-dev libunwind7-dev \ libgmp-dev \ libxext-dev
> libice-dev libjpeg-dev libxinerama-dev libxft-dev \ libxpm-dev
> libxt-dev pkg-config \ libssl-dev \ unixodbc-dev \ openjdk-7-jdk
> junit \ zlib1g-dev libarchive-dev \ libossp-uuid-dev
>
> The error I get is: UnsatisfiedLinkError: …libjpl.so: undefined
> symbol: __gmpz_init

Is this Java embedding Prolog or Prolog embedding Java?  Is this
32-bit or 64-bit?  I can see this might go wrong if you use the
32-bit version and did not use --enable-shared for compiling the
kernel.  If that is the case, try recompiling with this option
for configure.  Another way around is to use environment
variable LD_PRELOAD to preload libgmp:

   LD_PRELOAD=/path/to/libgmp.so java ...

I have no clue why this depends on the Ubuntu version.  The only
thing this should depend on is whether or not the Prolog kernel
is a shared object (default not on 32-bit Linux, always yes on
64-bit Linux) and whether or not SWI-Prolog was linked to libgmp
(default yes if the library can be found).

Hope this helps

	--- Jan


>
> As I interpret it, it does not have problems in finding the jpl
> library libjpl.so, but cannot find a symbol or library required by
> it. Are there any known issues regarding jpl in 12.04 ?
>
>
> cheers,
>
> Sergio -------------- next part -------------- HTML attachment
> scrubbed and removed _______________________________________________
> SWI-Prolog mailing list [email protected]
> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>

_______________________________________________
SWI-Prolog mailing list
[email protected]
https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.