Bug 13638 - Fail to build on Linux 64bit with -m32
Summary: Fail to build on Linux 64bit with -m32
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Runtime
Classification: Mono
Component: packaging ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-07-31 01:57 UTC by Amit Schreiber
Modified: 2013-08-01 02:47 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

Description Amit Schreiber 2013-07-31 01:57:02 UTC
I'm trying to build a 32 bit version of Mono on a 64 bit Ubuntu machine.

Steps:
-----
1. sudo apt-get install ia32-libs libc6-dev-i386 
2. CFLAGS="-m32" ./configure
3. make

Result:
------
mono-context.c: In function גmono_sigctx_to_monoctxג:
mono-context.c:47:2: error: implicit declaration of function גUCONTEXT_REG_EAXג [-Werror=implicit-function-declaration]
mono-context.c:47:2: warning: nested extern declaration of גUCONTEXT_REG_EAXג [-Wnested-externs]
mono-context.c:48:2: error: implicit declaration of function גUCONTEXT_REG_EBXג [-Werror=implicit-function-declaration]
mono-context.c:48:2: warning: nested extern declaration of גUCONTEXT_REG_EBXג [-Wnested-externs]
mono-context.c:49:2: error: implicit declaration of function גUCONTEXT_REG_ECXג [-Werror=implicit-function-declaration]
mono-context.c:49:2: warning: nested extern declaration of גUCONTEXT_REG_ECXג [-Wnested-externs]
mono-context.c:50:2: error: implicit declaration of function גUCONTEXT_REG_EDXג [-Werror=implicit-function-declaration]
mono-context.c:50:2: warning: nested extern declaration of גUCONTEXT_REG_EDXג [-Wnested-externs]
mono-context.c:51:2: error: implicit declaration of function גUCONTEXT_REG_EBPג [-Werror=implicit-function-declaration]
mono-context.c:51:2: warning: nested extern declaration of גUCONTEXT_REG_EBPג [-Wnested-externs]
mono-context.c:52:2: error: implicit declaration of function גUCONTEXT_REG_ESPג [-Werror=implicit-function-declaration]
mono-context.c:52:2: warning: nested extern declaration of גUCONTEXT_REG_ESPג [-Wnested-externs]
mono-context.c:53:2: error: implicit declaration of function גUCONTEXT_REG_ESIג [-Werror=implicit-function-declaration]
mono-context.c:53:2: warning: nested extern declaration of גUCONTEXT_REG_ESIג [-Wnested-externs]
mono-context.c:54:2: error: implicit declaration of function גUCONTEXT_REG_EDIג [-Werror=implicit-function-declaration]
mono-context.c:54:2: warning: nested extern declaration of גUCONTEXT_REG_EDIג [-Wnested-externs]
mono-context.c:55:2: error: implicit declaration of function גUCONTEXT_REG_EIPג [-Werror=implicit-function-declaration]
mono-context.c:55:2: warning: nested extern declaration of גUCONTEXT_REG_EIPג [-Wnested-externs]
mono-context.c: In function גmono_monoctx_to_sigctxג:
mono-context.c:79:25: error: lvalue required as left operand of assignment
mono-context.c:80:25: error: lvalue required as left operand of assignment
mono-context.c:81:25: error: lvalue required as left operand of assignment
mono-context.c:82:25: error: lvalue required as left operand of assignment
mono-context.c:83:25: error: lvalue required as left operand of assignment
mono-context.c:84:25: error: lvalue required as left operand of assignment
mono-context.c:85:25: error: lvalue required as left operand of assignment
mono-context.c:86:25: error: lvalue required as left operand of assignment
mono-context.c:87:25: error: lvalue required as left operand of assignment

Environment:
Ubuntu 11.10
Linux 3.7.10 #7 SMP Mon Jun 3 21:48:30 IDT 2013 x86_64 x86_64 x86_64 GNU/Linux
Mono 3.0.12
Comment 1 Zoltan Varga 2013-07-31 20:33:12 UTC
It might work if you do
configure i386-linux-gnu
or something similar.
Comment 2 Amit Schreiber 2013-08-01 02:47:26 UTC
Thanks. The following works for me:
CFLAGS="-m32" ./configure --host=i386-linux-gnu