pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: XSB Prolog on NetBSD (Re: wine-devel hangs with high CPU usage)



On Sun, Nov 13, 2011 at 10:28:43PM +0400, Aleksej Saushev wrote:
> > The XSB configure script does not recognize NetBSD. I just added netbsd as
> > orred pattern to freebsd (essentially made it do the same things it does
> > for freebsd including #define FREEBSD etc. for netbsd.) (I have grepped
> > through their code. They do not have #ifdefs for NetBSD anywhere except
> > for a library that I am not interested in, but they do have #ifdef FREEBSD
> > at a few places. Besides having to explicitly provide -lpthread when
> > linking etc is similar on NetBSD.)
> 
> There're other places where NetBSD differs from FreeBSD and Linux.
> One of them is time_t which is wider than "usually." This explains why
> you have XSB working on amd64, but it is only a hypothesis.
> 
> > With this change I could compile XSB on NetBSD 5.1 on amd64.
> >
> > However the same trick did not work for XSB on NetBSD 5.1 on i386. On
> > i386, the C layer compiled fine, though a large part of XSB is written in
> > Prolog itself and it gets compiled as a part of build where the basic xsb
> > executable failed with memory violation message.
> >
> > I'm a long time user of XSB but with little knowledge of its internals.
> > However I know one thing that they use pointers in some very peculiar ways
> > to gain certain efficiency benefit. On "purist" architectures this could
> > lead to problems. (Sorry, I do not know enough to say anything more
> > specific than that.)
> 
> Can you point us to source tarball? Share changes you made?
> Perhaps we could look at it.

Many thanks for this.

The latest source and the same I tried is at:
http://xsb.sourceforge.net/downloads/XSB335.tar.gz

I have also stated the whole story so far (including stack trace collected
using gdb) in this ticket:
https://sourceforge.net/tracker/?func=detail&atid=101176&aid=3437316&group_id=1176

(For getting stack trace, debug version was built with
--disable-optimization and --enable-debug options.)


In build/configure line 6137 I just changed freebsd to netbsd and that
made it work on amd64 without any problem. (Instead of changing I should
have perhaps put | *netbsd* ).

Besides, it (configure) is a bash script which defaults to sh on Linux. I
just commented the first #! line and ran it with bash explicitly.

Mayuresh.


Home | Main Index | Thread Index | Old Index