compiling error

Discussion of development and patch submission.
Post Reply
User avatar
te_lanus
Posts: 135
Joined: Tue 28 Jul, 2015 4:47 am

compiling error

Post by te_lanus »

with the latest t1000 addition pcem seems no longer able to compile on linux (ubuntu 16.04)
pcem-keyboard_xt.o: In function `keyboard_xt_adddata':
keyboard_xt.c:(.text+0x11e): undefined reference to `t1000_syskey'
keyboard_xt.c:(.text+0x140): undefined reference to `t1000_syskey'
keyboard_xt.c:(.text+0x15a): undefined reference to `t1000_syskey'
keyboard_xt.c:(.text+0x172): undefined reference to `t1000_syskey'
keyboard_xt.c:(.text+0x18a): undefined reference to `t1000_syskey'
pcem-keyboard_xt.o:keyboard_xt.c:(.text+0x1a2): more undefined references to `t1000_syskey' follow
pcem-model.o:(.data+0x948): undefined reference to `xt_t1000_init'
pcem-model.o:(.data+0x950): undefined reference to `t1000_device'
pcem-nvr.o: In function `loadnvr':
nvr.c:(.text+0x743): undefined reference to `tc8521_loadnvr'
nvr.c:(.text+0x74a): undefined reference to `t1000_configsys_loadnvr'
pcem-nvr.o: In function `savenvr':
nvr.c:(.text+0xe53): undefined reference to `tc8521_savenvr'
nvr.c:(.text+0xe5a): undefined reference to `t1000_configsys_savenvr'
pcem-nvr.o: In function `loadnvr':
nvr.c:(.text+0x752): undefined reference to `t1000_emsboard_loadnvr'
pcem-nvr.o: In function `savenvr':
nvr.c:(.text+0xe62): undefined reference to `t1000_emsboard_savenvr'
pcem-video.o: In function `video_init':
video.c:(.text+0x311): undefined reference to `t1000_device'
collect2: error: ld returned 1 exit status
Makefile:632: recipe for target 'pcem' failed
make[1]: *** [pcem] Error 1
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: compiling error

Post by SarahWalker »

Run autoreconf.
jznomoney
Posts: 97
Joined: Sat 06 Dec, 2014 9:11 pm

Re: compiling error

Post by jznomoney »

This happens when compiling on windows too.
szadycbr
Posts: 295
Joined: Mon 21 Nov, 2016 6:23 pm

Re: compiling error

Post by szadycbr »

Strange, i just did newest , without ./configure , right from src folder : make -f Makefile.linux64-wx-sdl2 , and it compile without any problems. (debian 9 "stretch")
jznomoney
Posts: 97
Joined: Sat 06 Dec, 2014 9:11 pm

Re: compiling error

Post by jznomoney »

keyboard_xt.o:keyboard_xt.c:(.text+0x12e): undefined reference to `t1000_syskey'
keyboard_xt.o:keyboard_xt.c:(.text+0x158): undefined reference to `t1000_syskey'
keyboard_xt.o:keyboard_xt.c:(.text+0x178): undefined reference to `t1000_syskey'
keyboard_xt.o:keyboard_xt.c:(.text+0x198): undefined reference to `t1000_syskey'
keyboard_xt.o:keyboard_xt.c:(.text+0x1b5): undefined reference to `t1000_syskey'
keyboard_xt.o:keyboard_xt.c:(.text+0x1d4): more undefined references to `t1000_syskey' follow
model.o:model.c:(.data+0x77c): undefined reference to `xt_t1000_init'
model.o:model.c:(.data+0x780): undefined reference to `t1000_device'
nvr.o:nvr.c:(.text+0x782): undefined reference to `tc8521_loadnvr'
nvr.o:nvr.c:(.text+0x787): undefined reference to `t1000_configsys_loadnvr'
nvr.o:nvr.c:(.text+0xfa1): undefined reference to `tc8521_savenvr'
nvr.o:nvr.c:(.text+0xfa6): undefined reference to `t1000_configsys_savenvr'
nvr.o:nvr.c:(.text+0x791): undefined reference to `t1000_emsboard_loadnvr'
nvr.o:nvr.c:(.text+0xfaf): undefined reference to `t1000_emsboard_savenvr'
video.o:video.c:(.text+0x323): undefined reference to `t1000_device'
collect2.exe: error: ld returned 1 exit status
mingw32-make: *** [Makefile.msys2-wx-sdl2-network:34: PCem-wx-SDL2.exe] Error 1

That is what I get in Windows.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: compiling error

Post by SarahWalker »

Makefile.msys2-wx-sdl2-network isn't one of the makefiles provided with PCem...
shermanp
Posts: 175
Joined: Sat 18 Feb, 2017 2:09 am

Re: compiling error

Post by shermanp »

Oops, my bad. I forgot to check whether the latest commit added new files to compile and update the msys2 makefile accordingly.

I'll do this and update the msys2 thread.
User avatar
te_lanus
Posts: 135
Joined: Tue 28 Jul, 2015 4:47 am

Re: compiling error

Post by te_lanus »

SarahWalker wrote: Thu 11 Jan, 2018 11:00 am Run autoreconf.
thanx that helped :D
User avatar
te_lanus
Posts: 135
Joined: Tue 28 Jul, 2015 4:47 am

Re: compiling error

Post by te_lanus »

I get the following error today, not sure why.

Code: Select all

wx-createdisc.cc: In function ‘int creatediscimage_dlgproc(void*, int, wxInt32, wxIntPtr)’:
wx-createdisc.cc:78:49: error: ‘uint8_t’ was not declared in this scope
                                                 uint8_t sector[512];
                                                 ^
wx-createdisc.cc:81:56: error: ‘sector’ was not declared in this scope
                                                 memset(sector, 0, 512);
User avatar
JohnElliott
Posts: 113
Joined: Sun 31 Jan, 2016 7:29 pm

Re: compiling error

Post by JohnElliott »

Try adding

Code: Select all

#include <stdint.h>
at the top of wx-createdisc.cc .
User avatar
te_lanus
Posts: 135
Joined: Tue 28 Jul, 2015 4:47 am

Re: compiling error

Post by te_lanus »

Ok the latest source seems to fail to compile: (Kubuntu 18.04)

Code: Select all

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:4649: recipe for target 'pcem-wx-main.o' failed
make[1]: *** [pcem-wx-main.o] Error 1
I hath

Code: Select all

checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 3.0.0... yes (version 3.0.4)
 
installed
szadycbr
Posts: 295
Joined: Mon 21 Nov, 2016 6:23 pm

Re: compiling error

Post by szadycbr »

te_lanus , you right , something is wrong , i done ./configure then make and i get this

Code: Select all

pcem-wx-config.o: In function `config_dlgsave':
wx-config.c:(.text+0x3252): undefined reference to `loadbios'
pcem-pc.o: In function `initpc':
pc.c:(.text+0x1bcd): undefined reference to `loadbios'
pcem-wx-sdl2.o: In function `wx_start':
wx-sdl2.c:(.text+0x1589): undefined reference to `loadbios'
pcem-wx-sdl2.o: In function `start_emulation':
wx-sdl2.c:(.text+0x16d1): undefined reference to `loadbios'
wx-sdl2.c:(.text+0x179a): undefined reference to `loadbios'
collect2: error: ld returned 1 exit status
Makefile:806: recipe for target 'pcem' failed
make[1]: *** [pcem] Error 1
make[1]: Leaving directory '/home/szady/Downloads/pcem_emulator-pcem-3a9afaf8f184/src'
Makefile:365: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
autoreconf didnt help, but i have no idea how could it help, i am not programmer , but it also show some errors. and again it did compile fine from src directely by make -f Makefile.linux64-wx-sdl2 . all done on q4os (debian 9).

ps. could someone explain why , when it fails to compile from main folder it almost always work from src? does compilinig by Makefile.linux64-wx-sdl2 lack some features?
User avatar
te_lanus
Posts: 135
Joined: Tue 28 Jul, 2015 4:47 am

Re: compiling error

Post by te_lanus »

Currently it fails compiling at:

Code: Select all

pcem-wx-config.o: In function `config_dlgsave':
wx-config.c:(.text+0x34ca): undefined reference to `loadbios'
pcem-pc.o: In function `initpc':
pc.c:(.text+0x1d3d): undefined reference to `loadbios'
pcem-video.o:(.data.rel+0xe28): undefined reference to `sigma_device'
pcem-wx-sdl2.o: In function `wx_start':
wx-sdl2.c:(.text+0x16c9): undefined reference to `loadbios'
pcem-wx-sdl2.o: In function `start_emulation':
wx-sdl2.c:(.text+0x1811): undefined reference to `loadbios'
wx-sdl2.c:(.text+0x18aa): undefined reference to `loadbios'
collect2: error: ld returned 1 exit status
Makefile:806: recipe for target 'pcem' failed
make[1]: *** [pcem] Error 1
make[1]: Leaving directory 'src/pcem_emulator-pcem-3a6d4591f13d/src'
Makefile:365: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
Jimage
Posts: 2
Joined: Fri 23 Nov, 2018 12:56 am

Re: compiling error

Post by Jimage »

On Linux Mint 19 I had to install libwxgtk3.0-dev and libwxgtk3.0-gtk3-dev packages. The configure script didn't check for them and complained about missing wx components similar to te_lanus's output above (e.g. error: invalid use of incomplete type ‘class wxCommandEvent’). Compiled fine after these were installed.

Installing from AUR in Arch Linux has always been smooth.
User avatar
te_lanus
Posts: 135
Joined: Tue 28 Jul, 2015 4:47 am

Re: compiling error

Post by te_lanus »

Jimage wrote: Tue 27 Nov, 2018 3:43 am On Linux Mint 19 I had to install libwxgtk3.0-dev and libwxgtk3.0-gtk3-dev packages. The configure script didn't check for them and complained about missing wx components similar to te_lanus's output above (e.g. error: invalid use of incomplete type ‘class wxCommandEvent’). Compiled fine after these were installed.

Installing from AUR in Arch Linux has always been smooth.
this is now fixed: viewtopic.php?p=11521#p11521
Post Reply