Page 1 of 1

[SOLVED] Build fails on FreeBSD 13/arm64: sqlite3.c:109722:1: internal compiler error: Illegal instruction

Posted: Mon Jan 18, 2021 12:28 am
by puisor
I am trying to build Zandronum Server on FreeBSD 13-CURRENT on arm64. I am following the instructions in the wiki at https://wiki.zandronum.com/Zandronum_Server_on_FreeBSD as best I can (GCC 5 is no longer in the ports tree so I'm using GCC 9). I can generate the makefiles, but when I try to build the server using gmake -j$(nproc), I get the following error:

Code: Select all

[ 35%] Built target re2c
/home/puisor/zabuild/zandronum-stable/sqlite/sqlite3.c: In function 'sqlite3DeleteColumnNames.isra.0':
/home/puisor/zabuild/zandronum-stable/sqlite/sqlite3.c:109722:1: internal compiler error: Illegal instruction
109722 | }
       | ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
gmake[2]: *** [sqlite/CMakeFiles/sqlite3.dir/build.make:82: sqlite/CMakeFiles/sqlite3.dir/sqlite3.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:580: sqlite/CMakeFiles/sqlite3.dir/all] Error 2
gmake: *** [Makefile:103: all] Error 2
puisor@gouki:~/zabuild/build $
The following ports are installed:

Code: Select all

sdl-1.2.15_15,2                Cross-platform multimedia development API
gcc9-9.3.0_1                   GNU Compiler Collection 9
sqlite3-3.34.0,1               SQL database engine in a C library
I didn't install OpenSSL as it is part of the base OS. However openssl version reports: OpenSSL 1.1.1i-freebsd 8 Dec 2020

Does anyone know what might be wrong? Any help would be greatly appreciated.

Re: Build fails on FreeBSD 13: sqlite3.c:109722:1: internal compiler error: Illegal instruction

Posted: Tue Jan 26, 2021 1:54 pm
by puisor
In case anyone is interested, here is the solution:

1. Follow DoomJoshuaBoy's instructions at https://wiki.zandronum.com/Compiling_th ... spberry_Pi until you've checked out the source using git clone.

2. Edit ./zandronum-rpi/src/sdl/i_system.cpp and add #include <sys/wait.h> to the includes.

3. Edit ./zandronum-rpi/upnpnat/xmlParser.cpp and change lpszNew[cbData] = (TCHAR)NULL; to lpszNew[cbData] = (TCHAR)0; in line 661.

4. Continue with DoomJoshuaBoy's instructions to finish compiling zandronum-server.

I found the answers in this bug which was logged in 2018, and which also contains other fixes: https://zandronum.com/tracker/print_bug ... ug_id=3403. I'm not sure why these fixes never made it into Zandronum's source, but it would be good if one of the maintainers could do this so nobody else has to go through what I did just to compile the server.