Issue building SWI-Prolog 8.5.14-17-g851d08ab6

Hello,

I am having issues installing the latest swipl (it’s been a while since i last did this, so perhaps I am missing something obvious)

I am running MacOS 12.5 (21G72), kernel: Darwin 21.6.0

from a clean git clone --recursive https://github.com/SWI-Prolog/swipl-devel.git

running ninja gives the following warning

[157/2481] Building C object src/CMakeFiles/swiplobjs.dir/pl-mutex.c.o
/Users/jgeurts/tmp/swipl-devel/src/pl-mutex.c:346:9: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
  { int rc;
        ^
1 warning generated.

running the test suite produces the following error (verbose output)

est project /Users/jgeurts/tmp/swipl-devel/build
    Start 77: xpce:xpce
1/1 Test #77: xpce:xpce ........................***Exception: SegFault  0.27 sec
XPCE/SWI-Prolog test suite. (XPCE version 6.6.6)
To run all tests run ?- test.

Running test set "name" . done.
Running test set "wname" ... done.
Running test set "fmt" ...... done.
Running test set "srcsink" .. done.
Running test set "file" .... done.
Running test set "unicode_file" .. done.
Running test set "dir" ..... done.
Running test set "unicode_dir" ... done.
Running test set "bom" 
SWI-Prolog [thread 1 (main) at Fri Jul 22 22:04:44 2022]: received fatal signal 11 (segv)
C-stack trace labeled "crash":
Prolog stack:
  [16] pce_principal:new/2 [PC=1 in supervisor]
  [15] test_xpce:bom/1 [PC=62 in clause 1]
  [14] system:catch/3 [PC=2 in clause 1]
  [13] xpce_runtest/1 [PC=42 in clause 1]
  [12] system:$c_call_prolog/0 [PC=0 in top query clause]
  [11] pce_principal:send/2 <foreign>
  [10] forall/2 [PC=11 in clause 1]
  [9] test_xpce:test_xpce/0 [PC=35 in clause 1]
  [8] system:catch/3 [PC=2 in clause 1]
  [7] system:catch_with_backtrace/3 [PC=6 in clause 1]
  [6] $toplevel:run_init_goal/2 [PC=17 in clause 1]
  [4] $toplevel:run_init_goals/1 [PC=7 in clause 2]
  [3] $toplevel:initialise_prolog/0 [PC=82 in clause 1]
  [2] system:catch/3 [PC=2 in clause 1]
  [1] $toplevel:$initialise/0 [PC=12 in clause 1]
  [0] system:$c_call_prolog/0 [PC=0 in top query clause]
Running on_halt hooks with status 139
Killing 77692 with default signal handlers


0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.30 sec

The following tests FAILED:
	 77 - xpce:xpce (SEGFAULT)
Errors while running CTest

running swipl gives me a seemingly correct prompt

Welcome to SWI-Prolog (threaded, 64 bits, version 8.5.14-17-g851d08ab6)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

however swipl --pldoc hangs (without any output)

any pointer is much appreciated

thanks!

joost

Pushed a fix for that.

Doesn’t ring a bell. For me the tests pass fine on both the M1 and Intel macs using both clang and gcc (on Intel). This does not seem OS dependent. Address Sanitizer on Linux is also happy about these tests. Anyone?

Hi Jan,

Thanks for looking into this. Either one of your recent fixes resolved the issue, or me installing XQuartz (found a reference to it here: Issues with library(pce)).

Anyway, i am back in business :wink:

thanks!
j