From: Kaiwii Ho <kai...@gm...> - 2012-04-11 08:07:51
|
hello,i am intended to port the fuse 2.8.7 into android,via NDK 1.7 Fiirstly,i should build the fuse project via android toolchain and then inject it into android kernel as a module.But unfortunately,i meet some problem during the compiling. And here is the detail: 1:inside the fuse 2.8.7 project folder,i build a shell script as following: #!/bin/sh # Compiles fftw3 for Android # Make sure you have NDK_ROOT defined in .bashrc or .bash_profile export NDK_ROOT="/home/kaiwii/android_related/android-ndk-r7b" export PATH="$NDK_ROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:$PATH" export SYS_ROOT="$NDK_ROOT/platforms/android-14/arch-arm/" export CC="arm-linux-androideabi-gcc --sysroot=$SYS_ROOT" export LD="arm-linux-androideabi-ld" export AR="arm-linux-androideabi-ar" export RANLIB="arm-linux-androideabi-ranlib" export STRIP="arm-linux-androideabi-strip" ./configure --host=arm-eabi LIBS="-lc -lgcc" make make install exit 0 2、build the project,and it prompt the following mistake: In file included from fuse_i.h:9, from fuse.c:13: ../include/fuse.h:33:25: error: sys/statvfs.h: No such file or directory In file included from fuse_i.h:9, from fuse.c:13: ../include/fuse.h:207: warning: 'struct statvfs' declared inside parameter list ../include/fuse.h:207: warning: its scope is only this definition or declaration, which is probably not what you want ../include/fuse.h:721: warning: 'struct statvfs' declared inside parameter list In file included from fuse_i.h:10, from fuse.c:13: ../include/fuse_lowlevel.h:1021: warning: 'struct statvfs' declared inside parameter list In file included from fuse.c:13: fuse_i.h:29: error: expected specifier-qualifier-list before 'pthread_mutex_t' fuse_i.h:60: error: expected specifier-qualifier-list before 'pthread_mutex_t' In file included from fuse.c:18: ../include/fuse_compat.h:32: warning: 'struct statvfs' declared inside parameter list fuse.c:1036: warning: 'struct statvfs' declared inside parameter list fuse.c: In function 'convert_statfs_compat': fuse.c:1038: error: dereferencing pointer to incomplete type fuse.c:1039: error: dereferencing pointer to incomplete type fuse.c:1040: error: dereferencing pointer to incomplete type fuse.c:1041: error: dereferencing pointer to incomplete type fuse.c:1042: error: dereferencing pointer to incomplete type fuse.c:1043: error: dereferencing pointer to incomplete type fuse.c:1044: error: dereferencing pointer to incomplete type fuse.c: At top level: fuse.c:1047: warning: 'struct statvfs' declared inside parameter list fuse.c: In function 'convert_statfs_old': fuse.c:1049: error: dereferencing pointer to incomplete type fuse.c:1050: error: dereferencing pointer to incomplete type fuse.c:1051: error: dereferencing pointer to incomplete type fuse.c:1052: error: dereferencing pointer to incomplete type fuse.c:1053: error: dereferencing pointer to incomplete type fuse.c:1054: error: dereferencing pointer to incomplete type fuse.c:1055: error: dereferencing pointer to incomplete type fuse.c: At top level: fuse.c:1059: warning: 'struct statvfs' declared inside parameter list fuse.c: In function 'fuse_compat_statfs': fuse.c:1064: warning: passing argument 2 of 'fs->op.statfs' from incompatible pointer type fuse.c:1064: note: expected 'struct statvfs *' but argument is of type 'struct statvfs *' fuse.c:1070: warning: passing argument 2 of 'convert_statfs_old' from incompatible pointer type fuse.c:1047: note: expected 'struct statvfs *' but argument is of type 'struct statvfs *' fuse.c:1077: warning: passing argument 2 of 'convert_statfs_compat' from incompatible pointer type fuse.c:1035: note: expected 'struct statvfs *' but argument is of type 'struct statvfs *' fuse.c: At top level: fuse.c:1376: warning: 'struct statvfs' declared inside parameter list fuse.c:1376: error: conflicting types for 'fuse_fs_statfs' ../include/fuse.h:721: note: previous declaration of 'fuse_fs_statfs' was here fuse.c: In function 'fuse_fs_statfs': fuse.c:1383: warning: passing argument 3 of 'fuse_compat_statfs' from incompatible pointer type fuse.c:1058: note: expected 'struct statvfs *' but argument is of type 'struct statvfs *' fuse.c:1385: error: dereferencing pointer to incomplete type fuse.c:1386: error: dereferencing pointer to incomplete type fuse.c: In function 'fuse_lib_statfs': fuse.c:2878: error: storage size of 'buf' isn't known fuse.c:2878: warning: unused variable 'buf' fuse.c: In function 'locks_insert': fuse.c:3056: warning: comparison is always true due to limited range of data type fuse.c: In function 'lock_to_flock': fuse.c:3138: warning: comparison is always false due to limited range of data type make[1]: *** [fuse.lo] Error 1 make[1]: Leaving directory `/home/kaiwii/test/fuse-2.8.7/lib' make: *** [all-recursive] Error 1 Making install in include make[1]: Entering directory `/home/kaiwii/test/fuse-2.8.7/include' make[2]: Entering directory `/home/kaiwii/test/fuse-2.8.7/include' make[2]: Nothing to be done for `install-exec-am'. test -z "/usr/local/include/fuse" || /bin/mkdir -p "/usr/local/include/fuse" /usr/bin/install -c -m 644 fuse.h fuse_compat.h fuse_common.h fuse_common_compat.h fuse_lowlevel.h fuse_lowlevel_compat.h fuse_opt.h cuse_lowlevel.h '/usr/local/include/fuse' test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include" /usr/bin/install -c -m 644 old/fuse.h ulockmgr.h '/usr/local/include' make[2]: Leaving directory `/home/kaiwii/test/fuse-2.8.7/include' make[1]: Leaving directory `/home/kaiwii/test/fuse-2.8.7/include' Making install in lib make[1]: Entering directory `/home/kaiwii/test/fuse-2.8.7/lib' /bin/bash ../libtool --tag=CC --mode=compile arm-linux-androideabi-gcc --sysroot=/home/kaiwii/android_related/android-ndk-r7b/platforms/android-14/arch-arm/ -DHAVE_CONFIG_H -I. -I../include -I../include -DFUSERMOUNT_DIR=\"/usr/local/bin\" -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=26 -Wall -W -Wno-sign-compare -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -g -O2 -fno-strict-aliasing -MT fuse.lo -MD -MP -MF .deps/fuse.Tpo -c -o fuse.lo fuse.c libtool: compile: arm-linux-androideabi-gcc --sysroot=/home/kaiwii/android_related/android-ndk-r7b/platforms/android-14/arch-arm/ -DHAVE_CONFIG_H -I. -I../include -I../include -DFUSERMOUNT_DIR=\"/usr/local/bin\" -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=26 -Wall -W -Wno-sign-compare -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -g -O2 -fno-strict-aliasing -MT fuse.lo -MD -MP -MF .deps/fuse.Tpo -c fuse.c -o fuse.o In file included from fuse_i.h:9, from fuse.c:13: ../include/fuse.h:33:25: error: sys/statvfs.h: No such file or directory In file included from fuse_i.h:9, from fuse.c:13: ../include/fuse.h:207: warning: 'struct statvfs' declared inside parameter list ../include/fuse.h:207: warning: its scope is only this definition or declaration, which is probably not what you want ../include/fuse.h:721: warning: 'struct statvfs' declared inside parameter list In file included from fuse_i.h:10, from fuse.c:13: ../include/fuse_lowlevel.h:1021: warning: 'struct statvfs' declared inside parameter list In file included from fuse.c:13: fuse_i.h:29: error: expected specifier-qualifier-list before 'pthread_mutex_t' fuse_i.h:60: error: expected specifier-qualifier-list before 'pthread_mutex_t' In file included from fuse.c:18: ../include/fuse_compat.h:32: warning: 'struct statvfs' declared inside parameter list fuse.c:1036: warning: 'struct statvfs' declared inside parameter list fuse.c: In function 'convert_statfs_compat': fuse.c:1038: error: dereferencing pointer to incomplete type fuse.c:1039: error: dereferencing pointer to incomplete type fuse.c:1040: error: dereferencing pointer to incomplete type fuse.c:1041: error: dereferencing pointer to incomplete type fuse.c:1042: error: dereferencing pointer to incomplete type fuse.c:1043: error: dereferencing pointer to incomplete type fuse.c:1044: error: dereferencing pointer to incomplete type fuse.c: At top level: fuse.c:1047: warning: 'struct statvfs' declared inside parameter list fuse.c: In function 'convert_statfs_old': fuse.c:1049: error: dereferencing pointer to incomplete type fuse.c:1050: error: dereferencing pointer to incomplete type fuse.c:1051: error: dereferencing pointer to incomplete type fuse.c:1052: error: dereferencing pointer to incomplete type fuse.c:1053: error: dereferencing pointer to incomplete type fuse.c:1054: error: dereferencing pointer to incomplete type fuse.c:1055: error: dereferencing pointer to incomplete type fuse.c: At top level: fuse.c:1059: warning: 'struct statvfs' declared inside parameter list fuse.c: In function 'fuse_compat_statfs': fuse.c:1064: warning: passing argument 2 of 'fs->op.statfs' from incompatible pointer type fuse.c:1064: note: expected 'struct statvfs *' but argument is of type 'struct statvfs *' fuse.c:1070: warning: passing argument 2 of 'convert_statfs_old' from incompatible pointer type fuse.c:1047: note: expected 'struct statvfs *' but argument is of type 'struct statvfs *' fuse.c:1077: warning: passing argument 2 of 'convert_statfs_compat' from incompatible pointer type fuse.c:1035: note: expected 'struct statvfs *' but argument is of type 'struct statvfs *' fuse.c: At top level: fuse.c:1376: warning: 'struct statvfs' declared inside parameter list fuse.c:1376: error: conflicting types for 'fuse_fs_statfs' ../include/fuse.h:721: note: previous declaration of 'fuse_fs_statfs' was here fuse.c: In function 'fuse_fs_statfs': fuse.c:1383: warning: passing argument 3 of 'fuse_compat_statfs' from incompatible pointer type fuse.c:1058: note: expected 'struct statvfs *' but argument is of type 'struct statvfs *' fuse.c:1385: error: dereferencing pointer to incomplete type fuse.c:1386: error: dereferencing pointer to incomplete type fuse.c: In function 'fuse_lib_statfs': fuse.c:2878: error: storage size of 'buf' isn't known fuse.c:2878: warning: unused variable 'buf' fuse.c: In function 'locks_insert': fuse.c:3056: warning: comparison is always true due to limited range of data type fuse.c: In function 'lock_to_flock': fuse.c:3138: warning: comparison is always false due to limited range of data type make[1]: *** [fuse.lo] Error 1 make[1]: Leaving directory `/home/kaiwii/test/fuse-2.8.7/lib' make: *** [install-recursive] Error 1 |