PCEM compilation on Ubuntu 17.10

Support and general discussion.
legluondunet
Posts: 11
Joined: Tue 12 Apr, 2016 10:50 pm

PCEM compilation on Ubuntu 17.10

Postby legluondunet » Tue 17 Oct, 2017 1:50 pm

Hello,
I tried to compile PCEM on Ubuntu 17.10.
But I obtained this error:

Code: Select all

g++ -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v12\" -DPACKAGE_STRING=\"PCem\ v12\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<pcem@pcem-emulator.co.uk\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v12\" -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -DHAVE_LIBPTHREAD=1 -I.    -I/usr/lib/x86_64-linux-gnu/wx/include/base-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -pthread -I/usr/include/SDL2 -D_REENTRANT -DUSE_NETWORKING -g -O2 -MT pcem-wave8580_P_T.o -MD -MP -MF .deps/pcem-wave8580_P_T.Tpo -c -o pcem-wave8580_P_T.o `test -f 'resid-fp/wave8580_P_T.cc' || echo './'`resid-fp/wave8580_P_T.cc
mv -f .deps/pcem-wave8580_P_T.Tpo .deps/pcem-wave8580_P_T.Po
g++ -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v12\" -DPACKAGE_STRING=\"PCem\ v12\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<pcem@pcem-emulator.co.uk\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v12\" -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -DHAVE_LIBPTHREAD=1 -I.    -I/usr/lib/x86_64-linux-gnu/wx/include/base-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -pthread -I/usr/include/SDL2 -D_REENTRANT -DUSE_NETWORKING -g -O2 -MT pcem-wave8580__ST.o -MD -MP -MF .deps/pcem-wave8580__ST.Tpo -c -o pcem-wave8580__ST.o `test -f 'resid-fp/wave8580__ST.cc' || echo './'`resid-fp/wave8580__ST.cc
mv -f .deps/pcem-wave8580__ST.Tpo .deps/pcem-wave8580__ST.Po
g++ -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v12\" -DPACKAGE_STRING=\"PCem\ v12\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<pcem@pcem-emulator.co.uk\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v12\" -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -DHAVE_LIBPTHREAD=1 -I.    -I/usr/lib/x86_64-linux-gnu/wx/include/base-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -pthread -I/usr/include/SDL2 -D_REENTRANT -DUSE_NETWORKING -g -O2 -MT pcem-wave.o -MD -MP -MF .deps/pcem-wave.Tpo -c -o pcem-wave.o `test -f 'resid-fp/wave.cc' || echo './'`resid-fp/wave.cc
mv -f .deps/pcem-wave.Tpo .deps/pcem-wave.Po
g++ -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v12\" -DPACKAGE_STRING=\"PCem\ v12\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<pcem@pcem-emulator.co.uk\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v12\" -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -DHAVE_LIBPTHREAD=1 -I.    -I/usr/lib/x86_64-linux-gnu/wx/include/base-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -pthread -I/usr/include/SDL2 -D_REENTRANT -DUSE_NETWORKING -g -O2 -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:0:
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:0,
                 from wx-app.h:6,
                 from wx-main.cc:1:
/usr/include/wx-3.0/wx/event.h:632:28: note: forward declaration of ‘class wxCommandEvent’
 class WXDLLIMPEXP_FWD_CORE wxCommandEvent;
                            ^~~~~~~~~~~~~~
In file included from wx-main.cc:1:0:
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:0,
                 from wx-app.h:6,
                 from wx-main.cc:1:
/usr/include/wx-3.0/wx/event.h:632:28: note: forward declaration of ‘class wxCommandEvent’
 class WXDLLIMPEXP_FWD_CORE wxCommandEvent;
                            ^~~~~~~~~~~~~~
In file included from wx-main.cc:1:0:
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:0,
                 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:0:
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
Makefile:4117 : la recette pour la cible « pcem-wx-main.o » a échouée
make[1]: *** [pcem-wx-main.o] Erreur 1
Makefile:369 : la recette pour la cible « all-recursive » a échouée
make: *** [all-recursive] Erreur 1


You can consult the full compilation log on Ubuntu Pastebin:
https://paste.ubuntu.com/25759498/

Thank you for your help.

LGDN.
SarahWalker
Site Admin
Posts: 1333
Joined: Thu 24 Apr, 2014 4:18 pm

Re: PCEM compilation on Ubuntu 17.10

Postby SarahWalker » Tue 17 Oct, 2017 5:43 pm

Looks like something wrong with your wxWidgets installation. Can you post the output from 'wx-config --list' and 'wx-config --cxxflags' please?
legluondunet
Posts: 11
Joined: Tue 12 Apr, 2016 10:50 pm

Re: PCEM compilation on Ubuntu 17.10

Postby legluondunet » Tue 17 Oct, 2017 7:59 pm

Certainly:

Code: Select all

$ wx-config --list

    Default config is gtk2-unicode-3.0

  Default config will be used for output

  Alternate matches:
    base-unicode-3.0

  Also available in /usr:
    base-unicode-release-2.8
    gtk2-unicode-release-2.8


Code: Select all

$ wx-config --cxxflags
-I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread
SarahWalker
Site Admin
Posts: 1333
Joined: Thu 24 Apr, 2014 4:18 pm

Re: PCEM compilation on Ubuntu 17.10

Postby SarahWalker » Tue 17 Oct, 2017 8:52 pm

Hmm. Stupid question, do you have libwxgtk3.0-dev installed?
legluondunet
Posts: 11
Joined: Tue 12 Apr, 2016 10:50 pm

Re: PCEM compilation on Ubuntu 17.10

Postby legluondunet » Wed 18 Oct, 2017 6:26 am

I just verified, yes it is.
SarahWalker
Site Admin
Posts: 1333
Joined: Thu 24 Apr, 2014 4:18 pm

Re: PCEM compilation on Ubuntu 17.10

Postby SarahWalker » Wed 18 Oct, 2017 6:23 pm

I'm out of ideas I'm afraid. This looks like a wxWidgets issue rather than a PCem issue, so maybe ask on the wxWidgets forum?
szadycbr
Posts: 185
Joined: Mon 21 Nov, 2016 6:23 pm

Re: PCEM compilation on Ubuntu 17.10

Postby szadycbr » Thu 19 Oct, 2017 7:11 am

Hi there, i just did Compile newest from source on AntiX based on debian, and it always works well for me, but i never do ./configure , always straight from src: make -f Makefile.linux64-wx-sdl2 and wx compile no problem. however i try to do same as You to get networking , and i did ./configure --enable-networking --enable-wx and ./configure --enable-wx without networking and after "make" i got error like this :

Code: Select all

pcem-model.o:(.data+0x19d0): undefined reference to `at_t3100e_init'
pcem-sound.o:(.data+0x638): undefined reference to `es1371_device'
pcem-sound.o:(.data+0x698): undefined reference to `es1371_device'
pcem-video.o: In function `video_init':
video.c:(.text+0x311): undefined reference to `t3100e_device'
collect2: error: ld returned 1 exit status
Makefile:662: recipe for target 'pcem' failed
make[1]: *** [pcem] Error 1
make[1]: Leaving directory '/home/szady/Downloads/pcem/src'
Makefile:369: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

I believe it is not a big problem , just those addition are not included somewhere in the script, but Makefile.linux64-wx-sdl2 compiles no problem, only if i try use ./configure errors appear.
So yeah, Sarah is usually right or maybe always? and it must be problem on your side in ubuntu.
Take care, everybody ;)

EDIT: Dont know if its of any help but i always use advice from bit on "Linux gui discussion " and i do install libwxgtk3.0-dev , lib ver. is 3.0.2-1+b1
AmatCoder
Posts: 28
Joined: Thu 02 Mar, 2017 8:45 pm

Re: PCEM compilation on Ubuntu 17.10

Postby AmatCoder » Thu 19 Oct, 2017 9:07 am

@szadycbr

Just type in terminal:

Code: Select all

$ autoreconf -fi
and re-run ./configure && make.
AmatCoder
Posts: 28
Joined: Thu 02 Mar, 2017 8:45 pm

Re: PCEM compilation on Ubuntu 17.10

Postby AmatCoder » Thu 19 Oct, 2017 9:17 am

@legluondunet

I don't use Ubuntu, but you can try:

Code: Select all

$ sudo update-alternatives --config wx-config
to choose the correct wx-config (gtk2-unicode-release-3.0).
legluondunet
Posts: 11
Joined: Tue 12 Apr, 2016 10:50 pm

Re: PCEM compilation on Ubuntu 17.10

Postby legluondunet » Thu 19 Oct, 2017 10:38 am

Thank you for the tips but there is only one alternative on my Ubuntu install and it is gtk2-unicode-release-3.0.

I installed this package: libwxbase3.0-dev and now I go far in the compilation process, no more wx related errors compilation.
Now it stops on slirp:

Code: Select all

...........
gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v12\" -DPACKAGE_STRING=\"PCem\ v12\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<pcem@pcem-emulator.co.uk\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v12\" -DHAVE_LIBGL=1 -DHAVE_LIBOPENAL=1 -DHAVE_LIBPTHREAD=1 -I.    -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-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 -O3 -MT pcem-wx-hostconfig.o -MD -MP -MF .deps/pcem-wx-hostconfig.Tpo -c -o pcem-wx-hostconfig.o `test -f 'wx-hostconfig.c' || echo './'`wx-hostconfig.c
mv -f .deps/pcem-wx-hostconfig.Tpo .deps/pcem-wx-hostconfig.Po
make -C slirp
gcc -I. -Ofast -Wall -c bootp.c -o bootp.o
gcc -I. -Ofast -Wall -c cksum.c -o cksum.o
gcc -I. -Ofast -Wall -c debug.c -o debug.o
In file included from debug.c:9:0:
debug.c: In function ‘purgesocks’:
slirp.h:70:25: warning: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
 # define closesocket(s) close(s)
                         ^
debug.c:388:2: note: in expansion of macro ‘closesocket’
  closesocket(so->s); //close the socket
  ^~~~~~~~~~~
gcc -I. -Ofast -Wall -c if.c -o if.o
gcc -I. -Ofast -Wall -c ip_icmp.c -o ip_icmp.o
gcc -I. -Ofast -Wall -c ip_input.c -o ip_input.o
In file included from ip_input.c:41:0:
ip_input.c: In function ‘ip_input’:
slirp.h:16:10: error: ‘uintptr_t’ undeclared (first use in this function); did you mean ‘__intptr_t’?
         (uintptr_t)(address) - \
          ^
ip_input.c:164:18: note: in expansion of macro ‘container_of’
             fp = container_of(l, struct ipq, ip_link);
                  ^~~~~~~~~~~~
slirp.h:16:10: note: each undeclared identifier is reported only once for each function it appears in
         (uintptr_t)(address) - \
          ^
ip_input.c:164:18: note: in expansion of macro ‘container_of’
             fp = container_of(l, struct ipq, ip_link);
                  ^~~~~~~~~~~~
ip_input.c: In function ‘ip_reass’:
ip_input.c:343:20: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
   struct mbuf *t = dtom(q);
                    ^~~~
ip_input.c:345:12: warning: passing argument 2 of ‘m_cat’ from incompatible pointer type [-Wincompatible-pointer-types]
   m_cat(m, t);
            ^
In file included from slirp.h:271:0,
                 from ip_input.c:41:
mbuf.h:137:6: note: expected ‘struct SLIRPmbuf *’ but argument is of type ‘struct mbuf *’
 void m_cat _P((register struct SLIRPmbuf *, register struct SLIRPmbuf *));
      ^~~~~
In file included from ip_input.c:41:0:
ip_input.c: In function ‘ip_slowtimo’:
slirp.h:16:10: error: ‘uintptr_t’ undeclared (first use in this function); did you mean ‘__intptr_t’?
         (uintptr_t)(address) - \
          ^
ip_input.c:453:20: note: in expansion of macro ‘container_of’
   struct ipq *fp = container_of(l, struct ipq, ip_link);
                    ^~~~~~~~~~~~
Makefile:16 : la recette pour la cible « ip_input.o » a échouée
make[2]: *** [ip_input.o] Erreur 1
Makefile:4468 : la recette pour la cible « slirp/libslirp.a » a échouée
make[1]: *** [slirp/libslirp.a] Erreur 2
Makefile:369 : la recette pour la cible « all-recursive » a échouée
make: *** [all-recursive] Erreur 1


If I don't enable networking option, I can now compile normally PCEM.
Do I need to install a special library for slirp compilation?
Last edited by legluondunet on Thu 19 Oct, 2017 11:49 am, edited 1 time in total.
AmatCoder
Posts: 28
Joined: Thu 02 Mar, 2017 8:45 pm

Re: PCEM compilation on Ubuntu 17.10

Postby AmatCoder » Thu 19 Oct, 2017 11:43 am

Add into src/slirp/slirp.h file:

Code: Select all

#include <stdint.h>
szadycbr
Posts: 185
Joined: Mon 21 Nov, 2016 6:23 pm

Re: PCEM compilation on Ubuntu 17.10

Postby szadycbr » Thu 19 Oct, 2017 12:36 pm

@Amatcoder
Thanks, now i will remember, but i dont usually use autoconf, the linux64-wx-sdl2 is all i need for now.
legluondunet
Posts: 11
Joined: Tue 12 Apr, 2016 10:50 pm

Re: PCEM compilation on Ubuntu 17.10

Postby legluondunet » Thu 19 Oct, 2017 12:37 pm

AmatCoder wrote:Add into src/slirp/slirp.h file:

Code: Select all

#include <stdint.h>


Bingo! :) :) :)
Pcem finally compiles on Ubuntu 17.10 with wx and networking.

Thank you all!
jznomoney
Posts: 42
Joined: Sat 06 Dec, 2014 9:11 pm

Re: PCEM compilation on Ubuntu 17.10

Postby jznomoney » Mon 06 Nov, 2017 10:42 am

How do you get it to force a 32bit build on a 64bit system?

Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest