configure:error:无法运行C编译的程序

时间:2015-08-11 13:42:13

标签: c linux segmentation-fault makefile config

我正在尝试使用Debian Wheezy OS在我的Raspberry Pi上安装不同的软件。当我运行尝试配置软件我正在尝试安装我得到此输出

checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling...  configure: error: in 'directory of where I'm installing the software'
configure: error: cannot run C compiled programs.
If you meant to cross compile, use '--host'.
See config.log' for more details

然后我检查配置日志,它基本上说同样的事情,唯一的区别是我看到在检查交叉编译时是否有段错误:

configure:3547: checking for suffix of executables
configure:3554: /usr/bin/gcc -o conftest -Wno-long-long    conftest.c  >&5
configure:3558: $? = 0
configure:3580: result: 
configure:3602: checking whether we are cross compiling
configure:3610: /usr/bin/gcc -o conftest -Wno-long-long    conftest.c  >&5
configure:3614: $? = 0
configure:3621: ./conftest
./configure: line 3623:  3679 Segmentation fault    ./conftest$ac_cv_exeext
configure:3625: $? = 139
configure:3632: error: in `/usr/local/src/VALGRIND/valgrind-3.10.1':
configure:3634: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

此错误现已出现两次。一次尝试安装Valgrind时尝试安装libusb。

gcc -v的输出是:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14+rpi1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-   languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-14+rpi1) 

2 个答案:

答案 0 :(得分:3)

在CoreOS上,解决了问题。

const hex = Buffer.from(bytes).toString('hex')
let big = BigInt('0x' + hex)
if (a[0] & 0x80) {
  const negative = BigInt('0x1' + '0'.repeat(hex.length))
  big -= negative
}

答案 1 :(得分:0)

蜜蜂在这里的问题已解决:

export PATH=/path/to/gcc-4.9.2/bin/:$PATH
export LD_LIBRARY_PATH=/path/to/gcc-4.9.2/lib64/:$LD_LIBRARY_PATH
./configure --prefix=/path/to/  --host=arm

希望这会对您有所帮助。