Unable to compile PCem v16 for Linux

Support and general discussion.
Post Reply
Katakis
Posts: 100
Joined: Thu 05 Mar, 2015 6:42 am

Unable to compile PCem v16 for Linux

Post by Katakis »

I am attempting to compile PCem v16 on my new system (AMD Ryzen 5 3600, 16GB RAM, nVidia GeForce 1650) running Ubuntu 20.04. I always followed the instructions in the Readme-LINUX.txt file, and I seemed to compile previous PCems without any problems, but that was done on a different system, but PCem v16 is different. Whenever I execute "make", it fails with a "segmentation fault".

Code: Select all

Making all in src
make[1]: Entering directory '/home/gmp/PCemv16/src'
source='386_dynarec.c' object='pcem-386_dynarec.o' libtool=no \
DEPDIR=.deps depmode=none /bin/bash ../depcomp \
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v16\" -DPACKAGE_STRING=\"PCem\ v16\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<pcem@pcem-emulator.co.uk\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v16\" -DHAVE_LIBASOUND=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I/usr/include/SDL2 -D_REENTRANT  -DUSE_NETWORKING  -DRELEASE_BUILD -Wall -O0 -g -D_DEBUG -c -o pcem-386_dynarec.o `test -f '386_dynarec.c' || echo './'`386_dynarec.c
during GIMPLE pass: *rebuild_cgraph_edges
386_dynarec.c: In function ‘opJE_l’:
386_dynarec.c:644:1: internal compiler error: Segmentation fault
  644 | }
      | ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.
make[1]: *** [Makefile:1297: pcem-386_dynarec.o] Error 1
make[1]: Leaving directory '/home/gmp/PCemv16/src'
make: *** [Makefile:365: all-recursive] Error 1
As you can see, the error concerns the file 386_dynarec.c
User avatar
SarahWalker
Site Admin
Posts: 1897
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Unable to compile PCem v16 for Linux

Post by SarahWalker »

Compiler bug. Try another GCC version.
User avatar
MiraiMiracle
Posts: 44
Joined: Fri 06 Jul, 2018 4:42 pm

Re: Unable to compile PCem v16 for Linux

Post by MiraiMiracle »

386_dynarec.c seems to be broken on your Linux/GCC (possible too?). Did you compile that broken code? I think that you are having a bad copy of 386_dynarec.c or not, and you need to redownload the source.

And by the way: did you compile PCem that it works before?
"I should stay rolling as alive and kicking!"

-NANA MIZUKI ACCENT/the Second's catchphrase
Image
Katakis
Posts: 100
Joined: Thu 05 Mar, 2015 6:42 am

Re: Unable to compile PCem v16 for Linux

Post by Katakis »

What caused the error in the first place was me individually installing gcc first in the Ubuntu repository instead of build-essential first.

miraMiracle: "And by the way: did you compile PCem that it works before?"

I had LMD installed on my Mac machine and compiled v15 there, and I had no problems
Post Reply