Compiling pcem on raspberry pi 4

Support and general discussion.
Post Reply
TheGMOGamer
Posts: 6
Joined: Sat 24 Oct, 2020 5:09 pm

Compiling pcem on raspberry pi 4

Post by TheGMOGamer »

Getting this error. Any ideas?

Code: Select all

pi@raspberrypi:~/pcem $ make
Making all in src
make[1]: Entering directory '/home/pi/pcem/src'
g++ -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_LIBPTHREAD=1 -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -I.    -I/usr/lib/arm-linux-gnueabihf/wx/include/base-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -pthread -I/usr/include/SDL2 -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -D_REENTRANT    -O3 -MT pcem-wx-main.o -MD -MP -MF .deps/pcem-wx-main.Tpo -c -o pcem-wx-main.o `test -f 'wx-main.cc' || echo './'`wx-main.cc
In file included from wx-main.cc:1:
wx-app.h:57:29: error: invalid use of incomplete type ‘class wxCommandEvent’
 class CallbackEvent: public wxCommandEvent
                             ^~~~~~~~~~~~~~
In file included from /usr/include/wx-3.0/wx/wx.h:24,
                 from wx-app.h:6,
                 from wx-main.cc:1:
/usr/include/wx-3.0/wx/event.h:653:28: note: forward declaration of ‘class wxCommandEvent’
 class WXDLLIMPEXP_FWD_CORE wxCommandEvent;
                            ^~~~~~~~~~~~~~
In file included from wx-main.cc:1:
wx-app.h: In constructor ‘CallbackEvent::CallbackEvent(WX_CALLBACK, void*)’:
wx-app.h:60:59: error: type ‘wxCommandEvent’ is not a direct base of ‘CallbackEvent’
         CallbackEvent(WX_CALLBACK callback, void* data) : wxCommandEvent(WX_CALLBACK_EVENT)
                                                           ^~~~~~~~~~~~~~
wx-app.h: In copy constructor ‘CallbackEvent::CallbackEvent(const CallbackEvent&)’:
wx-app.h:65:53: error: type ‘wxCommandEvent’ is not a direct base of ‘CallbackEvent’
         CallbackEvent(const CallbackEvent& event) : wxCommandEvent(event)
                                                     ^~~~~~~~~~~~~~
wx-app.h: In member function ‘wxEvent* CallbackEvent::Clone() const’:
wx-app.h:71:64: error: cannot convert ‘CallbackEvent*’ to ‘wxEvent*’ in return
         wxEvent* Clone() const { return new CallbackEvent(*this); }
                                                                ^
wx-app.h: At global scope:
wx-app.h:83:30: error: invalid use of incomplete type ‘class wxCommandEvent’
 class PopupMenuEvent: public wxCommandEvent
                              ^~~~~~~~~~~~~~
In file included from /usr/include/wx-3.0/wx/wx.h:24,
                 from wx-app.h:6,
                 from wx-main.cc:1:
/usr/include/wx-3.0/wx/event.h:653:28: note: forward declaration of ‘class wxCommandEvent’
 class WXDLLIMPEXP_FWD_CORE wxCommandEvent;
                            ^~~~~~~~~~~~~~
In file included from wx-main.cc:1:
wx-app.h:86:42: error: ‘wxMenu’ has not been declared
         PopupMenuEvent(wxWindow* window, wxMenu* menu, int* x, int* y) : wxCommandEvent(WX_POPUP_MENU_EVENT)
                                          ^~~~~~
wx-app.h:104:9: error: ‘wxMenu’ does not name a type; did you mean ‘wxMin’?
         wxMenu* GetMenu() const { return menu; }
         ^~~~~~
         wxMin
wx-app.h:111:9: error: ‘wxMenu’ does not name a type; did you mean ‘wxMin’?
         wxMenu* menu;
         ^~~~~~
         wxMin
wx-app.h: In constructor ‘PopupMenuEvent::PopupMenuEvent(wxWindow*, int*, int*, int*)’:
wx-app.h:86:74: error: type ‘wxCommandEvent’ is not a direct base of ‘PopupMenuEvent’
         PopupMenuEvent(wxWindow* window, wxMenu* menu, int* x, int* y) : wxCommandEvent(WX_POPUP_MENU_EVENT)
                                                                          ^~~~~~~~~~~~~~
wx-app.h:89:23: error: ‘class PopupMenuEvent’ has no member named ‘menu’
                 this->menu = menu;
                       ^~~~
wx-app.h: In copy constructor ‘PopupMenuEvent::PopupMenuEvent(const PopupMenuEvent&)’:
wx-app.h:93:55: error: type ‘wxCommandEvent’ is not a direct base of ‘PopupMenuEvent’
         PopupMenuEvent(const PopupMenuEvent& event) : wxCommandEvent(event)
                                                       ^~~~~~~~~~~~~~
wx-app.h:96:23: error: ‘class PopupMenuEvent’ has no member named ‘menu’
                 this->menu = event.GetMenu();
                       ^~~~
wx-app.h:96:36: error: ‘const class PopupMenuEvent’ has no member named ‘GetMenu’
                 this->menu = event.GetMenu();
                                    ^~~~~~~
wx-app.h: In member function ‘wxEvent* PopupMenuEvent::Clone() const’:
wx-app.h:101:65: error: cannot convert ‘PopupMenuEvent*’ to ‘wxEvent*’ in return
         wxEvent* Clone() const { return new PopupMenuEvent(*this); }
                                                                 ^
wx-app.h: At global scope:
wx-app.h:141:21: error: invalid use of incomplete type ‘class wxFrame’
 class Frame: public wxFrame
                     ^~~~~~~
In file included from /usr/include/wx-3.0/wx/wx.h:26,
                 from wx-app.h:6,
                 from wx-main.cc:1:
/usr/include/wx-3.0/wx/utils.h:54:28: note: forward declaration of ‘class wxFrame’
 class WXDLLIMPEXP_FWD_CORE wxFrame;
                            ^~~~~~~
In file included from wx-main.cc:1:
wx-app.h:144:54: error: ‘wxPoint’ does not name a type; did you mean ‘wxJoin’?
         Frame(App* app, const wxString& title, const wxPoint& pos,
                                                      ^~~~~~~
                                                      wxJoin
wx-app.h:145:31: error: ‘wxSize’ does not name a type; did you mean ‘wxTimer’?
                         const wxSize& size);
                               ^~~~~~
                               wxTimer
wx-app.h:151:9: error: ‘wxMenu’ does not name a type; did you mean ‘wxMin’?
         wxMenu* GetMenu();
         ^~~~~~
         wxMin
wx-app.h:167:9: error: ‘wxMenu’ does not name a type; did you mean ‘wxMin’?
         wxMenu* menu;
         ^~~~~~
         wxMin
make[1]: *** [Makefile:5749: pcem-wx-main.o] Error 1
make[1]: Leaving directory '/home/pi/pcem/src'
make: *** [Makefile:365: all-recursive] Error 1
Laucian
Posts: 11
Joined: Mon 28 Nov, 2016 6:49 pm

Re: Compiling pcem on raspberry pi 4

Post by Laucian »

Most of the compile errors I've had under Linux were solved by running

Code: Select all

autoreconf -i
, give that a shot.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Compiling pcem on raspberry pi 4

Post by JosepMa »

You seem not to have the wxwidgets headers, since it is not finding their classes. Did you run ./configure before running make?

Also, it is a good idea everytime that you get the source, to run autoreconf -i. (and ./configure and make )
Sarah is not using the linux makefiles, and sometimes they are not up-to-date.
TheGMOGamer
Posts: 6
Joined: Sat 24 Oct, 2020 5:09 pm

Re: Compiling pcem on raspberry pi 4

Post by TheGMOGamer »

Laucian wrote: Sat 28 Nov, 2020 6:06 am Most of the compile errors I've had under Linux were solved by running

Code: Select all

autoreconf -i
, give that a shot.


I get bash: autoreconf: command not found
edit: fixed with sudo apt-get install autoconf
JosepMa wrote: Sat 28 Nov, 2020 10:33 am You seem not to have the wxwidgets headers, since it is not finding their classes. Did you run ./configure before running make?

Also, it is a good idea everytime that you get the source, to run autoreconf -i. (and ./configure and make )
Sarah is not using the linux makefiles, and sometimes they are not up-to-date.
headers are installed

edit: apparently I had the wrong package installed. I needed libwxgtk3.0-gtk3-dev


This is working now! Thanks all!
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: Compiling pcem on raspberry pi 4

Post by omarsis81 »

TheGMOGamer wrote: Sat 28 Nov, 2020 9:53 pm
This is working now! Thanks all!
Could you please make a short but detailed guide on how to make a Pi executable?
What do I need to download? What parameters do I need to type to compile? Thanks
TheGMOGamer
Posts: 6
Joined: Sat 24 Oct, 2020 5:09 pm

Re: Compiling pcem on raspberry pi 4

Post by TheGMOGamer »

omarsis81 wrote: Sun 29 Nov, 2020 1:11 am
TheGMOGamer wrote: Sat 28 Nov, 2020 9:53 pm
This is working now! Thanks all!
Could you please make a short but detailed guide on how to make a Pi executable?
What do I need to download? What parameters do I need to type to compile? Thanks
Honestly, I'm not the best at documentation, but I downloaded all the -dev packages for the prerequisites in the readme on a fresh raspiOS install, along w/ build-essential and then ./configure then make
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Compiling pcem on raspberry pi 4

Post by leilei »

omarsis81 wrote: Sun 29 Nov, 2020 1:11 am Could you please make a short but detailed guide on how to make a Pi executable?
It wouldn't be anything different than the linux readme. All that's really "missing" are distro-specific instructions to get dependencies, and that varies (RaspiOS/Raspbian are debian-derived and would have the same exact steps as Debian would). It's pretty easy once you know the basic linux building common sense - unlike suggesting whatever "easy" emulation you claim in various threads.
Post Reply