Quoting Jean-Pierre André <[email protected]>:

Hi again Dominique,

Dominique Leuenberger a.k.a DimStar wrote:

Quoting Jean-Pierre André <[email protected]>:


Jean-Pierre,

The 'actual' source of the problem is autoconf that was used to publish the tarball:

AC_C_CONST is 'buggy' in this version and causes this error.

Do you mean the configure released with ntfs-3g
is buggy ?

It was generated with Autoconf 2.61, but I actually
use Autoconf 2.63, this may explain the differences.

The 'issue' happens in the way we build our specs and the point where we inject -Werror for this package. Our call looks like this:

CFLAGS="$RPM_OPT_FLAGS -Wformat -Wformat-security -W -Wno-sign-compare -Werror" \ %configure --exec-prefix=/ --disable-static --with-pic --libdir=/%{_lib} --disable-ldconfig

Like this, the -Werror flag is used during the entire confiure script and this results in the mis-detection o ANSI C Const (It results to NO).

Probably what you did for your tests was just recompile the file, but not re-run configure with -Werror as flags. Then of course, config.h does not have #define const inside and you do not run into the same issue.

The link I posted previously actually mentiones that autoconf 2.60 should have it solved. Nevertheless even when using autoconf 2.63 (I tried to reconf, then recreate a tarball) this error seemed not to be really fixed.

So what I did now to solve the issue for the opensuse package is to add
sed -i "/#define const/d" config.h
between the configure and the make calls. this is the easiest way around this specific bug (patching out AC_C_CONST out of configure.ac would be an option, but then I run again in the issue that autogen.sh does not complete in my chroot... and I do not want to fiddle that out :) ).

So now with this config.h patched (trusting that building the package for openSUSE will always have const properly available by the compiler) I end up with the attached patch that is still needed in order to pass the build.

It would be gighly appreciated if this patch could be reviewed and applied to the code base for future releases (I do not like to carry patches forever in my packages).

Thanks everybody for your time on for helping solve this issue! Was an 'interesting' one.

Dominique
Index: ntfs-3g-2009.11.14/libfuse-lite/fusermount.c
===================================================================
--- ntfs-3g-2009.11.14.orig/libfuse-lite/fusermount.c
+++ ntfs-3g-2009.11.14/libfuse-lite/fusermount.c
@@ -588,6 +588,7 @@ static int mount_fuse(const char *mnt, c
 			&source, &mnt_opts);
 
     if (currdir_fd != -1) {
+        __attribute__((unused))int ignored_fchdir_status =
         fchdir(currdir_fd);
         close(currdir_fd);
     }
Index: ntfs-3g-2009.11.14/src/usermap.c
===================================================================
--- ntfs-3g-2009.11.14.orig/src/usermap.c
+++ ntfs-3g-2009.11.14/src/usermap.c
@@ -708,8 +708,9 @@ STATIC boolean recurse(const char *accna
 STATIC boolean recurse(const char *accname, const char *dir, int levels, int docset);
 
 STATIC int callback(struct CALLBACK *context, char *ntfsname,
-	int length, int type, long long pos, unsigned long long mft_ref,
-	unsigned int dt_type)
+	int length, int type, __attribute__((unused))long long pos,
+	__attribute__((unused))unsigned long long mft_ref,
+	__attribute__((unused))unsigned int dt_type)
 {
 	char *fullname;
 	char *accname;
@@ -1223,7 +1224,8 @@ STATIC boolean sanitize(void)
 	return (ok);
 }
 
-STATIC boolean checkoptions(int argc, char *argv[], boolean silent)
+STATIC boolean checkoptions(int argc,
+	__attribute__((unused)) char *argv[], __attribute__((unused))boolean silent)
 {
 	boolean err;
 #ifdef WIN32
------------------------------------------------------------------------------
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