Compiling from latest git.
[hunterz@dusan rigs-of-rods]$ make -j4
[ 0%] Generate files containing version information
true
true
[ 0%] Built target generate_version
[ 2%] Built target version_info
[ 2%] Building CXX object source/configurator/CMakeFiles/RoRConfig.dir/Configurator.cpp.o
[ 96%] Built target RoR
In file included from /usr/include/gtk-2.0/gdk/gdkscreen.h:32:0,
from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:31,
from /usr/include/gtk-2.0/gdk/gdk.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:32,
from /home/hunterz/rigs-of-rods/source/configurator/wxutils.h:7,
from /home/hunterz/rigs-of-rods/source/configurator/Configurator.cpp:76:
/usr/include/gtk-2.0/gdk/gdktypes.h:114:39: error: conflicting declaration 'typedef struct _GdkDrawable GdkWindow'
typedef struct _GdkDrawable GdkWindow;
^~~~~~~~~
In file included from /usr/include/wx-3.0/wx/choice.h:18:0,
from /home/hunterz/rigs-of-rods/source/configurator/wxValueChoice.h:28,
from /home/hunterz/rigs-of-rods/source/configurator/Configurator.cpp:28:
/usr/include/wx-3.0/wx/defs.h:3412:31: note: previous declaration as 'typedef struct _GdkWindow GdkWindow'
typedef struct _GdkWindow GdkWindow;
^~~~~~~~~
In file included from /home/hunterz/rigs-of-rods/source/configurator/wxutils.h:8:0,
from /home/hunterz/rigs-of-rods/source/configurator/Configurator.cpp:76:
/home/hunterz/rigs-of-rods/source/configurator/wxutils.h: In function 'size_t getOISHandle(wxWindow*)':
/usr/include/gtk-2.0/gdk/gdkx.h:113:69: error: cannot convert 'GdkWindow* {aka _GdkWindow*}' to 'GdkDrawable* {aka _GdkDrawable*}' for argument '1' to 'XID gdk_x11_drawable_get_xid(GdkDrawable*)'
#define GDK_WINDOW_XID(win) (gdk_x11_drawable_get_xid (win))
^
/home/hunterz/rigs-of-rods/source/configurator/wxutils.h:54:17: note: in expansion of macro 'GDK_WINDOW_XID'
hWnd = (size_t)GDK_WINDOW_XID(gtk_widget_get_window(window->GetHandle()));
^
In file included from /usr/include/wx-3.0/wx/choice.h:18:0,
from /home/hunterz/rigs-of-rods/source/configurator/wxValueChoice.h:28,
from /home/hunterz/rigs-of-rods/source/configurator/Configurator.cpp:28:
/usr/include/wx-3.0/wx/defs.h:3412:20: note: class type 'GdkWindow {aka _GdkWindow}' is incomplete
typedef struct _GdkWindow GdkWindow;
^~~~~~~~~~
source/configurator/CMakeFiles/RoRConfig.dir/build.make:62: recipe for target 'source/configurator/CMakeFiles/RoRConfig.dir/Configurator.cpp.o' failed
make[2]: *** [source/configurator/CMakeFiles/RoRConfig.dir/Configurator.cpp.o] Error 1
CMakeFiles/Makefile2:252: recipe for target 'source/configurator/CMakeFiles/RoRConfig.dir/all' failed
make[1]: *** [source/configurator/CMakeFiles/RoRConfig.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Thanks for reporting and sorry for the late reply.
This is a Linux build error of RoRConfig with wxWidgets 3.0.x.
RoRConfig was developed with wxWidgets 2.8.x and earlier, I'm not sure anyone ever tried building with wxWidgets 3 or higher.
What wxWidgets packages do you have installed? Also, does the error still happen?
I have fedora 25 now.
compilation fails with latest git (another error):
It seems like building without socketw is broken
@hunter688 Try building this please: https://github.com/RigsOfRods/rigs-of-rods/pull/1286
Im trying apply patch, but looks like source code is have mixed line-endings, for example MainMenu.cpp have unix line end, but Character.cpp have windows line ends.
[hunterz@dusan rigs-of-rods]$ patch -p1 < socket.patch patching file source/main/MainMenu.cpp patching file source/main/gameplay/Character.cpp Hunk #1 FAILED at 592 (different line endings). Hunk #2 FAILED at 605 (different line endings). Hunk #3 FAILED at 649 (different line endings). Hunk #4 FAILED at 690 (different line endings). 4 out of 4 hunks FAILED -- saving rejects to file source/main/gameplay/Character.cpp.rej patching file source/main/gameplay/OutProtocol.cpp Hunk #1 FAILED at 54 (different line endings). Hunk #2 FAILED at 110 (different line endings). 2 out of 2 hunks FAILED -- saving rejects to file source/main/gameplay/OutProtocol.cpp.rej patching file source/main/gameplay/RoRFrameListener.cpp Hunk #1 FAILED at 2506 (different line endings). Hunk #2 FAILED at 2514 (different line endings). 2 out of 2 hunks FAILED -- saving rejects to file source/main/gameplay/RoRFrameListener.cpp.rej patching file source/main/gui/panels/GUI_MultiplayerClientList.cpp patching file source/main/gui/panels/GUI_MultiplayerClientList.h patching file source/main/main.cpp Hunk #1 FAILED at 299 (different line endings). 1 out of 1 hunk FAILED -- saving rejects to file source/main/main.cpp.rej
howto fix?
git clone https://github.com/RigsOfRods/rigs-of-rods
cd in rigs-of-rods and:
git pull https://github.com/RigsOfRods/rigs-of-rods +refs/pull/1286/head
then build
It works, RoR is now compiled on my machine. Thanks a lot!