Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
73
rated 0 times [  73] [ 0]  / answers: 1 / hits: 67098  / 2 Years ago, fri, february 11, 2022, 3:55:36

I'm trying to compile a c program as a 32 bit binary instead of 64 bit. I started by just adding -m32 and got some errors. Googling around a little I came across a note to install ia32-libs. Running apt-get install ia32-libs resulted in a notification taht it was already installed and at the newest version.



There is a chain of libraries each one including the next until it fails:



/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory


It seems to be including 32 bit versions of the other includes /usr/include/c++/4.6/x86_64-linux-gnu/32/bits/ ...



What am I missing?


More From » 32-bit

 Answers
5

Lekensteyn's answer conflicted with lots of existing packages for me (on 64-bit oneiric).


I instead did this, which pulled in the libc6-dev-i386 package:


sudo apt-get install gcc-multilib

[#41193] Sunday, February 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
egantfis

Total Points: 406
Total Questions: 108
Total Answers: 108

Location: Austria
Member since Thu, Jan 7, 2021
3 Years ago
egantfis questions
Mon, Nov 1, 21, 03:37, 3 Years ago
Fri, Mar 18, 22, 23:26, 2 Years ago
Mon, Mar 6, 23, 05:03, 1 Year ago
Sun, Oct 3, 21, 23:30, 3 Years ago
Thu, Mar 10, 22, 12:28, 2 Years ago
;