Compiling Slade3 through Linux

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

Compiling Slade3 through Linux

Postby Skwirl » Wed May 09, 2018 2:27 pm

So I have some fun news... I think I finally understand how Cmake works. Like, I understand what it's for, but now I actually have it cooperating with me, and unpacked my first source code decently with it.

I decided to try my hand and work with compiling Slade3. Bit by bit I followed Cmake's complaining and installed each library I could get my package manager to find.

I face a problem building the source... "Conflicting Declarations". In particular:

Code: Select allExpand view
1) gtk-2.0/gdk/gdktypes.h - error: conflicting declaration 'typedef struct _GdkRectangle GdkRectangle'
2) wx-3.0/wx/gtk/dvrenderers.h - error: conflicting declaration 'typedef cairo_rectangle_int_t GdkRectangle'

Other errors included cmake stuff I'd probably delete very carefully later:
src/CMakeFiles/slade.dir/OpenGL/Drawing.o] Error 1
src/CMakeFiles/slade.dir/all] Error 2
all] Error 2

This is because while using Cmake, I had to point the library from wx-config to wx-config-gtk. It just did not want to work with regular wx-config.

I don't want to modify the library's own files, I shouldn't have to, especially if something else uses or needs it.

What do I do from here? I'd like to think I'm very close to getting this done so I can use Slade on Linux*.

* The Slade website points to instructions for Debian-based which uses things like apt-get, but I used pacman this whole time so it was extra hard to find what I needed.

And resources I'm using if it helps any...

1) Manjaro Linux (Arch-based)
2) Code::Blocks
3) Cmake (using Code::Blocks - Unix Make for generating)

If I can manage to get this to work I will happily provide the binary to someone who can host it. Just shoot me something to IM with so we can coordinate.

(Also this makes good real-world practice for me to learn how to play with source code and actually do something useful instead of waiting around for something, so I'm always open to mentoring.)
Of creatings Countryball Combat!
Joined: 02 Feb 2015
Location: 'merica

Re: Compiling Slade3 through Linux

Postby Rachael » Wed May 09, 2018 10:01 pm

With these kind of things a full build log or a screenshot of the terminal window is a lot more helpful than the abridged version of the log.

Nevertheless, what's happening here is two of the files being included have the same declaration. Without actually modifying the source code, there unfortunately is nothing you can do about that, and seeing as how it is in files included from libraries I suspect the problem is far worse than that.

I normally would not advocate switching distros over something like this - but it is important to keep in mind that Ubuntu is by far the most widely used distribution both by developers and users. The reason why this is important is because build errors like this are caught much quicker on such a platform, than if you use a niche distro like Manjaro (which is okay if you want to do that, but it makes life harder for you).

First and foremost - you need to report this error to the SLADE developers - which, luckily, you don't have to go far because they're already active on this forum. Second, if you don't mind getting your hands dirty, you can hack the included files yourself and attempt to remove the duplicate definition, and hope that they're compatible with one another. If they're not, you're going to run into further problems, and it may require a significant code refactor in order to fix it.

If the problem is suspect to be the Linux version of Slade, itself, you can use Git to go back in revisions until it compiles. Simply do "git checkout HEAD~1" and then "make" until it works.

Failing that, you can download QEMU or VirtualBox, install Ubuntu inside of a VM, compile it there, and then bring the binary out to your main system. (You can also do a chroot jail for a target distro but I have no experience setting those up)
User avatar
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Compiling Slade3 through Linux

Postby Gez » Thu May 10, 2018 1:11 am

Looking at GTK/GDK stuff it seems the conflicting declaration is caused by __GI_SCANNER__ being defined. Try to see if you can get to rebuild the GTK/GDK lib without this being defined.
Joined: 06 Jul 2007

Re: Compiling Slade3 through Linux

Postby Marisa Kirisame » Fri May 11, 2018 6:07 am

Uhm... if you're using an Arch-based distro you could just get slade from the AUR.

(PS: the maintainer forgot to add webkitgtk2 as a dependency, so you have to install that one yourself)
User avatar
Marisa Kirisame
ZScript Magician
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Return to General

Who is online

Users browsing this forum: Ahrefs [Bot], Awario [RSS], Google [Bot] and 3 guests