Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 154513 - dev-games/clanlib-0.7.8-r2 won't compile with debugging information disabled
Summary: dev-games/clanlib-0.7.8-r2 won't compile with debugging information disabled
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-08 16:30 UTC by Guenther Brunthaler
Modified: 2007-10-29 22:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Adds the missing declaration (clanlib-0.7.8-r2-bug_154513-patch,603 bytes, patch)
2006-11-08 16:42 UTC, Guenther Brunthaler
Details | Diff
The same patch for clanlib-0.6.5-r4 (clanlib-0.7.8-r2-bug_154513-patch,603 bytes, patch)
2006-11-08 17:06 UTC, Guenther Brunthaler
Details | Diff
Allows clanlib-0.7.8 to be compiled for release builds also (0.7.8-ndebug.patch,866 bytes, patch)
2007-10-26 13:56 UTC, Guenther Brunthaler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guenther Brunthaler 2006-11-08 16:30:08 UTC
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.
Comment 1 Guenther Brunthaler 2006-11-08 16:32:58 UTC
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.
Comment 2 Guenther Brunthaler 2006-11-08 16:42:59 UTC
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 3 Guenther Brunthaler 2006-11-08 16:45:09 UTC
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.
Comment 4 Guenther Brunthaler 2006-11-08 17:06:05 UTC
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 5 Guenther Brunthaler 2006-11-08 17:08:59 UTC
Comment # 2 contains an incorrect statement: Instead of using "patch -1", "patch -p1" should be used.
Comment 6 Guenther Brunthaler 2006-11-19 02:12:50 UTC
Sorry for reopening the bug: I set it to "resolved" by mistake, although the patch did not yet make it into portage.
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2007-10-21 05:42:17 UTC
patch looks reversed to me and this is really something I'd prefer go though upstream.
Comment 8 Guenther Brunthaler 2007-10-26 13:52:58 UTC
(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!
Comment 9 Guenther Brunthaler 2007-10-26 13:56:18 UTC
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.
Comment 10 Mr. Bones. (RETIRED) gentoo-dev 2007-10-29 22:08:43 UTC
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.