Skip to content

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

@TheVibster

Description

@TheVibster

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions