From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: add etc/PROBLEMS entry for building 32-bit exe on 64-bit system Date: Mon, 15 Jan 2007 20:22:09 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1168910587 6064 80.91.229.12 (16 Jan 2007 01:23:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 Jan 2007 01:23:07 +0000 (UTC) Cc: schwab@suse.de, Eli Zaretskii , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 16 02:23:04 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H6d2R-0005OE-IK for ged-emacs-devel@m.gmane.org; Tue, 16 Jan 2007 02:22:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6d2R-0004zQ-7N for ged-emacs-devel@m.gmane.org; Mon, 15 Jan 2007 20:22:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6d2H-0004zL-33 for emacs-devel@gnu.org; Mon, 15 Jan 2007 20:22:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6d2G-0004z9-KM for emacs-devel@gnu.org; Mon, 15 Jan 2007 20:22:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6d2G-0004z6-G2 for emacs-devel@gnu.org; Mon, 15 Jan 2007 20:22:48 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H6d2G-0008N0-6H for emacs-devel@gnu.org; Mon, 15 Jan 2007 20:22:48 -0500 Original-Received: from [127.0.0.1] (helo=localhost) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1H6d1d-0003PE-Ev; Mon, 15 Jan 2007 20:22:09 -0500 Original-To: Stefan Monnier X-Spook: LLNL Croatian Albanian Rubin e-cash Watergate IRA spies X-Ran: r6}nr:zf~lMGchLCeLj19eX%+#UQ0``{]+d(g29v){Dwg0]nUc68W>`50H_(yoCrX3Cltk X-Hue: magenta X-Attribution: GM In-Reply-To: (Stefan Monnier's message of "Wed, 10 Jan 2007 18:28:13 -0500") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:65234 Archived-At: Stefan Monnier wrote: > PS: IMHO we shouldn't need to specify --build=i386-linux-gnu. Instead, > passing CC="gcc -m32" should be sufficient. This may be a superfluous comment (depending on the meaning of "should"), but in practice it is not sufficient (RHEL4 x86_64 with all available relevant 32-bit libs installed): Using CC="gcc -m32": 1) Configure wrongly picks /usr/X11R6/lib64 for the X windows libraries. Manually fix this by passing --x-libraries=/usr/X11R6/lib. 2) Configure wrongly decides sound is available, when it is not (there is no standard package for this OS that provides 32-bit "libasound.so"). Bootstrap fails trying to create temacs due to the lack of compatible libasound.so. Fix this by manually passing --without-sound. 3) Configure sets HAVE_X86_64_LIB64_DIR to 1, so linking temacs fails because it tries to use /usr/lib64/crt1.o etc rather than /usr/lib/crt1.o etc. After correcting this... 4) temacs segfaults after loading subr during dumping. There are also hundreds of "warning: left shift count >= width of type" on compilation. Just using --build=i386-linux-gnu is also not sufficient. The build just calls "gcc" as usual, which compiles 64-bit objects. Only the combination of the two methods works for me (still subject to 1 and 2, not 3 or 4). No compilation warnings either. Quite possibly the fix is trivial for someone who knows what they are doing. I have nothing else to say as to what the "right" approach is or how to do it; I can only offer to test any solutions.