After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 344491 - compiler warnings cause build to fail
compiler warnings cause build to fail
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Build
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2006-06-10 16:18 UTC by Brent Smith (smitten)
Modified: 2006-06-27 06:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
check for pwd.h in every cases (925 bytes, patch)
2006-06-11 12:57 UTC, Frederic Peters
none Details | Review
also checks for grp.h and getpwuid_r (5.01 KB, patch)
2006-06-11 13:11 UTC, Frederic Peters
none Details | Review

Description Brent Smith (smitten) 2006-06-10 16:18:25 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]
Comment 1 Frederic Peters 2006-06-11 12:56:21 UTC
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.
Comment 2 Frederic Peters 2006-06-11 12:57:26 UTC
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.
Comment 3 Frederic Peters 2006-06-11 13:11:23 UTC
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.
Comment 4 Brent Smith (smitten) 2006-06-11 15:09:51 UTC
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
Comment 5 Elijah Newren 2006-06-13 15:48:14 UTC
Patch is similar to the one in bug 344733.
Comment 6 Alexander Larsson 2006-06-20 08:36:48 UTC
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?
Comment 7 Brent Smith (smitten) 2006-06-22 00:05:40 UTC
I believe so, yes.
Comment 8 Stef van der Made 2006-06-25 16:05:09 UTC
When applying this patch "also checks for grp.h and getpwuid_r" the issue is resolved for me.
Comment 9 Baptiste Mille-Mathias 2006-06-27 06:53:05 UTC
I close the bug regarding previous comments