Closed GoogleCodeExporter closed 9 years ago
I have no access to OS X, so I may need some help to solve and test it.
Is swipl available in your PATH? If it is, could you please run {{{swipl
-dump-runtime-variables}}} and paste the output here?
Original comment by rodrigo....@gmail.com
on 1 Jan 2013 at 9:46
Yes it's at /usr/local/bin/swipl. Here's the output:
$ swipl -dump-runtime-variables
CC="cc";
PLBASE="/usr/local/Cellar/swi-prolog/6.2.3/lib/swipl-6.2.3";
PLARCH="x86_64-darwin12.2.1";
PLLIBS="";
PLLIB="-lswipl";
PLCFLAGS="-fno-strict-aliasing -no-cpp-precomp -pthread -fno-common ";
PLLDFLAGS="-O2 -pthread ";
PLSOEXT="dylib";
PLVERSION="60203";
PLSHARED="yes";
PLTHREADS="yes";
There's a large folder hierarchy under
"/usr/local/Cellar/swi-prolog/6.2.3/lib/swipl-6.2.3", and
"/usr/local/Cellar/swi-prolog/6.2.3/lib/swipl-6.2.3/lib/x86_64-darwin12.2.1"
has several dylibs:
$ ls
cgi.dylib odbc4pl.dylib socket.dylib
crypt.dylib pdt_console.dylib ssl4pl.dylib
double_metaphone.dylib porter_stem.dylib streaminfo.dylib
files.dylib process.dylib table.dylib
http_stream.dylib protobufs.dylib time.dylib
isub.dylib rdf_db.dylib turtle.dylib
json.dylib readutil.dylib uid.dylib
libswipl.a rlimit.dylib unicode4pl.dylib
libswipl.dylib sgml2pl.dylib unix.dylib
memfile.dylib sha4pl.dylib uri.dylib
mime.dylib snowball.dylib zlib4pl.dylib
Original comment by alexchan...@gmail.com
on 2 Jan 2013 at 4:25
I committed a patch in r130. Could you please test it?
You can download the trunk with:
svn checkout http://pyswip.googlecode.com/svn/trunk/ pyswip-read-only
Thank you!
Original comment by rodrigo....@gmail.com
on 2 Jan 2013 at 1:31
The import succeeds, but now there's another issue. When I run the Send Money
example code given in the wiki, python crashes with "Segmentation fault: 11" as
soon as this line is executed:
for result in prolog.query("sendmore(X)"):
r = result["X"]
for i, letter in enumerate(letters):
print letter, "=", r[i]
I also get a popup error window saying "Python quit unexpectedly while using
the libswipl.dylib plug-in". I've attached the much longer crash-diagnostic
information that accompanies this popup.
I double checked, and the money.pl Prolog code is correct, as is the Python
code. The "prolog = Prolog()" line and the "prolog.consult('money.pl')" both
succeed, but the prolog.query method appears to cause this fault.
I can open a separate issue if you like.
Original comment by alexchan...@gmail.com
on 7 Jan 2013 at 1:10
Attachments:
Sorry for the late reply.
Thank you for your tests. I will close this issue and reopen issue 1, pointing
to your crash dump. I will see if I can reproduce it in my environment (these
64bit-related errors are very difficult to reproduce sometimes...)
Original comment by rodrigo....@gmail.com
on 20 Jan 2013 at 1:45
I committed some changes that may fix your problem (and it is "may" because I
was not able to reproduce it exactly, but I got a Windows machine to generate a
similar problem). Would you mind testing it and then making a comment on issue
1 about the result? Thank you.
Original comment by rodrigo....@gmail.com
on 20 Jan 2013 at 8:35
Original issue reported on code.google.com by
alexchan...@gmail.com
on 1 Jan 2013 at 12:32