Errors and a hang rebuilding

Hi Jan

I routinely rebuild from source of Ubuntu without problems but today errors and a hang.

Regards

Mike

PS Really sorry to hear of your health challenges. I hope you are putting your recovery ahead of swipl.


Distributor ID:	Ubuntu
Description:	Ubuntu 26.04 LTS
Release:	26.04
Codename:	resolute
rm -rf ~/lib/swipl
cd ~/swipl-devel
git pull
git submodule update --init
git clean -xfd
git submodule foreach git clean -xfd
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME -DCMAKE_BUILD_TYPE=PGO -G Ninja ..
ninja
ctest -j $(nproc) --output-on-failure
ninja install


<snip>

CMake Warning at packages/sweep/CMakeLists.txt:14 (message):
  Could not find emacs-module.h in system headers.  Using our local copy from
  /home/mike/swipl-devel/packages/sweep

<snip>

% [32/62] ffi:save_load_int64 .................................................................................................................. **FAILED (0.001 sec)
ERROR: [Thread main] /home/mike/swipl-devel/packages/cpp/test_ffi.pl:140:
ERROR: [Thread main]     test ffi:save_load_int64: received error: test_ffi:ffi_read_int64/2: No permission to write stream `<stream>(0xaaaaf4e09800)' (requested stream has wrong mode)
% [33/62] ffi:save_load_int32 .................................................................................................................. **FAILED (0.001 sec)
ERROR: [Thread main] /home/mike/swipl-devel/packages/cpp/test_ffi.pl:153:
ERROR: [Thread main]     test ffi:save_load_int32: received error: test_ffi:ffi_read_int32/2: No permission to write stream `<stream>(0xaaaaf4e09a00)' (requested stream has wrong mode)
% [34/62] ffi:save_load_int64 .................................................................................................................. **FAILED (0.001 sec)
ERROR: [Thread main] /home/mike/swipl-devel/packages/cpp/test_ffi.pl:168:
ERROR: [Thread main]     test ffi:save_load_int64: received error: test_ffi:ffi_read_int64/2: No permission to write stream `<stream>(0xaaaaf4e09c00)' (requested stream has wrong mode)

<snip>

% End unit ffi: **FAILED (0.074 sec CPU)
% Start unit: wchar
% [43/62] wchar:wchar ............................................................................................................................ passed (0.000 sec)
% [44/62] wchar:wchar ............................................................................................................................ passed (0.000 sec)
% [45/62] wchar:wchar ............................................................................................................................ passed (0.000 sec)
% [46/62] wchar:char_1 ......................................................................................................................... **FAILED (0.000 sec)
ERROR: [Thread main] /home/mike/swipl-devel/packages/cpp/test_ffi.pl:256:
ERROR: [Thread main]     test wchar:char_1: received error: test_ffi:atom_ffi_/2: No permission to read stream `current_output' (requested stream has wrong mode)
% End unit wchar: **FAILED (0.004 sec CPU)
% Start unit: scan

<snip>

% End unit call: passed (0.014 sec CPU)
% 3 tests are blocked (use run_tests/2 with show_blocked(true) for details)
ERROR: [Thread main] 4 tests failed
% 58 tests passed
% Test run completed in 0.136 seconds (0.118 cpu)
ERROR: [Thread main] -g test_ffi: false


85/96 Test #88: json:json_schema .................   Passed    0.13 sec
      Start 89: json:json_rpc
<hung>



```

Thanks for reporting. Both are fixed. I’m trying to clean the 134 open issues. Closed about half and clearly fixed one wrong :frowning: Builds and tests again for me.

I surely do. A bit of programming is a good distraction though :slight_smile: Bad news is that more surgery is needed and it is more serious than hoped for due to complications :frowning:

Thanks Jan. Nearly there - a single failure:

54/96 Test #54: http:proxy …***Failed 1.35 sec
% Start unit: proxy
% [1/13] proxy:Direct connection for TCP … passed (0.342 sec)
% [2/13] proxy:All connections via SOCKS … passed (0.052 sec)
% [3/13] proxy:Some TCP connections via SOCKS … passed (0.047 sec)
% [4/13] proxy:First try SOCKS then fall back to direct … passed (0.051 sec)
% [5/13] proxy:First try direct to a nonexistent-host then fall back to SOCKS … passed (0.045 sec)
% [6/13] proxy:All TCP connections via HTTP … passed (0.061 sec)
% [7/13] proxy:All TCP connections via HTTP but to a non-existent server … passed (0.037 sec)
% [8/13] proxy:Request URL directly … passed (0.108 sec)
% [9/13] proxy:Request URL when all connections go via SOCKS … passed (0.057 sec)
% [10/13] proxy:Request URL when all connections go via HTTP … passed (0.049 sec)
% [11/13] proxy:Request invalid URL directly and expect exception rather than failure … passed (0.053 sec)
% [12/13] proxy:Request HTTPS url via proxy - should get HTTP CONNECT and not HTTP GET … **FAILED (0.033 sec)
ERROR: [Thread main] /home/mike/swipl-devel/packages/http/test_proxy.pl:667:
ERROR: [Thread main] test proxy:‘Request HTTPS url via proxy - should get HTTP CONNECT and not HTTP GET’: received error: Unknown error term: proxy_error(tried([error(proxy(localhost,42217),error(socket_error(econnrefused,‘Connection refused’),_1360))-]))
% Started server at http://localhost:41101/
% Started server at https://localhost:43265/
Warning: [Thread main] Unknown message: stop(http_proxy_server,error(socket_error(econnrefused,‘Connection refused’),_2576))

% [13/13] proxy:Test an exotic application-level proxy - http with authentication … passed (0.037 sec)
% End unit proxy: **FAILED (0.386 sec CPU)
ERROR: [Thread main] 1 test failed
% 12 tests passed
% Test run completed in 1.008 seconds (0.397 cpu)
ERROR: [Thread main] -g test_proxy: false

Incidentally, the http proxy tests fail due to concurrency issues with test port allocation. This was recently improved a little, but there are still opportunities for these tests to fail. Just ignore them …