Compiling Slade3 through Linux

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
Skwirl
Posts: 214
Joined: Sun Feb 01, 2015 11:38 pm
Location: 'merica
Contact:

Compiling Slade3 through Linux

Post by Skwirl »

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 all

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.)
User avatar
Rachael
Posts: 13574
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Compiling Slade3 through Linux

Post by Rachael »

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)
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Compiling Slade3 through Linux

Post by Gez »

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.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Compiling Slade3 through Linux

Post by Marisa the Magician »

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)
Post Reply

Return to “General”