Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't Build On Compilers Which Default To C++17 #677

Open
tekktonic opened this issue Jan 12, 2022 · 5 comments
Open

Doesn't Build On Compilers Which Default To C++17 #677

tekktonic opened this issue Jan 12, 2022 · 5 comments

Comments

@tekktonic
Copy link

C++17 added a byte type which conflicts with GtkRadiant's.

The stdlib type isn't suitable for the way it's used here but it causes conflicts I think due to files including using std which pulls it in. There are a few options to fix this:

  1. Rename the type from byte
  2. Remove all relevant use of using std so that std::byte no longer conflicts
  3. Rewrite the relevant parts to just use std::byte
  4. Compile against C++11.

I've attached a patch which does #4 as a temporary fix because creating a fork for a 1 line change is silly. It's "a .txt" because github refuses to let you attach .patch files.
std.txt

@doggodanubus
Copy link

Thanks for the patch. It's gotten past the byte failure. I could not run the predisastered binary as it was linked against some pangox binary library that doesn't exist on Fedora.

Now when I run it I get an error

No games setup, aborting

Will look at the code. :/

@tkoeppe
Copy link
Collaborator

tkoeppe commented May 30, 2022

How hard would option 2 be, removing those using-directives?

@wdoekes
Copy link

wdoekes commented Jun 5, 2022

Here's an alternate fix:

https://github.com/wdoekes/gtkradiant-deb/blob/main/patches/radiant-fix-std-bool-std-byte.patch

@dsvensson
Copy link

dsvensson commented Aug 16, 2022

Removed the typedef qboolean bool to get it to compile, and then the "No games setup, aborting" here as well. Would be nice with some docs on the next steps, is it some initialization that the packaged version does automatically that's needed? Alternatively a Flatpak to avoid having to build it to be compatible with recent version of whatever libs in dist.

There is an old Flatpak setup here, but abandoned since 2018, would be sweet to have it mainlined, https://github.com/magicmyth/io.github.TTimo.GtkRadiant

Oh, turns out that a symlink like installs -> ../../../install/installs in build/release/radiant makes it start. After configuring for Quake 1 engine it however fails on synapse after having loaded build/release/radiant/installs/Q1Pack/game/synapse.config. This is fixed by adding a symlink for modules -> ../../../install/modules in that same directory.

@kungfooman
Copy link

Hi @dsvensson, thank you for sharing the symlink trick! I was running into the same issue and now I realized that it is enough to simply start it via ~/GtkRadiant/install/radiant.bin:

image

Did you test that before?

@wdoekes Thank you for the patch, exactly my compilation error that I had to fix aswell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants