From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9483 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Error on compiling musl for i386. Date: Sat, 5 Mar 2016 16:18:51 -0500 Message-ID: <20160305211851.GJ9349@brightrain.aerifal.cx> References: <20160305195842.65e4d4103f891699f1d9e695@asm32.info> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1457212749 22597 80.91.229.3 (5 Mar 2016 21:19:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Mar 2016 21:19:09 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9496-gllmg-musl=m.gmane.org@lists.openwall.com Sat Mar 05 22:19:08 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1acJbQ-0007LF-Ky for gllmg-musl@m.gmane.org; Sat, 05 Mar 2016 22:19:08 +0100 Original-Received: (qmail 17844 invoked by uid 550); 5 Mar 2016 21:19:05 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 17826 invoked from network); 5 Mar 2016 21:19:04 -0000 Content-Disposition: inline In-Reply-To: <20160305195842.65e4d4103f891699f1d9e695@asm32.info> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:9483 Archived-At: On Sat, Mar 05, 2016 at 07:58:42PM +0200, John Found wrote: > Hello all! > > It is about musl v1.1.14 > > I am trying with: > > #./configure --host=i386 > #make > > But get the following error: > > sed -f ./tools/mkalltypes.sed ./arch/i386/bits/alltypes.h.in ./include/alltypes.h.in > obj/include/bits/alltypes.h > gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack -D_XOPEN_SOURCE=700 -I./arch/i386 -I./arch/generic -Iobj/src/internal -I./src/internal -Iobj/include -I./include -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -mtune=generic -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -include vis.h -fPIC -fno-stack-protector -DCRT -c -o obj/crt/Scrt1.o crt/Scrt1.c > {standard input}: Assembler messages: > {standard input}:11: Error: operand type mismatch for `push' > {standard input}:12: Error: operand type mismatch for `push' > {standard input}:15: Error: operand type mismatch for `push' > Makefile:151: recipe for target 'obj/crt/Scrt1.o' failed > make: *** [obj/crt/Scrt1.o] Error 1 > > > What I am doing wrong? > > Notice: My C/C++ programming skills are close to zero, so please explain simple. :) I think your gcc is a compiler for some arch other than i386, probably x86_64. Using --host=i386 forces configure to assume you're telling it the right arch and suppresses auto-detection. If this is the problem, you can either set CC to a cross-compiler when invoking configure, or try CC="gcc -m32". I have some ideas for making this more foolproof in the future. Rich