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

killall -9

Moderator: Developers

Post Reply
puisor
New User
Posts: 6
Joined: Sun Nov 15, 2020 11:28 pm

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

#1

Post by puisor » Mon Jan 18, 2021 12:28 am

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.
Last edited by puisor on Tue Jan 26, 2021 1:55 pm, edited 1 time in total.

puisor
New User
Posts: 6
Joined: Sun Nov 15, 2020 11:28 pm

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

#2

Post by puisor » Tue Jan 26, 2021 1:54 pm

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.

User avatar
doomjoshuaboy
Developer
Posts: 304
Joined: Thu Aug 02, 2012 5:36 am
Location: Australia
Contact:

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

#3

Post by doomjoshuaboy » Sat Jul 31, 2021 6:02 am

hi Puisor

thanks for letting me know and adding this bug towards me I'll fix this now in my github

Post Reply