无法为arm编译ntfs-3g

时间:2015-02-22 19:48:02

标签: linux compiler-errors arm cross-compiling ntfs

我试图交叉编译此处找到的ntfs-3g软件包:http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2014.2.15.tgz

但似乎无法正确交叉编译它,我的Fedora相当新,所以arm binutils是arm-linux-gnu。

    ./configure CC=arm-linux-gnu-gcc --build=arm-linux-gnu --with-gnu-ld --prefix=/usr/bin/arm-linux-gnu-


But just end up with:

    [root@localhost ntfs-3g_ntfsprogs-2014.2.15]# ./configure CC=arm-linux-gnu-gcc --build=arm-linux-gnu --with-gnu-ld --prefix=/usr/bin/arm-linux-gnu-
checking build system type... arm-unknown-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking target system type... arm-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... arm-linux-gnu-gcc
checking whether the C compiler works... $CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5
$CC $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5

哪个

    configure:3385: checking for style of include used by make
configure:3413: result: GNU
configure:3483: checking for gcc
configure:3510: result: arm-linux-gnu-gcc
configure:3739: checking for C compiler version
configure:3748: arm-linux-gnu-gcc --version >&5
arm-linux-gnu-gcc (GCC) 4.9.1 20140717 (Red Hat Cross 4.9.1-1)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3759: $? = 0
configure:3748: arm-linux-gnu-gcc -v >&5
Using built-in specs.
COLLECT_GCC=/usr/bin/arm-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/arm-linux-gnueabi/4.9.1/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../gcc-4.9.1-20140717/configure --bindir=/usr/bin --build=x86_64-redhat-linux-gnu --datadir=/usr/share --disable-decimal-float --disable-dependency-tracking --disable-gold --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-nls --disable-plugin --disable-shared --disable-silent-rules --disable-sjlj-exceptions --disable-threads --enable-checking= --enable-gnu-unique-object --enable-initfini-array --enable-languages=c,c++ --enable-linker-build-id --enable-nls --enable-obsolete --enable-targets=all --exec-prefix=/usr --host=x86_64-redhat-linux-gnu --includedir=/usr/include --infodir=/usr/share/info --libexecdir=/usr/libexec --localstatedir=/var --mandir=/usr/share/man --prefix=/usr --program-prefix=arm-linux-gnu- --sbindir=/usr/sbin --sharedstatedir=/var/lib --sysconfdir=/etc --target=arm-linux-gnueabi --with-bugurl=http://bugzilla.redhat.com/bugzilla/ --with-linker-hash-style=gnu --with-newlib --with-sysroot=/usr/arm-linux-gnu/sys-root --with-system-libunwind --with-system-zlib --without-headers --with-isl=/builddir/build/BUILD/gcc-4.9.1-20140717/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.1-20140717/cloog-install
Thread model: single
gcc version 4.9.1 20140717 (Red Hat Cross 4.9.1-1) (GCC)
configure:3759: $? = 0
configure:3748: arm-linux-gnu-gcc -V >&5
arm-linux-gnu-gcc: error: unrecognized command line option '-V'
arm-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:3759: $? = 4
configure:3748: arm-linux-gnu-gcc -qversion >&5
arm-linux-gnu-gcc: error: unrecognized command line option '-qversion'
arm-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:3759: $? = 4
configure:3779: checking whether the C compiler works
configure:3804: arm-linux-gnu-gcc    conftest.c  >&5
collect2: fatal error: cannot find 'ld'
compilation terminated.
configure:3808: $? = 1
configure:3846: result: no

所以我做得更远但不是我的。即使这些函数是在pwd.h中定义的,但grp.h编译仍然失败。

./configure --host=arm-none-eabi --with-fuse=external CPPFLAGS="-I/root/tinycore/linux-3.0.42/include -I/usr/arm-none-eabi/include" && make

Making all in ntfsprogs
make[2]: Entering directory `/root/ntfs/ntfs-3g_ntfsprogs-2014.2.15/ntfsprogs'
/bin/sh ../libtool --tag=CC   --mode=link arm-none-eabi-gcc  -g -O2 -Wall   -o ntfsfix ntfsfix.o utils.o ../libntfs-3g/libntfs-3g.la
libtool: link: arm-none-eabi-gcc -g -O2 -Wall -o ntfsfix ntfsfix.o utils.o  ../libntfs-3g/.libs/libntfs-3g.a
/usr/lib64/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000008018
../libntfs-3g/.libs/libntfs-3g.a(libntfs_3g_la-acls.o): In function `ntfs_do_user_mapping':
/root/ntfs/ntfs-3g_ntfsprogs-2014.2.15/libntfs-3g/acls.c:4241: undefined reference to `getpwnam'
../libntfs-3g/.libs/libntfs-3g.a(libntfs_3g_la-acls.o): In function `ntfs_do_group_mapping':
/root/ntfs/ntfs-3g_ntfsprogs-2014.2.15/libntfs-3g/acls.c:4321: undefined reference to `getgrnam'

0 个答案:

没有答案