build issue with Flora-2 under amazon linux ARM

0 views
Skip to first unread message

Marc Hadfield

unread,
Jun 23, 2022, 12:38:49 PM6/23/22
to ErgoAI, Flora-2, and XSB Users Forum

Hello - 

I'm trying to install Flora-2 via the most recent install script: flora2-2.1-RC1.run

I run into an issue when it is compiling XSB.  This is in an ARM environment.

The install script installs cleanly in my local Mac environment which is ARM.

The target environment is an amazon server instance running:  amzn2-ami-kernel-5.10-hvm-2.0.20220606.1-arm64-gp2

Initially the install script complains because it cannot guess the environment, but after updating config.guess and config.sub the configure process completes:

           INSTALLATION SUMMARY

            --------------------


XSB Version:   3.8.0

Code name:   Three-Buck Chuck

Release date:   2017-10-28

Configuration:   aarch64-unknown-linux-gnu

Installation date: Thu Jun 23 16:09:50 UTC 2022



I'm using gcc 10:

gcc10-gcc --version

gcc10-gcc (GCC) 10.3.1 20210422 (Red Hat 10.3.1-1)



I get to this point in the makexsb process and then it dies:


cd cmplib; make

make[2]: Entering directory `/home/ec2-user/Flora2.1/Flora-2/XSB/cmplib'

rm -f 'cmd...'

rm -f '../build/.xsb_cmplib_warn.tmp'

/home/ec2-user/Flora2.1/Flora-2/XSB/bin/xsb -e "segfault_handler(warn)." < 'cmd...'

[Compiling /home/ec2-user/Flora2.1/Flora-2/XSB/config/aarch64-unknown-linux-gnu/lib/xsb_configuration]

/bin/sh: line 1:  3897 Killed                  /home/ec2-user/Flora2.1/Flora-2/XSB/bin/xsb -e "segfault_handler(warn)." < 'cmd...'

make[2]: *** [all] Error 137

make[2]: Leaving directory `/home/ec2-user/Flora2.1/Flora-2/XSB/cmplib'

make[1]: *** [cmplib] Error 2

make[1]: Leaving directory `/home/ec2-user/Flora2.1/Flora-2/XSB'

make: *** [remake_dot_O_files] Error 2

make -f ../config/aarch64-unknown-linux-gnu/topMakefile dynmodule


I tried compiling XSB 4.0 and got the same issue.

I tried XSB 5.0, and that compiles cleanly in the ARM environment, but then I get errors when compiling Flora2 with the XSB 5.0, such as:
make[1]: Leaving directory `/home/ec2-user/Flora2.1/Flora-2/flora2/datatypes'
-------------- Warnings/Errors --------------------
While compiling .../flora2:
++Error[XSB/Runtime] Unhandled Exception: error(syntax_error(_h544),:- import , /  <--- HERE? ************ 
++                                      2 from standard  - pos(end_of_file,2173,-1))
Forward Continuation...
... machine:xsb_backtrace/1  From /home/ec2-user/XSB5/XSB/syslib/machine.xwam 

which may be due to incompatibilities between XSB 5.0 and the current version of Flora2.1.

So, I'm mainly looking for help getting the XSB 3.8 running in the amazon ARM environment, but I'd be happy to switch XSB versions if that would help.

I found I get much better performance in my local Mac ARM environment with Flora2 so I'm looking to replicate that in our Amazon server environment.

If there are any flags I can set to make the error output more verbose I can do that.

Thanks!

-- Marc




 

Marc Hadfield

unread,
Jun 23, 2022, 4:03:18 PM6/23/22
to ErgoAI, Flora-2, and XSB Users Forum
Some additional info; if i try the same thing using redhat instead of the amazon instance, it dies at the same spot but I do get an error message:

echo 'mc(writeasm, [sysmod,optimize,spec_repr,quit_on_error]).' >> 'cmd...'

/home/ec2-user/repos/xsb/XSB/bin/xsb -e "segfault_handler(warn)." < 'cmd...'


++Error[XSB]: [Runtime/C] Not enough core to perform garbage collection chaining phase

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

make[2]: *** [Makefile:74: all] Error 1

make[2]: Leaving directory '/home/ec2-user/repos/xsb/XSB/cmplib'

make[1]: *** [Makefile:49: cmplib] Error 2

make[1]: Leaving directory '/home/ec2-user/repos/xsb/XSB'

make: *** [../config/aarch64-unknown-linux-gnu/topMakefile:425: remake_dot_O_files] Error 2

make -f ../config/aarch64-unknown-linux-gnu/topMakefile dynmodule


Preparing...

make[1]: Entering directory '/home/ec2-user/repos/xsb/XSB/emu'

Making XSB Shared Library /home/ec2-user/repos/xsb/XSB/config/aarch64-unknown-linux-gnu/bin/libxsb.so


make[1]: Leaving directory '/home/ec2-user/repos/xsb/XSB/emu'

... done ...



++Error[XSB]: [Runtime/C] Not enough core to perform garbage collection chaining phase

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



Not sure what that would mean, but maybe some library incompatibility?

Michael Kifer

unread,
Jun 23, 2022, 9:46:56 PM6/23/22
to ErgoAI-Flor...@coherentknowledge.com

Thanks Marc.

Yes, XSB was not running on arm chips and in the last 3 months it was  ported to arm for linux and macOS.

We could not get hold of Windows on arm, so it likely does not work in that configuration.


XSB 5.0 has these updates in it and Flora-2 should run on it. Ergo certainly does, but I did not check Flora-2. Will do in the next few days.

Did you recompile flora? You should try


makeflora clean

makeflora



--

       --- 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/CABggguczT_n%3Dw%2BVe34_%2BQenRYAE5m_96ce3AqKOveDc0wY_oRg%40mail.gmail.com.

Marc Hadfield

unread,
Jun 24, 2022, 10:47:55 AM6/24/22
to Michael Kifer, ErgoAI, Flora-2, and XSB Users Forum

I do get an error while making flora with XSB 5.0.

The first error is:

-------------- Warnings/Errors --------------------
While compiling .../flora2/datatypes:
-------------------- End --------------------------

make[1]: Leaving directory `/home/ec2-user/Flora2.1/Flora-2/flora2/datatypes'
-------------- Warnings/Errors --------------------
While compiling .../flora2:
++Error[XSB/Runtime] Unhandled Exception: error(syntax_error(_h592),:- import , /  <--- HERE? ************
++                                      2 from standard  - pos(end_of_file,2173,-1))
Forward Continuation...
... machine:xsb_backtrace/1  From /home/ec2-user/Flora2.1/Flora-2/XSB/syslib/machine.xwam
... error_handler:syntax_error/1  From /home/ec2-user/Flora2.1/Flora-2/XSB/syslib/error_handler.xwam
... xsb_read:iso_read_syntax_error/4  From /home/ec2-user/Flora2.1/Flora-2/XSB/syslib/xsb_read.xwam
... parse:my_read/2  From /home/ec2-user/Flora2.1/Flora-2/XSB/cmplib/parse.xwam
... parse:parse_clauses/2  From /home/ec2-user/Flora2.1/Flora-2/XSB/cmplib/parse.xwam
... parse:parse1/3  From /home/ec2-user/Flora2.1/Flora-2/XSB/cmplib/parse.xwam
... parse:parse/4  From /home/ec2-user/Flora2.1/Flora-2/XSB/cmplib/parse.xwam
... standard:call/1  From /home/ec2-user/Flora2.1/Flora-2/XSB/syslib/standard.xwam
... compile:compile/6  From /home/ec2-user/Flora2.1/Flora-2/XSB/cmplib/compile.xwam
... x_interp:_$call/1  From /home/ec2-user/Flora2.1/Flora-2/XSB/syslib/x_interp.xwam
... x_interp:call_query/1  From /home/ec2-user/Flora2.1/Flora-2/XSB/syslib/x_interp.xwam
... standard:call/1  From /home/ec2-user/Flora2.1/Flora-2/XSB/syslib/standard.xwam
... standard:catch/3  From /home/ec2-user/Flora2.1/Flora-2/XSB/syslib/standard.xwam
... x_interp:interpreter/0  From /home/ec2-user/Flora2.1/Flora-2/XSB/syslib/x_interp.xwam
... loader:ll_code_call/3  From /home/ec2-user/Flora2.1/Flora-2/XSB/syslib/loader.xwam
... loader:find_ofile_and_load/7  From /home/ec2-user/Flora2.1/Flora-2/XSB/syslib/loader.xwam
... standard:call/1  From /home/ec2-user/Flora2.1/Flora-2/XSB/syslib/standard.xwam
... standard:catch/3  From /home/ec2-user/Flora2.1/Flora-2/XSB/syslib/standard.xwam
-------------------- End --------------------------
cd closure && make PROLOG=/home/ec2-user/Flora2.1/Flora-2/XSB/bin/xsb
make[1]: Entering directory `/home/ec2-user/Flora2.1/Flora-2/flora2/closure'


The complete build log is also attached.

For whatever reason the combination of Flora2.1 and XSB 3.8 does work out of the box on Mac ARM (M1 chip), so I was trying to follow this on the amazon servers.

But, I'd be very happy to switch to XSB 5.0.

Please let me know what I can update in Flora/XSB to get the build working, and I can help diagnose any issues with further build logs, etc.

Thanks!

-- Marc





flora-build.log

Marc Hadfield

unread,
Jun 24, 2022, 12:15:52 PM6/24/22
to Michael Kifer, ErgoAI, Flora-2, and XSB Users Forum

I also run into similar build errors with Flora2.1 & XSB 5.0 in an x86_64 (so, not ARM) environment.

So, the build issues seem related to Flora2.1 & XSB 5.0, and not ARM related.

Attached is the full build log.  This is from a Centos7 environment where Flora2.1 and XSB 3.8 compile and work fine.

-- Marc
flora-centos-build.log
Reply all
Reply to author
Forward
0 new messages