apt-get install build-essential:i386
doesn't work at all:
The following packages have unmet dependencies:
build-essential:i386 : Depends: gcc:i386 (>= 4:4.4.3) but it is not going to be installed
Depends: g++:i386 (>= 4:4.4.3) but it is not going to be installed
Note the 14.04 tag. Answers on
Trouble compiling a 32 bit binary on a 64 bit machine
are outdated.
Also, there are no ./configure
script to use the Compile 32 bit on 64 bitsystem answer.
More details
I'm trying to complite DFHack from quietust branch: https://github.com/quietust/dfhack/
apt-get install gcc-multilib g++-multilib
removed the
CMake Error at depends/protobuf/CMakeLists.txt:60 (MESSAGE):
Could not find a working hash map implementation. Please install GCC >=
4.4, and all necessary 32-bit C++ development libraries.
message, but
-- Could NOT find Threads (missing: Threads_FOUND)
Can't locate XML/LibXML.pm in @INC (you may need to install the XML::LibXML module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at xml/list.pl line 6.
BEGIN failed--compilation aborted at xml/list.pl line 6.
is still there. Do I have to manually seek all i386 build-essential the dependencies?
Yes, for anything that is not already packaged in Ubuntu, or in a PPA that you've added, you will have to manually install all the dependencies needed to compile it. For anything already packaged in Ubuntu, you can run
apt-get build-dep $package
and it will install the build dependencies for that package, however, if there are any additional or changed dependencies from what was used in the version built in Ubuntu, you will still need to manually install those additional or changed dependencies.AFAIU, an optimal way to compile 32-bit executable on a 64-bit system would be creating a chroot in the following way (you may want to replace
xenial
with a needed codename):Then you can use the chroot with just
Notice that it won't have sudo by default, you'll have to manage it with
Idea found in this answer https://askubuntu.com/a/216670/20275