Skip to content

PCem errors out when compile the disc part in EndeavourOS #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TheVibster opened this issue May 26, 2025 · 22 comments · May be fixed by #22
Open

PCem errors out when compile the disc part in EndeavourOS #21

TheVibster opened this issue May 26, 2025 · 22 comments · May be fixed by #22

Comments

@TheVibster
Copy link

TheVibster commented May 26, 2025

hello. i was trying to compile PCem on my new EndeavourOS install, just because i wanted to set up a machine that i could TAS, and for some reason, it gave me an error about "incompatible pointers" and "too many arguments":

gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-disc.o -MD -MP -MF .deps/pcem-disc.Tpo -c -o pcem-disc.o `test -f 'disc.c' || echo './'`disc.c
disc.c: In function ‘disc_reset’:
disc.c:262:37: error: passing argument 2 of ‘timer_add’ from incompatible pointer type [-Wincompatible-pointer-types]
  262 |         timer_add(&disc_poll_timer, disc_poll, NULL, 0);
      |                                     ^~~~~~~~~
      |                                     |
      |                                     void (*)(void)
In file included from ibm.h:5,
                 from disc.c:1:
timer.h:47:42: note: expected ‘void (*)(void *)’ but argument is of type ‘void (*)(void)’
   47 | void timer_add(pc_timer_t *timer, void (*callback)(void *p), void *p, int start_timer);
      |                                   ~~~~~~~^~~~~~~~~~~~~~~~~~
disc.c:188:6: note: ‘disc_poll’ declared here
  188 | void disc_poll()
      |      ^~~~~~~~~
disc.c: In function ‘disc_stop’:
disc.c:339:17: error: too many arguments to function ‘drives[drive].stop’; expected 0, have 1
  339 |                 drives[drive].stop(drive);
      |                 ^~~~~~             ~~~~~
In file included from disc.c:4:
disc.h:9:16: note: declared here
    9 |         void (*stop)();
      |                ^~~~
make[1]: *** [Makefile:2451: pcem-disc.o] Error 1
make[1]: Leaving directory '/home/dominic/pcem/src'
make: *** [Makefile:373: all-recursive] Error 1

Image
heres proof i run EndeavourOS as well

i don't know if this is just an issue on EndeavourOS or i might just not have appropriate packages, but i honestly hope i can get help, because i don't know what's going on.

@vadosnaprimer
Copy link

How are you building?

@TheVibster
Copy link
Author

How are you building?

I'm building it regularly as the guide says.

@vadosnaprimer
Copy link

Which guide?

@TheVibster
Copy link
Author

Which guide?

The building guide in this repository

@vadosnaprimer
Copy link

WHICH "GUIDE IN THIS REPOSITORY" EXACTLY?

@TheVibster
Copy link
Author

WHICH "GUIDE IN THIS REPOSITORY" EXACTLY?

https://github.com/TASEmulators/pcem/wiki/Building

this one 😭🙏

@vadosnaprimer
Copy link

Finally. The problem is that there's a guide in the readme and it doesn't work, because I removed the files that are generated by automake, and I never got around to updating the readme #19. So I had to make sure you're not using that old broken guide.

The error itself is weird tho. Which GCC version is that?

@TheVibster
Copy link
Author

Finally. The problem is that there's a guide in the readme and it doesn't work, because I removed the files that are generated by automake, and I never got around to updating the readme #19. So I had to make sure you're not using that old broken guide.

The error itself is weird tho. Which GCC version is that?

gcc (GCC) 15.1.1 20250425

@vadosnaprimer
Copy link

vadosnaprimer commented May 27, 2025

Go to line

pcem/src/disc.c

Line 188 in 19ea17b

void disc_poll()
and replace void disc_poll() with void disc_poll(void*), see if it fixes the problem. It's a GCC 15 thing where it defaults to C23 now.

@TheVibster
Copy link
Author

Making all in src
make[1]: Entering directory '/home/dominic/pcem/src'
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-disc.o -MD -MP -MF .deps/pcem-disc.Tpo -c -o pcem-disc.o `test -f 'disc.c' || echo './'`disc.c
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-disc_img.o -MD -MP -MF .deps/pcem-disc_img.Tpo -c -o pcem-disc_img.o `test -f 'disc_img.c' || echo './'`disc_img.c
disc.c:188:6: error: conflicting types for ‘disc_poll’; have ‘void(void *)’
  188 | void disc_poll(void*)
      |      ^~~~~~~~~
In file included from disc.c:4:
disc.h:22:6: note: previous declaration of ‘disc_poll’ with type ‘void(void)’
   22 | void disc_poll();
      |      ^~~~~~~~~
disc.c: In function ‘disc_stop’:
disc.c:339:17: error: too many arguments to function ‘drives[drive].stop’; expected 0, have 1
  339 |                 drives[drive].stop(drive);
      |                 ^~~~~~             ~~~~~
disc.h:9:16: note: declared here
    9 |         void (*stop)();
      |                ^~~~
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-disc_sector.o -MD -MP -MF .deps/pcem-disc_sector.Tpo -c -o pcem-disc_sector.o `test -f 'disc_sector.c' || echo './'`disc_sector.c
make[1]: *** [Makefile:2451: pcem-disc.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/pcem-disc_sector.Tpo .deps/pcem-disc_sector.Po
mv -f .deps/pcem-disc_img.Tpo .deps/pcem-disc_img.Po
make[1]: Leaving directory '/home/dominic/pcem/src'
make: *** [Makefile:373: all-recursive] Error 1

I'm still getting errors.

@vadosnaprimer
Copy link

Right, do the same replacement in disc.h line 22.

@TheVibster
Copy link
Author

Making all in src
make[1]: Entering directory '/home/dominic/pcem/src'
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-disc.o -MD -MP -MF .deps/pcem-disc.Tpo -c -o pcem-disc.o `test -f 'disc.c' || echo './'`disc.c
disc.c: In function ‘disc_stop’:
disc.c:339:17: error: too many arguments to function ‘drives[drive].stop’; expected 0, have 1
  339 |                 drives[drive].stop(drive);
      |                 ^~~~~~             ~~~~~
In file included from disc.c:4:
disc.h:9:16: note: declared here
    9 |         void (*stop)();
      |                ^~~~
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-disc_fdi.o -MD -MP -MF .deps/pcem-disc_fdi.Tpo -c -o pcem-disc_fdi.o `test -f 'disc_fdi.c' || echo './'`disc_fdi.c
make[1]: *** [Makefile:2451: pcem-disc.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/pcem-disc_fdi.Tpo .deps/pcem-disc_fdi.Po
make[1]: Leaving directory '/home/dominic/pcem/src'
make: *** [Makefile:373: all-recursive] Error 1

Looks like we're getting somewhere.

@TheVibster
Copy link
Author

Making all in src
make[1]: Entering directory '/home/dominic/pcem/src'
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-disc.o -MD -MP -MF .deps/pcem-disc.Tpo -c -o pcem-disc.o `test -f 'disc.c' || echo './'`disc.c
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-disc_img.o -MD -MP -MF .deps/pcem-disc_img.Tpo -c -o pcem-disc_img.o `test -f 'disc_img.c' || echo './'`disc_img.c
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-disc_sector.o -MD -MP -MF .deps/pcem-disc_sector.Tpo -c -o pcem-disc_sector.o `test -f 'disc_sector.c' || echo './'`disc_sector.c
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-dma.o -MD -MP -MF .deps/pcem-dma.Tpo -c -o pcem-dma.o `test -f 'dma.c' || echo './'`dma.c
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-esdi_at.o -MD -MP -MF .deps/pcem-esdi_at.Tpo -c -o pcem-esdi_at.o `test -f 'esdi_at.c' || echo './'`esdi_at.c
esdi_at.c:3:9: warning: ‘_GNU_SOURCE’ redefined
    3 | #define _GNU_SOURCE
      |         ^~~~~~~~~~~
<command-line>: note: this is the location of the previous definition
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-f82c710_upc.o -MD -MP -MF .deps/pcem-f82c710_upc.Tpo -c -o pcem-f82c710_upc.o `test -f 'f82c710_upc.c' || echo './'`f82c710_upc.c
mv -f .deps/pcem-disc.Tpo .deps/pcem-disc.Po
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-fdc.o -MD -MP -MF .deps/pcem-fdc.Tpo -c -o pcem-fdc.o `test -f 'fdc.c' || echo './'`fdc.c
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT     -O3 -fcommon -MT pcem-fdc37c665.o -MD -MP -MF .deps/pcem-fdc37c665.Tpo -c -o pcem-fdc37c665.o `test -f 'fdc37c665.c' || echo './'`fdc37c665.c
fdc.c: In function ‘fdc_init’:
fdc.c:1360:31: error: passing argument 2 of ‘timer_add’ from incompatible pointer type [-Wincompatible-pointer-types]
 1360 |         timer_add(&fdc.timer, fdc_callback, NULL, 0);
      |                               ^~~~~~~~~~~~
      |                               |
      |                               void (*)(void)
In file included from ibm.h:5,
                 from fdc.c:3:
timer.h:47:42: note: expected ‘void (*)(void *)’ but argument is of type ‘void (*)(void)’
   47 | void timer_add(pc_timer_t *timer, void (*callback)(void *p), void *p, int start_timer);
      |                                   ~~~~~~~^~~~~~~~~~~~~~~~~~
fdc.c:801:6: note: ‘fdc_callback’ declared here
  801 | void fdc_callback()
      |      ^~~~~~~~~~~~
mv -f .deps/pcem-disc_img.Tpo .deps/pcem-disc_img.Po
make[1]: *** [Makefile:2549: pcem-fdc.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/pcem-disc_sector.Tpo .deps/pcem-disc_sector.Po
mv -f .deps/pcem-fdc37c665.Tpo .deps/pcem-fdc37c665.Po
mv -f .deps/pcem-f82c710_upc.Tpo .deps/pcem-f82c710_upc.Po
mv -f .deps/pcem-esdi_at.Tpo .deps/pcem-esdi_at.Po
mv -f .deps/pcem-dma.Tpo .deps/pcem-dma.Po
make[1]: Leaving directory '/home/dominic/pcem/src'
make: *** [Makefile:373: all-recursive] Error 1

I also did what it told me to do at line 339 of disc.c and I'm getting new errors this time

@vadosnaprimer
Copy link

Try rerunning configure with ./configure --enable-release-build CC="gcc -std=c11" instead. Someone with a gcc 15 would have to properly fix all this stuff.

@TheVibster
Copy link
Author

gcc -std=c11 -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT    -DRELEASE_BUILD -O3 -fcommon -MT pcem-wx-sdl2-midi.o -MD -MP -MF .deps/pcem-wx-sdl2-midi.Tpo -c -o pcem-wx-sdl2-midi.o `test -f 'wx-sdl2-midi.c' || echo './'`wx-sdl2-midi.c
mv -f .deps/pcem-wx-sdl2-midi.Tpo .deps/pcem-wx-sdl2-midi.Po
gcc -std=c11 -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT    -DRELEASE_BUILD -O3 -fcommon -MT pcem-codegen_backend_x86-64.o -MD -MP -MF .deps/pcem-codegen_backend_x86-64.Tpo -c -o pcem-codegen_backend_x86-64.o `test -f 'codegen_backend_x86-64.c' || echo './'`codegen_backend_x86-64.c
gcc -std=c11 -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT    -DRELEASE_BUILD -O3 -fcommon -MT pcem-codegen_backend_x86-64_ops.o -MD -MP -MF .deps/pcem-codegen_backend_x86-64_ops.Tpo -c -o pcem-codegen_backend_x86-64_ops.o `test -f 'codegen_backend_x86-64_ops.c' || echo './'`codegen_backend_x86-64_ops.c
codegen_backend_x86-64.c: In function ‘codegen_backend_init’:
codegen_backend_x86-64.c:335:9: error: implicit declaration of function ‘asm’ [-Wimplicit-function-declaration]
  335 |         asm(
      |         ^~~
codegen_backend_x86-64.c:336:31: error: expected ‘)’ before ‘:’ token
  336 |                 "stmxcsr %0\n"
      |                               ^
      |                               )
  337 |                 : "=m" (cpu_state.old_fp_control)
      |                 ~              
codegen_backend_x86-64.c:335:12: note: to match this ‘(’
  335 |         asm(
      |            ^
make[1]: *** [Makefile:5601: pcem-codegen_backend_x86-64.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/pcem-wx-config.Tpo .deps/pcem-wx-config.Po
mv -f .deps/pcem-x86seg.Tpo .deps/pcem-x86seg.Po
mv -f .deps/pcem-wx-sdl2-video-gl3.Tpo .deps/pcem-wx-sdl2-video-gl3.Po
mv -f .deps/pcem-wx-dialogbox.Tpo .deps/pcem-wx-dialogbox.Po
mv -f .deps/pcem-wx-app.Tpo .deps/pcem-wx-app.Po
mv -f .deps/pcem-wx-deviceconfig.Tpo .deps/pcem-wx-deviceconfig.Po
mv -f .deps/pcem-wx-resources.Tpo .deps/pcem-wx-resources.Po
mv -f .deps/pcem-wx-main.Tpo .deps/pcem-wx-main.Po
mv -f .deps/pcem-codegen_backend_x86-64_ops.Tpo .deps/pcem-codegen_backend_x86-64_ops.Po
mv -f .deps/pcem-wx-status.Tpo .deps/pcem-wx-status.Po
mv -f .deps/pcem-wx-shaderconfig.Tpo .deps/pcem-wx-shaderconfig.Po
mv -f .deps/pcem-wx-createdisc.Tpo .deps/pcem-wx-createdisc.Po
mv -f .deps/pcem-wx-joystickconfig.Tpo .deps/pcem-wx-joystickconfig.Po
mv -f .deps/pcem-wx-utils.Tpo .deps/pcem-wx-utils.Po
mv -f .deps/pcem-vid_voodoo_render.Tpo .deps/pcem-vid_voodoo_render.Po
make[1]: Leaving directory '/home/dominic/pcem/src'
make: *** [Makefile:373: all-recursive] Error 1

another error

@vadosnaprimer
Copy link

Ugh... ./configure --enable-release-build CC="gcc -std=c99"? I have no idea at this point.

@TheVibster
Copy link
Author

TheVibster commented May 27, 2025

Ugh... ./configure --enable-release-build CC="gcc -std=c99"? I have no idea at this point.

holy shit that actually worked

edit: nvm, it built, but when i launch a machine, it crashes.

edit 2: machines upto a 486 (or a Socket 5 idk) work, but above, it doesn't

@vadosnaprimer
Copy link

Just use ubuntu 22-24 and you should be fine. Some versions of debian should work too. I'm not good enough at coding to fix bugs on esoteric distros.

@TheVibster
Copy link
Author

Just use ubuntu 22-24 and you should be fine. Some versions of debian should work too. I'm not good enough at coding to fix bugs on esoteric distros.

Alright. I think thats a good idea too honestly.

@Morilli Morilli linked a pull request May 28, 2025 that will close this issue
@vadosnaprimer
Copy link

@TheVibster please check out that pull request linked right above, see if it builds fine for you.

@TheVibster
Copy link
Author

@TheVibster please check out that pull request linked right above, see if it builds fine for you.

gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v17\" -DPACKAGE_STRING=\"PCem\ v17\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<[email protected]\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v17\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -DWXUSINGDLL -D__WXGTK3__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT    -DRELEASE_BUILD -O3 -fcommon -MT pcem-disc_fdi.o -MD -MP -MF .deps/pcem-disc_fdi.Tpo -c -o pcem-disc_fdi.o `test -f 'disc_fdi.c' || echo './'`disc_fdi.c
disc.c: In function ‘disc_reset’:
disc.c:262:37: error: passing argument 2 of ‘timer_add’ from incompatible pointer type [-Wincompatible-pointer-types]
  262 |         timer_add(&disc_poll_timer, disc_poll, NULL, 0);
      |                                     ^~~~~~~~~
      |                                     |
      |                                     void (*)(void)
In file included from ibm.h:5,
                 from disc.c:1:
timer.h:47:42: note: expected ‘void (*)(void *)’ but argument is of type ‘void (*)(void)’
   47 | void timer_add(pc_timer_t *timer, void (*callback)(void *p), void *p, int start_timer);
      |                                   ~~~~~~~^~~~~~~~~~~~~~~~~~
disc.c:188:6: note: ‘disc_poll’ declared here
  188 | void disc_poll()
      |      ^~~~~~~~~
disc.c: In function ‘disc_stop’:
disc.c:339:17: error: too many arguments to function ‘drives[drive].stop’; expected 0, have 1
  339 |                 drives[drive].stop(drive);
      |                 ^~~~~~             ~~~~~
In file included from disc.c:4:
disc.h:9:16: note: declared here
    9 |         void (*stop)();
      |                ^~~~
make[1]: *** [Makefile:2451: pcem-disc.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/pcem-device.Tpo .deps/pcem-device.Po
mv -f .deps/pcem-codegen_ops_jump.Tpo .deps/pcem-codegen_ops_jump.Po
mv -f .deps/pcem-cpu.Tpo .deps/pcem-cpu.Po
mv -f .deps/pcem-disc_fdi.Tpo .deps/pcem-disc_fdi.Po
mv -f .deps/pcem-codegen_ops_stack.Tpo .deps/pcem-codegen_ops_stack.Po
mv -f .deps/pcem-codegen_ops_shift.Tpo .deps/pcem-codegen_ops_shift.Po
mv -f .deps/pcem-codegen_ops_logic.Tpo .deps/pcem-codegen_ops_logic.Po
mv -f .deps/pcem-codegen_ops_misc.Tpo .deps/pcem-codegen_ops_misc.Po
mv -f .deps/pcem-codegen_ops_mov.Tpo .deps/pcem-codegen_ops_mov.Po
mv -f .deps/pcem-808x.Tpo .deps/pcem-808x.Po
mv -f .deps/pcem-386_dynarec_ops.Tpo .deps/pcem-386_dynarec_ops.Po
mv -f .deps/pcem-386_dynarec.Tpo .deps/pcem-386_dynarec.Po
make[1]: Leaving directory '/home/dominic/pcem/src'
make: *** [Makefile:373: all-recursive] Error 1

now im getting different errors.

@vadosnaprimer
Copy link

Did you actually check out the branch?
https://github.com/Morilli/pcem/tree/fix-prototypes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants