Hi Dominique,

First, thank you for making this port to OpenSuse,
I hope ntfs-3g will meet your expectations.

I have no immediate explanation to the errors you
get. There seems to be a problem with the "const"
qualifier in function prototypes. Just an example on
a function unlikely to conflict with some library :

secaudit.c:6618: error: conflicting types for 'dumpalloc'
secaudit.h:714: note: previous declaration of 'dumpalloc' was here
The mentioned lines are (in the order they appear).
void dumpalloc(const char*);
void dumpalloc(const char *txt)

I really do not see what the conflict can be.

The usual compilation option are :

gcc -DHAVE_CONFIG_H -I. -I..     -I../include/ntfs-3g -g -O2 -Wall -MT 
ntfs_3g_secaudit-secaudit.o -MD -MP -MF 
.deps/ntfs_3g_secaudit-secaudit.Tpo -c -o ntfs_3g_secaudit-secaudit.o 
`test -f 'secaudit.c' || echo './'`secaudit.c

When I want to exhibit more warnings, I use :

gcc -DHAVE_CONFIG_H -I. -I..     -I../include/ntfs-3g -g -O2 -Wall -W -Wall
-Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual
-Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Winline
-Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn
-Wmissing-prototypes -Wmultichar -Wnested-externs -Wpointer-arith
-Wredundant-decls -Wshadow -Wsign-compare -Wstrict-prototypes -Wundef
-Wwrite-strings -Wformat -Wformat-security -MT ntfs_3g_secaudit-secaudit.o
-MD -MP -MF .deps/ntfs_3g_secaudit-secaudit.Tpo -c -o
ntfs_3g_secaudit-secaudit.o `test -f 'secaudit.c'

and I get not a single warning.

Moreover the errors are not due to the extra options you
use, as I replayed them with not a single error or warning
(I am currently using gcc 4.4.2). This is the try :

gcc -DHAVE_CONFIG_H -I. -I..     -I../include/ntfs-3g -fmessage-length=0 
-O2 \
-Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables \
-fasynchronous-unwind-tables -Wformat -Wformat-security -W 
-Wno-sign-compare \
-Werror -Wall -MT ntfs_3g_secaudit-secaudit.o -MD -MP -MF \
.deps/ntfs_3g_secaudit-secaudit.Tpo -c -o ntfs_3g_secaudit-secaudit.o 
`test \
-f 'secaudit.c' || echo './'`secaudit.c

So I cannot give an explanation for now, maybe some
define specific to OpenSuse, affecting the "const"
keyword. I am not imagining this keyword was redefined.
Of course I can remove them, but this is making the
code less secure....

What kind of workaround did you use with the previous
release (2009.4.4) ? It did not contain secaudit, so no
surprise that these issues did not occur there, but the
explanation might be similar.

Maybe you post your "config.h" ?

I keep thinking over this. If I get an explanation, I will
tell you. An effective workaround is to remove this
file altogether. This is just a side tool.

Side note : some people have had a problem with
#include <attr/xattr.h>
at line 262, requiring libattr-dev to be installed.
You do not have the error, so must have solved this,
but it may be easier to replace the line by
#include <sys/xattr.h>
which does the same without the dependency.

Regards

Jean-Pierre


Dominique Leuenberger a.k.a DimStar wrote:
> Hi everybody,
>
> i'm a member of the openSUSE community and took on the task to updtae 
> our ntfs-3g package to the currently latest version 2009.11.15.
>
> We're using the -Werror compile switch and this leads to a multitude 
> of build failures, many of which we had with 2009.04 release already, 
> some new ones and some I seem not to get around with.
>
> for your reference I attach the current patch we have (most of the 
> changes were already the same for the 2009.04 release, so far new are 
> all changes in secaudit.[ch]).
>
> Nevertheless, so far I get stuck with the build error:
>
> *********************
>
> gcc -DHAVE_CONFIG_H -I. -I..     -I../include/ntfs-3g 
> -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector 
> -funwind-tables -fasynchronous-unwind-tables -Wformat 
> -Wformat-security -W -Wno-sign-compare -Werror -Wall -MT 
> ntfs_3g_secaudit-secaudit.o -MD -MP -MF 
> .deps/ntfs_3g_secaudit-secaudit.Tpo -c -o ntfs_3g_secaudit-secaudit.o 
> `test -f 'secaudit.c' || echo './'`secaudit.c
> secaudit.c:1813: error: conflicting types for 'relay_find_usid'
> secaudit.h:725: note: previous declaration of 'relay_find_usid' was here
> secaudit.c:1824: error: conflicting types for 'relay_find_gsid'
> secaudit.h:727: note: previous declaration of 'relay_find_gsid' was here
> secaudit.c:1835: error: conflicting types for 'relay_find_user'
> secaudit.h:729: note: previous declaration of 'relay_find_user' was here
> secaudit.c:1848: error: conflicting types for 'relay_find_group'
> secaudit.h:730: note: previous declaration of 'relay_find_group' was here
> cc1: warnings being treated as errors
> secaudit.c: In function 'linux_permissions':
> secaudit.c:1937: error: assignment discards qualifiers from pointer 
> target type
> secaudit.c: In function 'linux_owner':
> secaudit.c:1964: error: assignment discards qualifiers from pointer 
> target type
> secaudit.c: In function 'setfull':
> secaudit.c:4350: error: assignment discards qualifiers from pointer 
> target type
> secaudit.c: At top level:
> secaudit.c:6618: error: conflicting types for 'dumpalloc'
> secaudit.h:714: note: previous declaration of 'dumpalloc' was here
> secaudit.c:6631: error: conflicting types for 'chkmalloc'
> secaudit.h:710: note: previous declaration of 'chkmalloc' was here
> secaudit.c:6652: error: conflicting types for 'chkcalloc'
> secaudit.h:711: note: previous declaration of 'chkcalloc' was here
> secaudit.c:6657: error: conflicting types for 'chkfree'
> secaudit.h:712: note: previous declaration of 'chkfree' was here
> secaudit.c:6701: error: conflicting types for 'chkisalloc'
> secaudit.h:713: note: previous declaration of 'chkisalloc' was here
> make[2]: *** [ntfs_3g_secaudit-secaudit.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> mv -f .deps/ntfs_3g_usermap-usermap.Tpo .deps/ntfs_3g_usermap-usermap.Po
> make[2]: Leaving directory 
> `/usr/src/packages/BUILD/ntfs-3g-2009.11.14/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/src/packages/BUILD/ntfs-3g-2009.11.14'
> make: *** [all] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.mJ5QZH (%build)
>
>
> *****************
>
> I 'synched' the protoype from secaudit.h already with the function 
> declaration in secaudit.c, but this seems not to help me here.
>
> I would appreciate if somebody could have a look at this and maybe 
> give me some pointers.
>
> Best regards,
> Dominique
>
>
> ------------------------------------------------------------------------------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
>    
>
>
> _______________________________________________
> ntfs-3g-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel
>    

-- 
JP André
email [email protected]





------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to