无法为mips64体系结构构建libconfig

时间:2018-12-06 17:53:31

标签: gcc cross-compiling configuration-files mips64 libconfig

我试图交叉编译libconfig库以在Mips64(大端优先)架构上运行。

我刚刚从此处下载了{1}的libconfig 1.7.2版本:

我已经安装了交叉编译器工具链。它位于这里:

/opt/cross/mips64-linux/bin/mips64-linux-gcc

我使用取消了文件的

tar -xzf libconfig-1.7.2.tar.gz

要配置Makefile,我运行了以下命令:

./configure --host=mips64-linux --disable-cxx

据我了解,这将禁用c ++编译,也将交叉编译mips64的输出,这正是我想要的。

配置似乎运行良好,并创建了一个Makefile。

然后我运行make并得到以下错误:

make  all-recursive
make[1]: Entering directory '/home/brianw/Downloads/libconfig-1.7.2'
Making all in lib
make[2]: Entering directory '/home/brianw/Downloads/libconfig-1.7.2/lib'
make  all-am
make[3]: Entering directory '/home/brianw/Downloads/libconfig-1.7.2/lib'
  CC       libconfig_la-libconfig.lo
  CCLD     libconfig.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[3]: Leaving directory '/home/brianw/Downloads/libconfig-1.7.2/lib'
make[2]: Leaving directory '/home/brianw/Downloads/libconfig-1.7.2/lib'
Making all in doc
make[2]: Entering directory '/home/brianw/Downloads/libconfig-1.7.2/doc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/brianw/Downloads/libconfig-1.7.2/doc'
Making all in tinytest
make[2]: Entering directory '/home/brianw/Downloads/libconfig-1.7.2/tinytest'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/brianw/Downloads/libconfig-1.7.2/tinytest'
Making all in tests
make[2]: Entering directory '/home/brianw/Downloads/libconfig-1.7.2/tests'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/brianw/Downloads/libconfig-1.7.2/tests'
Making all in examples
make[2]: Entering directory '/home/brianw/Downloads/libconfig-1.7.2/examples'
Making all in c
make[3]: Entering directory '/home/brianw/Downloads/libconfig-1.7.2/examples/c'
  CCLD     example1
../../lib/.libs/libconfig.so: undefined reference to `scanctx_cleanup'
../../lib/.libs/libconfig.so: undefined reference to `format_double'
../../lib/.libs/libconfig.so: undefined reference to `libconfig_yy_scan_string'
../../lib/.libs/libconfig.so: undefined reference to `libconfig_yyset_lineno'
../../lib/.libs/libconfig.so: undefined reference to `scanctx_init'
../../lib/.libs/libconfig.so: undefined reference to `libconfig_yylex_init_extra'
../../lib/.libs/libconfig.so: undefined reference to `libconfig_yyrestart'
../../lib/.libs/libconfig.so: undefined reference to `libconfig_yy_delete_buffer'
../../lib/.libs/libconfig.so: undefined reference to `libconfig_yylex_destroy'
../../lib/.libs/libconfig.so: undefined reference to `__delete_vec'
../../lib/.libs/libconfig.so: undefined reference to `libconfig_yyparse'
../../lib/.libs/libconfig.so: undefined reference to `scanctx_current_filename'
../../lib/.libs/libconfig.so: undefined reference to `strbuf_release'
../../lib/.libs/libconfig.so: undefined reference to `scanctx_pop_include'
collect2: error: ld returned 1 exit status
Makefile:591: recipe for target 'example1' failed
make[3]: *** [example1] Error 1
make[3]: Leaving directory '/home/brianw/Downloads/libconfig-1.7.2/examples/c'
Makefile:364: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/brianw/Downloads/libconfig-1.7.2/examples'
Makefile:444: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/brianw/Downloads/libconfig-1.7.2'
Makefile:374: recipe for target 'all' failed
make: *** [all] Error 2

我的问题是我做错了什么?

0 个答案:

没有答案