Jump to content
The Dark Mod Forums

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

Link to comment
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

Info: My portfolio and darkmod graphical installer
Amnesty for Bikerdude!

Link to comment
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.

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 2 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...