Jump to content
The Dark Mod Forums
Sign in to follow this  
7318

error while compiling DR from github in Ubuntu 18.04

Recommended Posts

I'm in Ubuntu18.04

 

i have a WX3.1 gtk version compiled in my system for other programs.

 

cloned from the git: https://github.com/codereader/DarkRadiant.git

 

installed:

  • zlib1g-dev
  • libjpeg62-dev
  • libwxgtk3.0-dev
  • libxml2-dev
  • libsigc++-2.0-dev
  • libpng-dev
  • libftgl-dev
  • libglew-dev
  • libalut-dev
  • libvorbis-dev
  • pybind11-dev

and obviously automake libtool g++ gettext pkg-config

Making all in wxutil
make[3]: Entering directory '/home/biel/games/src/DarkRadiant/libs/wxutil'
  CXX      ConsoleView.lo
  CXX      FreezePointer.lo
  CXX      GLWidget.lo
  CXX      KeyValueTable.lo
  CXX      PanedPosition.lo
  CXX      VFSTreePopulator.lo
  CXX      WindowPosition.lo
  CXX      window/TransientWindow.lo
  CXX      dialog/Dialog.lo
  CXX      dialog/MessageBox.lo
  CXX      preview/ModelPreview.lo
  CXX      preview/ParticlePreview.lo
  CXX      preview/RenderPreview.lo
  CXX      preview/GuiRenderer.lo
  CXX      preview/GuiView.lo
  CXX      GLFont.lo
  CXX      menu/PopupMenu.lo
  CXX      PathEntry.lo
  CXX      TreeModel.lo
  CXX      TreeView.lo
TreeView.cpp: In member function ‘void wxutil::TreeView::_onSearch(wxutil::TreeView::SearchEvent&)’:
TreeView.cpp:359:63: error: no matching function for call to ‘wxDataViewEvent::wxDataViewEvent(const wxEventTypeTag<wxDataViewEvent>&, wxWindowID)’
   wxDataViewEvent le(wxEVT_DATAVIEW_SELECTION_CHANGED, GetId());
                                                               ^
In file included from TreeView.h:3:0,
                 from TreeView.cpp:1:
/usr/local/include/wx-3.1/wx/dataview.h:832:5: note: candidate: wxDataViewEvent::wxDataViewEvent(const wxDataViewEvent&)
     wxDataViewEvent(const wxDataViewEvent& event)
     ^~~~~~~~~~~~~~~
/usr/local/include/wx-3.1/wx/dataview.h:832:5: note:   candidate expects 1 argument, 2 provided
/usr/local/include/wx-3.1/wx/dataview.h:824:5: note: candidate: wxDataViewEvent::wxDataViewEvent(wxEventType, wxDataViewCtrlBase*, const wxDataViewItem&)
     wxDataViewEvent(wxEventType evtType,
     ^~~~~~~~~~~~~~~
/usr/local/include/wx-3.1/wx/dataview.h:824:5: note:   candidate expects 3 arguments, 2 provided
/usr/local/include/wx-3.1/wx/dataview.h:814:5: note: candidate: wxDataViewEvent::wxDataViewEvent(wxEventType, wxDataViewCtrlBase*, wxDataViewColumn*, const wxDataViewItem&)
     wxDataViewEvent(wxEventType evtType,
     ^~~~~~~~~~~~~~~
/usr/local/include/wx-3.1/wx/dataview.h:814:5: note:   candidate expects 4 arguments, 2 provided
/usr/local/include/wx-3.1/wx/dataview.h:807:5: note: candidate: wxDataViewEvent::wxDataViewEvent()
     wxDataViewEvent()
     ^~~~~~~~~~~~~~~
/usr/local/include/wx-3.1/wx/dataview.h:807:5: note:   candidate expects 0 arguments, 2 provided
TreeView.cpp:362:25: warning: ‘void wxDataViewEvent::SetModel(wxDataViewModel*)’ is deprecated: Pass the argument to the ctor instead [-Wdeprecated-declarations]
   le.SetModel(GetModel());
                         ^
In file included from TreeView.h:3:0,
                 from TreeView.cpp:1:
/usr/local/include/wx-3.1/wx/dataview.h:901:10: note: declared here
     void SetModel( wxDataViewModel *model ) { m_model = model; }
          ^~~~~~~~
TreeView.cpp:363:29: warning: ‘void wxDataViewEvent::SetItem(const wxDataViewItem&)’ is deprecated: Pass the argument to the ctor instead [-Wdeprecated-declarations]
   le.SetItem(_curSearchMatch);
                             ^
In file included from TreeView.h:3:0,
                 from TreeView.cpp:1:
/usr/local/include/wx-3.1/wx/dataview.h:905:10: note: declared here
     void SetItem( const wxDataViewItem &item ) { m_item = item; }
          ^~~~~~~
Makefile:649: recipe for target 'TreeView.lo' failed
make[3]: *** [TreeView.lo] Error 1
make[3]: Leaving directory '/home/biel/games/src/DarkRadiant/libs/wxutil'
Makefile:437: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/biel/games/src/DarkRadiant/libs'sudo apt-get install git
Makefile:752: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/biel/games/src/DarkRadiant'
Makefile:493: recipe for target 'all' failed
make: *** [all] Error 2

it seems to be a wxwidgets problem? which version of wxwidgets should I have?

Edited by 7318

Biel Bestué de Luna - Github

Share this post


Link to post
Share on other sites

Cant help you with that.

 

There is some info on our wiki.

http://wiki.thedarkmod.com/index.php?title=DarkRadiant_-_Compiling_in_Linux

On the dr you can also download also the binary package

https://packages.debian.org/sid/darkradiant

Edited by freyk

Share this post


Link to post
Share on other sites

Do I get this right that you have two variants of wxWidgets installed on your system? If there is a stable 3.0 release on your system, there should be a corresponding wx-config binary lying around somewhere, and you can point the configure script to use that wxWidgets variant:

 

./configure --with-wx-config=/whatever/path/to/bin/wx-config

 

If that doesn't work, it's also possible to compile a 3.0.x wxWidgets for yourself, take a look at the openSUSE section on the wiki, it should work for your end too.

 

Apart from all of this, I'd need to check whether the wxDataViewEvent signature has been changed in 3.1.x. I had been using 3.1.x for the Windows build until a few months back, so in principle 3.1 should work just as fine - but maybe the wx team actually changed that signature.

 

edit: yes, in wxWidgets 3.1.x the constructors have been changed. I can take a quick look how problematic it is to adjust it in DarkRadiant.

Share this post


Link to post
Share on other sites

I have both the stable wxwidgets version 3.0 downloaded with apt-get (the maximum version i can download from the official ubuntu repositories) and i have compiled myself the latest version 3.1.2 with GTK 3.0.

So currently I have both versions in my system.

 

and ./configure has always been finding the following:

 

checking for wxWidgets version >= 3.0.0... yes (version 3.1.2)

 

 

aaaaannddd....

 

*** waits the compiler expectant ... ***

 

 

OK great! the patch fixes it! at the moment it keeps compiling further than TreeView.lo !

 

CXX PathEntry.lo
CXX TreeModel.lo
CXX TreeView.lo
CXX TreeModelFilter.lo
CXX ModalProgressDialog.lo

Edited by 7318

Biel Bestué de Luna - Github

Share this post


Link to post
Share on other sites

ok next error seems to be related to wxwidgets 3.1.2 too:

  CXX      ui/prefdialog/darkradiant-PrefDialog.o
ui/prefdialog/PrefDialog.cpp: In constructor ‘ui::PrefDialog::PrefDialog(wxWindow*)’:
ui/prefdialog/PrefDialog.cpp:38:26: error: invalid use of incomplete type ‘class wxTreeCtrl’
  _notebook->GetTreeCtrl()->SetMinClientSize(wxSize(200, -1));
                          ^~
In file included from /usr/local/include/wx-3.1/wx/treebook.h:20:0,
                 from ui/prefdialog/PrefDialog.cpp:11:
/usr/local/include/wx-3.1/wx/treebase.h:57:35: note: forward declaration of ‘class wxTreeCtrl’
 friend class WXDLLIMPEXP_FWD_CORE wxTreeCtrl;
                                   ^~~~~~~~~~
Makefile:3796: recipe for target 'ui/prefdialog/darkradiant-PrefDialog.o' failed
make[2]: *** [ui/prefdialog/darkradiant-PrefDialog.o] Error 1
make[2]: Leaving directory '/home/biel/games/src/DarkRadiant/radiant'
Makefile:750: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/biel/games/src/DarkRadiant'
Makefile:491: recipe for target 'all' failed
make: *** [all] Error 2
Edited by 7318

Biel Bestué de Luna - Github

Share this post


Link to post
Share on other sites

I have both the stable wxwidgets version 3.0 downloaded with apt-get (the maximum version i can download from the official ubuntu repositories) and i have compiled myself the latest version 3.1.2 with GTK 3.0.

So currently I have both versions in my system.

 

and ./configure has always been finding the following:

 

checking for wxWidgets version >= 3.0.0... yes (version 3.1.2)

It depends what you specified when configure'ing and make'ing your wx 3.1.2 package, but obviously the 3.1.2 installation is taking precedence over the Ubuntu-provided 3.0 package. To prevent this, you need to forcedly direct DR to use the 3.0 variant with the --with-wx-config switch. edit: just tested this, when installing the 3.1.2 version, the wx-config symlink seems to be overwritten, so I don't know if it's even possible to instruct DR to use the 3.0 headers and libraries (which are still there but probably useless after installing 3.1.x).

Scratch all that, I see there's the 3.0 wx-config still present in /usr/bin/wx-config, so for the records, passing --with-wx-config=/usr/bin/wx-config to configure should direct DR to use the 3.0.x installation. Anyways, I'm definitely interested in compatibility with 3.1.x, so I'll check out what fixes are necessary to get it to compile.

 

Regardless, here's another patch concerning your latest error in PrefDialog.cpp. I'll attach both files here, rename them to .patch. You probably don't need the first one, as you probably already applied it.

0001-Fix-for-wxWidgets-3.1.x-where-the-wxDataViewEvent-si.patch.txt

0002-Fix-missing-include.patch.txt

Share this post


Link to post
Share on other sites

I've pushed the above two patches to git master, they were enough to get DR to compile and start on my end (VM Ubuntu 17.10).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...