GNOME Bugzilla – Bug 534942
Build error: error: storage size of 'cr' isn't known
Last modified: 2008-08-22 16:40:06 UTC
From jhbuild gnome 2.24. gamin-0.1.8: prefix: /opt/jhbuild source code location: . compiler: gcc compiler flags: -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wsign-compare -Wno-sign-compare -g backends: polling, inotify, dnotify build documentation: no debug support: yes (etc) Making all in libgamin mkdir .libs gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -DBINDIR=\"/opt/jhbuild/libexec\" -DBUILDDIR=\"..\" -DGAM_DEBUG_ENABLED -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wsign-compare -Wno-sign-compare -g -MT gam_api.lo -MD -MP -MF .deps/gam_api.Tpo -c gam_api.c -fPIC -DPIC -o .libs/gam_api.o gam_api.c: In function 'gamin_check_cred': gam_api.c:715: error: storage size of 'cr' isn't known gam_api.c:715: warning: unused variable 'cr' $ gcc --version gcc (GCC) 4.3.1 20080515 (prerelease)
I got the same error building 0.1.9 on Gentoo, Gnome 2.22.2. This happened with gcc 4.3.0 but only after updating glibc to 2.8 (2.8_p20080602).
According to the corresponding entry in gentoo bugzilla (http://bugs.gentoo.org/show_bug.cgi?id=225403), the problem was fixed by appending -D_GNU_SOURCE to CFLAGS. A similar thing is also reported in Arch: http://bugs.archlinux.org/task/10989 with the same resolution.
Could someone who fully understands the issue provide a patch please? And I mean for e.g. configure.in, not configure. This so I can apply the patch and do a non-maintainer release.
I see 2 possible patches : 1/ Add #define _GNU_SOURCE in libgamin/gam_api.c and server/gam_channel.c 2/ Remove #define _GNU_SOURCE from server/gam_dnotify.c and add AC_GNU_SOURCE to configure.in I think the second one is better
Ok, please provide a patch for #2.
Actually it had already been fixed in svn 3 months ago... http://svn.gnome.org/viewvc/gamin?view=revision&revision=330
Ah, I saw that commit, but didn't know it would fix this bug. I'll try and do a release (want to get an ok from DV).
*** This bug has been marked as a duplicate of 525228 ***