Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254430 - sys-libs/libhx-2.2 fails to compile on hardened
Summary: sys-libs/libhx-2.2 fails to compile on hardened
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Hanno Böck
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-10 15:18 UTC by Paul Metselaar
Modified: 2009-01-13 19:36 UTC (History)
1 user (show)

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


Attachments
Fixes compile error with gcc < 3.5 (libhx-2.2-hardened.patch,839 bytes, patch)
2009-01-10 15:21 UTC, Paul Metselaar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Metselaar 2009-01-10 15:18:58 UTC
Compiling libhx-2.2 with the hardened x86_64-pc-linux-gnu-3.4.6 gcc fails with this error:

mc.c: In function `HXmc_memcpy':
mc.c:58: warning: implicit declaration of function `__builtin_offsetof'
mc.c:58: error: syntax error before "struct"
mc.c: In function `HXmc_length':
mc.c:58: warning: redundant redeclaration of '__builtin_offsetof'
mc.c:58: warning: previous implicit declaration of '__builtin_offsetof' was here
mc.c:87: error: syntax error before "struct"
mc.c: In function `HXmc_setlen':
mc.c:58: warning: redundant redeclaration of '__builtin_offsetof'
mc.c:58: warning: previous implicit declaration of '__builtin_offsetof' was here
mc.c:98: error: syntax error before "struct"
mc.c: In function `HXmc_trunc':
mc.c:58: warning: redundant redeclaration of '__builtin_offsetof'
mc.c:58: warning: previous implicit declaration of '__builtin_offsetof' was here
mc.c:105: error: syntax error before "struct"
mc.c: In function `HXmc_memcat':
mc.c:58: warning: redundant redeclaration of '__builtin_offsetof'
mc.c:58: warning: previous implicit declaration of '__builtin_offsetof' was here
mc.c:128: error: syntax error before "struct"
mc.c: In function `HXmc_memins':
mc.c:58: warning: redundant redeclaration of '__builtin_offsetof'
mc.c:58: warning: previous implicit declaration of '__builtin_offsetof' was here
mc.c:176: error: syntax error before "struct"
mc.c: In function `HXmc_memdel':
mc.c:58: warning: redundant redeclaration of '__builtin_offsetof'
mc.c:58: warning: previous implicit declaration of '__builtin_offsetof' was here
mc.c:198: error: syntax error before "struct"
mc.c: In function `HXmc_free':
mc.c:58: warning: redundant redeclaration of '__builtin_offsetof'
mc.c:58: warning: previous implicit declaration of '__builtin_offsetof' was here
mc.c:216: error: syntax error before "struct"
make[1]: *** [mc.lo] Error 1

libHX-2.2 uses __builtin_offsetof which is not available in gcc < 3.5. This gives problems on hardened because the current stable version of gcc for hardened is 3.4.6.
Simple patch to fix this follows...

Reproducible: Always

Steps to Reproduce:
1. emerge =sys-libs/libhx-2.2 under Gentoo Hardened
2.
3.
Comment 1 Paul Metselaar 2009-01-10 15:21:44 UTC
Created attachment 177971 [details, diff]
Fixes compile error with gcc < 3.5
Comment 2 Hanno Böck gentoo-dev 2009-01-10 16:58:55 UTC
Hmm, I'm unsure if we really should fix issues with such old compiler versions (gcc 4.0 has been released four years ago).

Though it seems it doesn't really hurt, can you try sending that patch upstream and see if it get's accepted?
Comment 3 Hanno Böck gentoo-dev 2009-01-13 12:11:48 UTC
Should be fixed within 2.3, please test.
Comment 4 Christian Korff 2009-01-13 15:49:13 UTC
I also expierenced this bug and I would submit it again as this bug is marked as fixed but is still unifixed in the portage tree.

I won't be too optimistic for gcc 4.x and Gentoo. It really makes sense to fix those bugs when we can't even tell in what timeframe we get gcc 4.x for everything.
Comment 5 Paul Metselaar 2009-01-13 19:36:47 UTC
It is fixed in version 2.3. Thanks!