g ++无法在x64 debian上找到已安装的i386软件包

时间:2015-09-29 14:49:43

标签: c++ linux gcc cross-platform

在Debian上编译multi-arch(也可能是其他Linux版本,根据到目前为止Google发现的令人沮丧的论坛帖子的数量),真的很糟糕。然而,我已经设法解开了有朝一日会导致所需二进制文件的一些步骤。首先要做的是允许多拱包管理并选择所需的架构:

dpkg --add-architecture i386
apt-get update

在此之后,您可以在:i386期间在任何库名称之后添加apt-get,前提是该库支持它。所以我为我需要的所有库做了这个。检查此neat命令以列出系统上的所有i386库:

XXXXX@ebianvirtualbox:~/$ dpkg -l|grep :i386
ii  gcc-4.8-base:i386                      4.8.4-1                              i386         GCC, the GNU Compiler Collection (base package)
ii  gcc-4.9-base:i386                      4.9.2-10                             i386         GCC, the GNU Compiler Collection (base package)
ii  libasan0:i386                          4.8.4-1                              i386         AddressSanitizer -- a fast memory error detector
ii  libatomic1:i386                        4.9.2-10                             i386         support library providing __atomic built-in functions
ii  libboost-dev:i386                      1.55.0.2                             i386         Boost C++ Libraries development files (default version)
ii  libboost1.55-dev:i386                  1.55.0+dfsg-3                        i386         Boost C++ Libraries development files
ii  libc6:i386                             2.19-18+deb8u1                       i386         GNU C Library: Shared libraries
ii  libc6-dev:i386                         2.19-18+deb8u1                       i386         GNU C Library: Development Libraries and Header Files
ii  libc6-i686:i386                        2.19-18+deb8u1                       i386         GNU C Library: Shared libraries [i686 optimized]
ii  libgcc-4.8-dev:i386                    4.8.4-1                              i386         GCC support library (development files)
ii  libgcc1:i386                           1:4.9.2-10                           i386         GCC support library
ii  libgomp1:i386                          4.9.2-10                             i386         GCC OpenMP (GOMP) support library
ii  libitm1:i386                           4.9.2-10                             i386         GNU Transactional Memory Library
ii  libquadmath0:i386                      4.9.2-10                             i386         GCC Quad-Precision Math Library
ii  libssl-dev:i386                        1.0.1k-3+deb8u1                      i386         Secure Sockets Layer toolkit - development files
ii  libssl1.0.0:i386                       1.0.1k-3+deb8u1                      i386         Secure Sockets Layer toolkit - shared libraries
ii  libstdc++-4.8-dev:i386                 4.8.4-1                              i386         GNU Standard C++ Library v3 (development files)
ii  libstdc++6:i386                        4.9.2-10                             i386         GNU Standard C++ Library v3
ii  linux-libc-dev:i386                    3.16.7-ckt11-1+deb8u4                i386         Linux support headers for userspace development
ii  zlib1g:i386                            1:1.2.8.dfsg-2+b1                    i386         compression library - runtime
ii  zlib1g-dev:i386                        1:1.2.8.dfsg-2+b1                    i386         compression library - development

不幸的是,安装库并不能解决问题。这是我从ld(gcc链接器)中取出的最新输出:

/usr/bin/ld: cannot find -lboost_serialization
/usr/bin/ld: cannot find -lboost_thread
/usr/bin/ld: cannot find -lboost_date_time
/usr/bin/ld: cannot find -lboost_signals
/usr/bin/ld: cannot find -lboost_iostreams
/usr/bin/ld: cannot find -lboost_system
/usr/bin/ld: Warning: size of symbol `_ZNSt6vectorISsSaISsEED1Ev' changed from 194 in /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../liblog4cplus.so to 67 in ./source/R220/TTServer_cpp_d.o
/usr/bin/ld: Warning: size of symbol `_ZNSt6vectorISsSaISsEED2Ev' changed from 194 in /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../liblog4cplus.so to 67 in ./source/R220/TTServer_cpp_d.o
/usr/bin/ld: Warning: size of symbol `_ZNSt12_Destroy_auxILb0EE9__destroyIPSsEEvT_S3_' changed from 170 in /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../liblog4cplus.so to 55 in ./source/R220/TTServer_cpp_d.o
/usr/bin/ld: Warning: size of symbol `_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S8_' changed from 119 in /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../liblog4cplus.so to 98 in ./source/loader/R220Loader_cpp_d.o
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++

这是以下链接器设置的结果:

  

-m32 -L /lib/ -lboost_serialization -lboost_thread -lboost_date_time -lboost_signals -lboost_iostreams -lboost_system -llog4cplus -lcrypto -lssl -lm -shared

这意味着找不到所有libboost文件以及标准C ++库。那很糟糕,我已经安装了它们,我不知道我还应该做什么......有什么想法吗?

0 个答案:

没有答案