将Quickfix C ++交叉编译到Arm体系结构时出错

时间:2019-07-17 20:58:46

标签: c++ linux arm cross-compiling quickfix

在尝试从我的笔记本电脑debian交叉编译quickfix library的手臂系统时遇到此问题。 我已经设法为ARM交叉编译boost,但是我对quickfix感到困惑。

遵循building tutorial时,我正在运行./configure,如下所示:

  

./ configure --host = arm-linux-gnueabihf --prefix = / home / dummy / quickfix_cross

也这样:

  

./ configure --host = arm-linux-gnueabihf --prefix = / home / dummy / quickfix_cross CC = arm-linux-gnueabihf-gcc CXX = arm-linux-gnueabihf-g ++

据我所知,成功退出configure命令:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-gnueabihf-strip... arm-linux-gnueabihf-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether arm-linux-gnueabihf-g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of arm-linux-gnueabihf-g++... gcc3
checking for arm-linux-gnueabihf-gcc... arm-linux-gnueabihf-gcc
checking whether we are using the GNU C compiler... yes
checking whether arm-linux-gnueabihf-gcc accepts -g... yes
checking for arm-linux-gnueabihf-gcc option to accept ISO C89... none needed
checking whether arm-linux-gnueabihf-gcc understands -c and -o together... yes
checking dependency style of arm-linux-gnueabihf-gcc... gcc3
checking how to run the C preprocessor... arm-linux-gnueabihf-gcc -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... arm-unknown-linux-gnueabihf
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by arm-linux-gnueabihf-gcc... /usr/arm-linux-gnueabihf/bin/ld
checking if the linker (/usr/arm-linux-gnueabihf/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/arm-linux-gnueabihf-nm -B
checking the name lister (/usr/bin/arm-linux-gnueabihf-nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to arm-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/arm-linux-gnueabihf/bin/ld option to reload object files... -r
checking for arm-linux-gnueabihf-objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for arm-linux-gnueabihf-dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for arm-linux-gnueabihf-ar... arm-linux-gnueabihf-ar
checking for archiver @FILE support... @
checking for arm-linux-gnueabihf-strip... (cached) arm-linux-gnueabihf-strip
checking for arm-linux-gnueabihf-ranlib... arm-linux-gnueabihf-ranlib
checking command to parse /usr/bin/arm-linux-gnueabihf-nm -B output from arm-linux-gnueabihf-gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for arm-linux-gnueabihf-mt... no
checking for mt... mt
configure: WARNING: using cross tools not prefixed with host triplet
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if arm-linux-gnueabihf-gcc supports -fno-rtti -fno-exceptions... no
checking for arm-linux-gnueabihf-gcc option to produce PIC... -fPIC -DPIC
checking if arm-linux-gnueabihf-gcc PIC flag -fPIC -DPIC works... yes
checking if arm-linux-gnueabihf-gcc static flag -static works... yes
checking if arm-linux-gnueabihf-gcc supports -c -o file.o... yes
checking if arm-linux-gnueabihf-gcc supports -c -o file.o... (cached) yes
checking whether the arm-linux-gnueabihf-gcc linker (/usr/arm-linux-gnueabihf/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... arm-linux-gnueabihf-g++ -E
checking for ld used by arm-linux-gnueabihf-g++... /usr/arm-linux-gnueabihf/bin/ld
checking if the linker (/usr/arm-linux-gnueabihf/bin/ld) is GNU ld... yes
checking whether the arm-linux-gnueabihf-g++ linker (/usr/arm-linux-gnueabihf/bin/ld) supports shared libraries... yes
checking for arm-linux-gnueabihf-g++ option to produce PIC... -fPIC -DPIC
checking if arm-linux-gnueabihf-g++ PIC flag -fPIC -DPIC works... yes
checking if arm-linux-gnueabihf-g++ static flag -static works... yes
checking if arm-linux-gnueabihf-g++ supports -c -o file.o... yes
checking if arm-linux-gnueabihf-g++ supports -c -o file.o... (cached) yes
checking whether the arm-linux-gnueabihf-g++ linker (/usr/arm-linux-gnueabihf/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for flex... no
checking for lex... no
checking for SSL support (openssl)... configure: openssl disabled
./configure: line 17373: ruby: command not found
./configure: line 17453: build_no_unit_test: command not found
checking for shutdown in -lc... yes
checking for inet_addr in -lc... yes
checking for nanosleep in -lc... yes
checking for ftime in -lcompat... no
checking for clock_gettime... yes
checking for clock_get_time... no
checking which threading environment to use... -lpthread
checking for pthread_create in -lpthread... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for STREAMS ioctl... no
checking for socklen_t... yes
checking for ftime... yes
checking for set_terminate in the global namespace... no
checking for set_terminate in the std namespace... yes
checking for std::tr1::shared_ptr... yes
checking for std::shared_ptr... yes
checking for boost::shared_ptr... no
checking for typeinfo in the global namespace... no
checking for typeinfo in the std namespace... yes
checking for gethostbyname_r with input result... yes
checking for cplus_demangle in -liberty... no
checking if select modifies timeval parameter... unable to determine
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating quickfix.pc
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/C++/Makefile
config.status: creating src/C++/test/Makefile
config.status: creating src/python2/Makefile
config.status: creating src/python3/Makefile
config.status: creating src/ruby/Makefile
config.status: creating bin/Makefile
config.status: creating bin/cfg/Makefile
config.status: creating spec/Makefile
config.status: creating test/Makefile
config.status: creating test/atrun/Makefile
config.status: creating test/cfg/Makefile
config.status: creating test/definitions/Makefile
config.status: creating test/definitions/server/Makefile
config.status: creating test/definitions/server/future/Makefile
config.status: creating examples/Makefile
config.status: creating examples/executor/Makefile
config.status: creating examples/executor/C++/Makefile
config.status: creating examples/ordermatch/Makefile
config.status: creating examples/ordermatch/test/Makefile
config.status: creating examples/tradeclient/Makefile
config.status: creating examples/tradeclientgui/Makefile
config.status: creating examples/tradeclientgui/banzai/Makefile
config.status: creating examples/tradeclientgui/banzai/test/Makefile
config.status: creating examples/tradeclientgui/banzai/src/Makefile
config.status: creating examples/tradeclientgui/banzai/src/quickfix/Makefile
config.status: creating examples/tradeclientgui/banzai/src/quickfix/banzai/Makefile
config.status: creating examples/tradeclientgui/banzai/src/quickfix/banzai/ui/Makefile
config.status: creating doc/Makefile
config.status: creating doc/html/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands

然后执行make命令时,过了一会儿,出现以下错误:

mv -f .deps/MemoryStoreTestCase.Tpo .deps/MemoryStoreTestCase.Plo
/bin/bash ../../../libtool  --tag=CXX   --mode=compile arm-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I.. -I../../../UnitTest++/src    -g -O2 -Wall -ansi -Wno-unused-command-line-argument -Wpointer-arith -Wwrite-strings -Wno-overloaded-virtual -Wno-deprecated-declarations -Wno-deprecated          -std=c++0x -O0 -g -MT MessageSortersTestCase.lo -MD -MP -MF .deps/MessageSortersTestCase.Tpo -c -o MessageSortersTestCase.lo MessageSortersTestCase.cpp
libtool: compile:  arm-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I.. -I../../../UnitTest++/src -g -O2 -Wall -ansi -Wno-unused-command-line-argument -Wpointer-arith -Wwrite-strings -Wno-overloaded-virtual -Wno-deprecated-declarations -Wno-deprecated -std=c++0x -O0 -g -MT MessageSortersTestCase.lo -MD -MP -MF .deps/MessageSortersTestCase.Tpo -c MessageSortersTestCase.cpp  -fPIC -DPIC -o .libs/MessageSortersTestCase.o
/tmp/ccU67tE0.s: Assembler messages:
/tmp/ccU67tE0.s:7858: Error: bad instruction `lock'
/tmp/ccU67tE0.s:7859: Error: bad instruction `xadd r3,[r2]'
Makefile:503: recipe for target 'MessageSortersTestCase.lo' failed

请注意,由于我已经能够成功编译ARM的Boost库,因此我已经正确安装了整个工具链。

以此为依据,我得出两个可能的结论: 1.我在某处做错了(我认为这很可能是错的)。 2.由于任何给定的原因,该库实际上与ARM体系结构都不兼容。

你们能帮我解决这个问题的实际原因吗?

编辑:

受够了之后。我尝试在arm系统本身中进行编译...实际上我遇到了相同的错误...也许该库与armhf架构不兼容,即使在debian Sid发行版中有用于它的软件包...我也我很困惑...

编辑2:

我发现this bug在该库的github页中报告了...我猜想,这毕竟是固定的,它是兼容的...

0 个答案:

没有答案