GNOME Bugzilla – Bug 344491
compiler warnings cause build to fail
Last modified: 2006-06-27 06:53:05 UTC
workaround is to use --disable-compile-warnings --disable-more-warnings acl.Tpo -c file-method-acl.c -fPIC -DPIC -o .libs/file-method-acl.o cc1: warnings being treated as errors file-method-acl.c: In function 'string_to_uid': file-method-acl.c:195: warning: implicit declaration of function 'getpwnam' file-method-acl.c:195: warning: nested extern declaration of 'getpwnam' file-method-acl.c:195: warning: assignment makes pointer from integer without a cast file-method-acl.c:198: error: dereferencing pointer to incomplete type file-method-acl.c:199: warning: control reaches end of non-void function file-method-acl.c: In function 'string_to_gid': file-method-acl.c:207: warning: implicit declaration of function 'getgrnam' file-method-acl.c:207: warning: nested extern declaration of 'getgrnam' file-method-acl.c:207: warning: assignment makes pointer from integer without a cast file-method-acl.c:210: error: dereferencing pointer to incomplete type file-method-acl.c:211: warning: control reaches end of non-void function make[2]: *** [file-method-acl.lo] Error 1 make[2]: Leaving directory `/extra/cvs/gnome2/gnome-vfs/modules' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/extra/cvs/gnome2/gnome-vfs' make: *** [all] Error 2 *** error during stage build of gnome-vfs: could not build module *** [4/112]
I don't understand how those configure flags would change anything since there is really an error: *file-method-acl.c:198: error: dereferencing pointer to incomplete type*. This is the same as on http://jhbuild.bxlug.be/builds/2006-06-11-0012/logs/gnome-vfs/ It is caused by missing both POSIX and Solaris ACL, then configure.in doesn't check for pwd.h, so it is not included, so 'struct passwd' is not defined. Attached patch fix this.
Created attachment 67122 [details] [review] check for pwd.h in every cases Check for pwd.h in every situation; not just if posix or solaris acl are detected.
Created attachment 67123 [details] [review] also checks for grp.h and getpwuid_r Also insures check for grp.h and getpwuid_r(). But then it finally aborts only because of warnings (unused functions). Patching file-method-acl.c so they are enclosed in #if defined (HAVE_POSIX_ACL) || defined (HAVE_SOLARIS_ACL). Sorry for the incomplete first patch.
you're right those flags didn't fix it for me. I had to update the tree to 06-08 to get gnome-vfs to compile
Patch is similar to the one in bug 344733.
2006-06-13 Alexander Larsson <alexl@redhat.com> * modules/file-method-acl.c: Fix build when no ACL supported. Didn't the above checkin fix this?
I believe so, yes.
When applying this patch "also checks for grp.h and getpwuid_r" the issue is resolved for me.
I close the bug regarding previous comments