leycec / raiagent

Third-party Gentoo overlay. Ride the Lagrangian point between awesomeness and volatile compounds.
31 stars 14 forks source link

games-roguelike/cataclysm-dda-0.9e_p3 fails to build #102

Closed 2xsaiko closed 2 years ago

2xsaiko commented 2 years ago

Build info/log

Originally I tried to update the package to 0.F but that gave me a different error.

leycec commented 2 years ago

ohnoes

On the bright side of the post-post-apocalypse, I didn't even know 0.F was already out! So, that's great. I'll try bumping to 0.F on my side and see if I can't get this worky.

Zombie Gentooer thanks you for the rotting heads up. :zombie:

leycec commented 2 years ago

This error in your helpful logfile is deeply suspicious:

At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors

The -Wno-unknown-warning-option option is only supported by Clang. GCC doesn't support that option, so Cataclysm's Makefile shouldn't be passing that option to GCC. That said... I must confess I've never seen that myself. Cataclysm 0.E-3 built perfectly for me, so that's a bit of a rotting head-scratcher.

Let's just bump to 0.F and pretend this never happened. Male Zombie Gentooer is sad. :zombie_man:

2xsaiko commented 2 years ago

Looks to me like it gets unconditionally enabled here: Makefile:107. And it's still there in 0.F. Makes it even stranger why it compiled for you but not for me if it's not a valid GCC option... Maybe different behavior for different GCC versions?

leycec commented 2 years ago

If I had a moustache, I would be perplexedly rubbing it. Thanks a heap for tracking that down, though! I'll patch that away in our ebuild. It might not actually be a real issue, but it's obfuscating underlying real issues.

Also, I face-planted into the same compilation issue with 0.F you probably hit. The ncurses-based CLI interface builds fine, but the SDL-based GUI interface almost immediately fails with this dodgy complaint:

cc1plus: error: pch/main-pch.hpp.gch: not used
because `_XOPEN_SOURCE' not defined
[-Werror=invalid-pch]

That's... horrible. Their Makefile is clearly broken. Let's see if we can just patch that away like always. And this is why Cataclysm still isn't in Portage, folks. </sigh>

leycec commented 2 years ago

Ah-ha. We are now hitting a known Cataclysm build issue, whose resolution thankfully appears trivial: just run emake clean in between compiling the ncurses and SDL interfaces.

We got this. :wink:

2xsaiko commented 2 years ago

Yup, that's exactly the one I was hitting. That does make it sound like their build setup is broken indeed, even more so than having both a Makefile and CMakeLists that have to be separately maintained. Fun! \o/

leycec commented 2 years ago

Well, that took dramatically longer than expected. Everything has been bumped to 0.9F (Frank) and actually appears to now work – but don't take my shrill word for it! Check it out and let me know if all's well that ends well; if not, feel free to reopen this. ...please don't

In related news, this was complete and utter Hell. I don't play C:DDA much anymore and don't necessarily have the spare time to continue maintaining C:DDA ebuilds in perpetuity, especially because upstream (A) doesn't adequately test their makefiles, (B) can't be bothered to fix issues in their makefiles, and (C) insanely maintains two completely different build systems in parallel.

Because of these issues and because the non-cmake makefiles are becoming Hell Incarnate to support, I'm probably going to do the following on the next bump:

  1. Refactor everything to use cmake instead.
  2. Submit the resulting ebuild to Portage itself as a PR. There's an open Gentoo Bugzilla issue requesting exactly this, so we'll be able to hit two plague-infested birds with one stone.
  3. Remove C:DDA from this overlay once accepted.

Until then, we trudge dolefully on. </sigh>

2xsaiko commented 2 years ago

Thanks a lot, it's working now! And yeah, I think getting it to use cmake and then submitting to the main gentoo repository is a good idea, I should probably do that with some of my ebuilds as well because I have a lot of them at this point that I also can't maintain all by myself. An RSS reader that I only added the feeds for some of the packages in and look at once in a while only does so much, haha