Getting XSB to Use PCRE on Mac Big Sur

6 views
Skip to first unread message

Jason Morris

unread,
Jan 26, 2021, 7:40:31 AM1/26/21
to ErgoAI, Flora-2, and XSB Users Forum
I'm trying to get Flora-2 working on MacOS Big Sur, and running into a problem where I can't get PCRE properly configured in XSB, so calls to. @\prolog(pcre) are failing.

/Users/jason/Flora-2/XSB/packages/pcre/cc/pcre4pl.c:38:10: fatal error: 

      'pcre.h' file not found

#include <pcre.h>

         ^~~~~~~~

1 error generated.


++Error[XSB]: [Runtime/C] dlopen(/Users/jason/Flora-2/XSB/packages/pcre/cc/pcre4pl.dylib, 1): image not found


++Error[Flora-2]> Error in loading file /Users/jason/Flora-2/XSB/packages/pcre/cc/pcre4pl.xwam.rosegold.local-953


I tried installing PCRE on it using brew install pcre, and reconfiguring XSB using --with-pcre-libdir and --with-pcre-incdir, then running ./makexsb, only to get the exact same error again.

I might be able to just ditch the PCRE in favour of POSIX re, but I also can't find any documentation of how to do that inside XSB.  Any help on one or both of those problems would be appreciated.

Jason Morris

unread,
Jan 26, 2021, 7:51:07 AM1/26/21
to ErgoAI, Flora-2, and XSB Users Forum, Jason Morris
I found the XSB documentation, and trying re_substitute(?x,['Hello'],['Goodbye'],?y)@\prolog(regmatch). Gives the following error.

Partial Forward Continuation...

... call/1  From /Users/jason/Flora-2/XSB/syslib/standard.xwam

... catch/3  From /Users/jason/Flora-2/XSB/syslib/standard.xwam

... call_cleanup/2  From /Users/jason/Flora-2/XSB/syslib/standard.xwam

... call_c/1  From /Users/jason/Flora-2/XSB/syslib/standard.xwam

... call/1  From /Users/jason/Flora-2/XSB/syslib/standard.xwam

... call/1  From /Users/jason/Flora-2/XSB/syslib/standard.xwam

... catch/3  From /Users/jason/Flora-2/XSB/syslib/standard.xwam

... call/1  From /Users/jason/Flora-2/XSB/syslib/standard.xwam

... catch/3  From /Users/jason/Flora-2/XSB/syslib/standard.xwam

... flora_process_shell_command/1  From /Users/jason/Flora-2/flora2/flrshell.xwam

... call/1  From /Users/jason/Flora-2/XSB/syslib/standard.xwam

... _$call/1  From 0d?

... call_query/1  From 0d?

... call/1  From /Users/jason/Flora-2/XSB/syslib/standard.xwam

... catch/3  From /Users/jason/Flora-2/XSB/syslib/standard.xwam

... interpreter/0  From 0d?

... ll_code_call/3  FromU?(

... find_ofile_and_load/5  FromU?(

... call/1  From /Users/jason/Flora-2/XSB/syslib/standard.xwam

... catch/3  From /Users/jason/Flora-2/XSB/syslib/standard.xwam


++Error[XSB]: [Runtime/C] 

++Memory violation occurred during evaluation.

++Please report this problem using the XSB bug tracking system accessible from

++ http://sourceforge.net/projects/xsb

++Please supply the steps necessary to reproduce the bug.


++Error[XSB]: [Runtime/C] Exiting XSB abnormally...


Michael Kifer

unread,
Jan 26, 2021, 10:55:43 AM1/26/21
to ErgoAI-Flor...@coherentknowledge.com

Concerning regmatch, XSB has not been supporting that pkg for many years now, and it is not in the XSB documentation.

At least, not in the one I see in its repository.


Regarding pcre, it sounds like you did not install the pcre C library. The ErgoAI tutorial

https://sites.google.com/a/coherentknowledge.com/ergo-suite-tutorial/home#TOC-Prerequisites-for-Linux-Mac-installation

says you need to do

brew install pcre.


Did you do that? You also have to configure that package per the XSB manual.

I am yet to upgrade to MacOS 11.

--

       --- michael


 

--
You received this message because you are subscribed to the Google Groups "ErgoAI, Flora-2, and XSB Users Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ErgoAI-Flora2-XSB...@coherentknowledge.com.
To view this discussion on the web visit https://groups.google.com/a/coherentknowledge.com/d/msgid/ErgoAI-Flora2-XSB-forum/065f3191-05a3-4ec6-9eb7-bfbd5c9b1fb4n%40coherentknowledge.com.

Jason Morris

unread,
Jan 27, 2021, 5:17:26 AM1/27/21
to ErgoAI, Flora-2, and XSB Users Forum, Michael Kifer
I did brew install pcre, and then configured XSB using the directories that brew installed to. The configuration seemed to be successful. I re-ran ./makexsb, and got "yes" with regard to PCRE in the Installation_summary, but when I ran Flora-2 I got the same errors again.

Do I need to add the directories for pcre to some sort of XSB configuration file, maybe?

If you have any other suggestions of what I might try, I would appreciate it. I'm new to Mac, and inexpert with linux.

Michael Kifer

unread,
Jan 27, 2021, 6:41:05 PM1/27/21
to Jason Morris, ErgoAI, Flora-2, and XSB Users Forum

I just upgraded to big sur , and pcre still works.

Try to reinstall flora.

Also check if  pcre.h is indeed in /usr/local/include/


If reinstalling does not help, send me your Flora-2/flora2-install.log file.

Jason Morris

unread,
Jan 28, 2021, 1:42:27 AM1/28/21
to ErgoAI, Flora-2, and XSB Users Forum, Michael Kifer, Jason Morris
pcre.h is not in /usr/local/include, but I'm manually specifying the location with --with-pcre-incdir in when I do the configure command for XSB. Is there a similar flag for the XSB executable, or something?
Reply all
Reply to author
Forward
0 new messages