When trying to compile clanlib with -DNDEBUG set in order to generate a release version with ASSERT() macros turning into no-ops (which is ANSI-defined behaviour), the ebuild fails with the following error message: System/Unix/init_linux.cpp: In function `void init_system()': System/Unix/init_linux.cpp:55: error: `deinit' was not declared in this scope make[2]: *** [System/Unix/init_linux.lo] Fehler 1 make[2]: *** Warte auf noch nicht beendete Prozesse... make[2]: Leaving directory `/var/tmp/portage/clanlib-0.7.8-r2/work/ClanLib-0.7.8/Sources/Core' make[1]: *** [all-recursive] Fehler 1 make[1]: Leaving directory `/var/tmp/portage/clanlib-0.7.8-r2/work/ClanLib-0.7.8/Sources' make: *** [all-recursive] Fehler 1 !!! ERROR: dev-games/clanlib-0.7.8-r2 failed. Call stack: ebuild.sh, line 1546: Called dyn_compile ebuild.sh, line 937: Called src_compile clanlib-0.7.8-r2.ebuild, line 81: Called die !!! emake failed !!! If you need support, post the topmost build error, and the call stack if relevant.
The error can be avoided by inserting the following line of code into file clanlib-0.7.8-r2/work/ClanLib-0.7.8/Sources/Core/System/Unix/init_linux.cpp before the original line 55: sighandler_t deinit; This adds the missing declaration and lets the code compile fine with or without -DNDEBUG.
Created attachment 101505 [details, diff] Adds the missing declaration Run as patch -1 < clanlib-0.7.8-r2-bug_154513-patch from within the /var/tmp/portage/clanlib-0.7.8-r2 directory.
Comment # 2 contains a patch for the modification I suggested in Comment # 1. The patch has been created using the suggested standard LC_ALL=C diff -Naur method.
Created attachment 101507 [details, diff] The same patch for clanlib-0.6.5-r4 Seems clanlib-0.6.5-r4 is also affected by the problem - here is the patch. Apply this patch it from within /var/tmp/portage/clanlib-0.6.5-r4 with patch -p1 < clanlib-0.6.5-r4-bug_154513-patch Note: The older version is still needed by various apps sich as "pingus".
Comment # 2 contains an incorrect statement: Instead of using "patch -1", "patch -p1" should be used.
Sorry for reopening the bug: I set it to "resolved" by mistake, although the patch did not yet make it into portage.
patch looks reversed to me and this is really something I'd prefer go though upstream.
(In reply to comment #7) > patch looks reversed to me and this is really something I'd prefer go though > upstream. Actually it's even simpler than that, and even more embarrassing: I accidentally swapped source and destination when creating the diffs ;-) I'll add a fixed patch!
Created attachment 134416 [details, diff] Allows clanlib-0.7.8 to be compiled for release builds also Without this patch, clanlib-0.7.8 only compiles in debug mode, i. e. without -DNDEBUG being defined. This patch adds a missing function declaration, so clanlib compiles with or without -DNDEBUG.
added for 0.7 and 0.8. I'm not supporting 0.6 anymore so I won't add it for that version. thanks for the bug report and patch.