[英]Building 32-bit FCGI++ binaries in 64-bit environment in Ubuntu 13
Good afternoon. 下午好。
I'm trying to build 32-bit fcgi++ binaries under my 64-bit env. 我正在尝试在64位环境下构建32位fcgi ++二进制文件。 I configured FCGI++ in the following way:
我通过以下方式配置了FCGI ++:
CC="gcc -m32" ./configure
After typing 'make' I see the some building process and the following errors at the end (snippet is here): 输入“ make”后,我会看到一些构建过程以及最后的以下错误(代码段在此处):
gcc -m32 -shared fcgio.lo -Wl,--rpath -Wl,/home/eotovchits/Downloads/fcgi/fcgi-2.4.1-SNAP-0311112127/libfcgi/.libs -Wl,--rpath -Wl,/usr/local/lib /home/eotovchits/Downloads/fcgi/fcgi-2.4.1-SNAP-0311112127/libfcgi/.libs/libfcgi.so -Wl,-soname -Wl,libfcgi++.so.0 -o .libs/libfcgi++.so.0.0.0 /usr/bin/ld: i386:x86-64 architecture of input file
fcgio.lo' is incompatible with i386 output fcgio.lo: In function
__static_initialization_and_destruction_0': /usr/include/c++/4.8/iostream:74: undefined reference tostd::ios_base::Init::Init()' /usr/include/c++/4.8/iostream:74: undefined reference to
std::ios_base::Init::~Init()'gcc -m32 -shared fcgio.lo -Wl,-rpath -Wl,/ home / eotovchits / Downloads / fcgi / fcgi-2.4.1-SNAP-0311112127 / libfcgi / .libs -Wl,-rpath -Wl,/ usr / local / lib /home/eotovchits/Downloads/fcgi/fcgi-2.4.1-SNAP-0311112127/libfcgi/.libs/libfcgi.so -Wl,-soname -Wl,libfcgi ++。so.0 -o .libs / libfcgi ++。so.0.0.0 / usr / bin / ld:输入文件
fcgio.lo' is incompatible with i386 output fcgio.lo: In function
i386:x86-64体系结构fcgio.lo' is incompatible with i386 output fcgio.lo: In function
__static_initialization_and_destruction_0'中:/usr/include/c++/4.8/ iostream:74:未定义引用std::ios_base::Init::Init()' /usr/include/c++/4.8/iostream:74: undefined reference to
++/4.8/iostream:74:未定义引用std::ios_base::Init::Init()' /usr/include/c++/4.8/iostream:74: undefined reference to
::〜Init()'
...................... a lot of similar lines ........................... ......................许多类似的线....................... ....
fcgio.lo: In function
~basic_ios': /usr/include/c++/4.8/bits/basic_ios.h:276: undefined reference to
vtable for std::basic_ios >' /usr/include/c++/4.8/bits/basic_ios.h:276: undefined reference tostd::ios_base::~ios_base()' /usr/include/c++/4.8/bits/basic_ios.h:276: undefined reference to
vtable for std::basic_ios >' /usr/include/c++/4.8/bits/basic_ios.h:276: undefined reference tostd::ios_base::~ios_base()' fcgio.lo: In function
fcgi_istream::~fcgi_istream()': /home/eotovchits/Downloads/fcgi/fcgi-2.4.1-SNAP-0311112127/libfcgi/../include/fcgio.h:120: undefined reference to `operator delete(void*)' /usr/bin/ld: fcgio.lo: file class ELFCLASS64 incompatible with ELFCLASS32 /usr/bin/ld: final link failed: File in wrong format collect2: error: ld returned 1 exit statusfcgio.lo:在〜basic_ios函数中:/usr/include/c++/4.8/bits
~basic_ios': /usr/include/c++/4.8/bits/basic_ios.h:276: undefined reference to
276:对std :: basic_ios>'/usr/include/c++/4.8/bits~basic_ios': /usr/include/c++/4.8/bits/basic_ios.h:276: undefined reference to
vtable的~basic_ios': /usr/include/c++/4.8/bits/basic_ios.h:276: undefined reference to
.h:276:未定义引用std::ios_base::~ios_base()' /usr/include/c++/4.8/bits/basic_ios.h:276: undefined reference to
'/usr/include/c++/4.8/bits/basic_ios.h:276:未定义引用vtable for std :: basic_ios>'/ usr / include / c ++ / 4.8 / bits / basic_ios.h:276:对std::ios_base::~ios_base()' fcgio.lo: In function
未定义引用std::ios_base::~ios_base()' fcgio.lo: In function
fcgi_istream ::〜fcgi_istream()'中:/ home / eotovchits / Downloads / fcgi / fcgi-2.4.1-SNAP-0311112127 / libfcgi /../ include / fcgio.h:120:对`operator delete(void *)'的未定义引用/ usr / bin / ld:fcgio.lo:文件类ELFCLASS64与ELFCLASS32 / usr / bin / ld不兼容:最终链接失败:格式错误的文件collect2:错误:ld返回了1退出状态
I assume that I need some additional 32-bits building environment to make the 32-bits binaries (along w/ all the needed 3rd-party libraries, .as and .so-s) 我假设我需要一些其他的32位构建环境来制作32位二进制文件(以及所有需要的第三方库.as和.so-s)
Do you know how can i set up such environment locally along with native 64-bit environment and build my fcgi++ binaries for 32-bits environment? 您知道如何与本地64位环境一起在本地设置此类环境,以及如何为32位环境构建fcgi ++二进制文件吗?
Thank you. 谢谢。
on Ubuntu you can install the libraries for i386 along the x64 ones by appending":i386" at the end oh the name of the package you want to install (assuming you are using apt-get to install the lib). 在Ubuntu上,您可以在x64的基础上安装i386的库,方法是在末尾添加“:i386”,哦,要安装的软件包的名称(假设您正在使用apt-get安装lib)。
here is an example of how to do it: 这是一个如何做的例子:
https://askubuntu.com/questions/60751/is-it-possible-to-have-32-bit-libraries-installed-on-a-64-bit-system https://askubuntu.com/questions/60751/is-it-possible-to-have-32-bit-libraries-installed-on-a-64-bit-system
And here how to install the compiler for 32 bits (well the STL and other stuff): 这里是如何安装32位编译器(以及STL和其他内容):
http://en.kioskea.net/faq/1137-compiling-testing-in-32-bit-on-ubuntu-x86-64 http://en.kioskea.net/faq/1137-compiling-testing-in-32-bit-on-ubuntu-x86-64
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.