Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jan 2003 12:15:39 +0200
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Alexander Kabaev <kan@freebsd.org>
Cc:        Wilko Bulte <wilko@freebsd.org>, current@freebsd.org
Subject:   Cross-compiling on non-i386 (was: Borked loader)
Message-ID:  <20030130101539.GD22684@sunbay.com>
In-Reply-To: <20021104084836.25cd3678.kabaev@bellatlantic.net>
References:  <20021104053230.GA75624@server.c18609.belrs1.nsw.optusnet.com.au> <20021104063526.A25514@freebie.xs4all.nl> <20021104115014.GA51083@sunbay.com> <20021104131210.A28067@freebie.xs4all.nl> <20021104084836.25cd3678.kabaev@bellatlantic.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--jKBxcB1XkHIR0Eqt
Content-Type: multipart/mixed; boundary="UfEAyuTBtIjiZzX6"
Content-Disposition: inline


--UfEAyuTBtIjiZzX6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Nov 04, 2002 at 08:48:36AM -0500, Alexander Kabaev wrote:
> On Mon, 4 Nov 2002 13:12:10 +0100
> Wilko Bulte <wkb@freebie.xs4all.nl> wrote:
>=20
> > On Mon, Nov 04, 2002 at 01:50:14PM +0200, Ruslan Ermilov wrote:
> > > No, I've been looking at different things at the time --
> > > cross-compiling i386 on either Alpha or sparc64 doesn't work due to
> > > some issues with GCC configured to cross-build i386 (it sometimes
> > > produces different asm code than native compiler).  I've reported
> > > this on current@ several times but our GCC maintainers indicated no
> > > interest to look into this.  :-(
> >=20
> > Ah, at least good to know my memory still works OK ;)
> >=20
> > Maybe our new gcc maintainer Alexander Kabaev (kan@freebsd.org) has
> > more time than David? Might be worth asking.
> >=20
> Wilko,
>=20
> I am on vacation starting today for the next three week and my access to
> Internet will be non-existent for that whole time. Could you please
> remind me to took into that when I am back?
>=20
Alexander,

Can you please look into this now?  Last time I tried to build i386
on Alpha (beast.freebsd.org) was yesterday, with this set of commands:

export MAKEOBJDIRPREFIX=3D/j/ru/obj
make -DNOCLEAN -DNOCRYPT TARGET_ARCH=3Di386 buildworld __MAKE_CONF=3D/dev/n=
ull -DNOPROFILE

NOCRYPT is temporary, while markm@ and nectar@ are fixing the crypto
build.

This similarly fails like this:

: --------------------------------------------------------------
: >>> stage 4: building everything..
: --------------------------------------------------------------
: cd /j/ru/src-5; MAKEOBJDIRPREFIX=3D/j/ru/obj/i386  MACHINE_ARCH=3Di386  M=
ACHINE=3Di386  CPUTYPE=3D  GROFF_BIN_PATH=3D/j/ru/obj/i386/j/ru/src-5/alpha=
/usr/bin  GROFF_FONT_PATH=3D/j/ru/obj/i386/j/ru/src-5/alpha/usr/share/groff=
_font  GROFF_TMAC_PATH=3D/j/ru/obj/i386/j/ru/src-5/alpha/usr/share/tmac  DE=
STDIR=3D/j/ru/obj/i386/j/ru/src-5/alpha  INSTALL=3D"sh /j/ru/src-5/tools/in=
stall.sh"  PATH=3D/j/ru/obj/i386/j/ru/src-5/alpha/usr/sbin:/j/ru/obj/i386/j=
/ru/src-5/alpha/usr/bin:/j/ru/obj/i386/j/ru/src-5/alpha/usr/games:/sbin:/bi=
n:/usr/sbin:/usr/bin make -f Makefile.inc1 all
: =3D=3D=3D> share/info
: [...]
: =3D=3D=3D> sbin/gbde
: cc -O -pipe -mcpu=3Dpentiumpro -I/j/ru/src-5/sbin/gbde/../../sys   -Werro=
r -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpoint=
er-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast=
-align -Wuninitialized  -c /j/ru/src-5/sbin/gbde/gbde.c
: [...]
: cc -O -pipe -mcpu=3Dpentiumpro -I/j/ru/src-5/sbin/gbde/../../sys   -Werro=
r -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpoint=
er-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast=
-align -Wuninitialized  -c /j/ru/src-5/sys/crypto/sha2/sha2.c
: {standard input}: Assembler messages:
: {standard input}:89: Error: bignum invalid
: {standard input}:90: Error: bignum invalid
: {standard input}:93: Error: bignum invalid
: {standard input}:94: Error: bignum invalid
: {standard input}:95: Error: bignum invalid
: [...]
: {standard input}:184: Error: bignum invalid
: {standard input}:186: Error: bignum invalid
: {standard input}:188: Error: bignum invalid
: *** Error code 1
:=20
: Stop in /j/ru/src-5/sbin/gbde.
: *** Error code 1

Attached is the copy of my previous message with some analysis.


Cheers,
--=20
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

--UfEAyuTBtIjiZzX6
Content-Type: message/rfc822
Content-Disposition: inline

Date: Sun, 13 Oct 2002 16:46:34 +0300
From: Ruslan Ermilov <ru@FreeBSD.org>
To: David O'Brien <obrien@FreeBSD.org>, Alexander Kabaev <kan@FreeBSD.org>
Cc: current@FreeBSD.org, alpha@FreeBSD.org
Subject: Re: alpha can't cross-compile i386
Message-ID: <20021013134634.GB35585@sunbay.com>
References: <20020801124807.A11058@freebie.xs4all.nl> <20020801120738.GA26622@sunbay.com> <20020801195936.A12267@freebie.xs4all.nl> <20020802165525.GA80884@sunbay.com> <20020802205245.A16184@freebie.xs4all.nl> <20020805184000.GA53697@sunbay.com> <20020806161928.A9273@freebie.xs4all.nl> <20020807091602.GA52251@sunbay.com> <20020807105144.GA68121@sunbay.com> <20020807150411.GA36526@sunbay.com>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="rS8CxjVDS/+yyDmU"
Content-Disposition: inline
In-Reply-To: <20020807150411.GA36526@sunbay.com>
User-Agent: Mutt/1.3.99i


--rS8CxjVDS/+yyDmU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

The situation did not change during the last two months, even with
the latest GCC imports.  beast.FreeBSD.org still blows up attempting
to build world and kernel for i386:

: --------------------------------------------------------------
: >>> stage 4: building everything..
: --------------------------------------------------------------
: cd /j/ru/src-5; MAKEOBJDIRPREFIX=3D/j/ru/obj/i386  MACHINE_ARCH=3Di386  M=
ACHINE=3Di386  CPUTYPE=3D  GROFF_BIN_PATH=3D/j/ru/obj/i386/j/ru/src-5/alpha=
/usr/bin  GROFF_FONT_PATH=3D/j/ru/obj/i386/j/ru/src-5/alpha/usr/share/groff=
_font  GROFF_TMAC_PATH=3D/j/ru/obj/i386/j/ru/src-5/alpha/usr/share/tmac  DE=
STDIR=3D/j/ru/obj/i386/j/ru/src-5/alpha  INSTALL=3D"sh /j/ru/src-5/tools/in=
stall.sh"  PATH=3D/j/ru/obj/i386/j/ru/src-5/alpha/usr/sbin:/j/ru/obj/i386/j=
/ru/src-5/alpha/usr/bin:/j/ru/obj/i386/j/ru/src-5/alpha/usr/games:/sbin:/bi=
n:/usr/sbin:/usr/bin make -f Makefile.inc1 all
[...]
: =3D=3D=3D> usr.bin/getconf
: cc -O -pipe -mcpu=3Dpentiumpro -I/j/ru/src-5/usr.bin/getconf    -c limits=
.c
: {standard input}: Assembler messages:
: {standard input}:334: Error: bignum invalid
: *** Error code 1
:=20
: Stop in /j/ru/src-5/usr.bin/getconf.
: *** Error code 1

The difference between the native i386 assembler output and the output
from the i386 cross-compiler for the limits.c is as follows:

--- limits.s (alpha->i386)	Sun Oct 13 15:57:20 2002
+++ limits.s (i386 native)	Sun Oct 13 16:02:15 2002
@@ -331,10 +331,10 @@
 	.quad	-2147483648
 	.long	1
 	.long	.LC55
-	.quad	-9223372036854775808
+	.quad	0x8000000000000000
 	.long	1
 	.long	.LC56
-	.quad	9223372036854775807
+	.quad	0x7fffffffffffffff
 	.long	1
 	.long	.LC57
 	.quad	0
@@ -367,13 +367,13 @@
 	.quad	255
 	.long	1
 	.long	.LC67
-	.quad	4294967295
+	.quad	0xffffffff
 	.long	1
 	.long	.LC68
 	.quad	-1
 	.long	1
 	.long	.LC69
-	.quad	4294967295
+	.quad	0xffffffff
 	.long	1
 	.long	.LC70
 	.quad	65535

: --------------------------------------------------------------
: >>> Kernel build for GENERIC started on Sun Oct 13 05:25:16 PDT 2002
: --------------------------------------------------------------
: =3D=3D=3D> GENERIC
[...]
: cd /j/ru/obj/i386/j/ru/src-5/sys/GENERIC;  MAKEOBJDIRPREFIX=3D/j/ru/obj/i=
386  MACHINE_ARCH=3Di386  MACHINE=3Di386  CPUTYPE=3D  GROFF_BIN_PATH=3D/j/r=
u/obj/i386/j/ru/src-5/alpha/usr/bin  GROFF_FONT_PATH=3D/j/ru/obj/i386/j/ru/=
src-5/alpha/usr/share/groff_font  GROFF_TMAC_PATH=3D/j/ru/obj/i386/j/ru/src=
-5/alpha/usr/share/tmac  DESTDIR=3D/j/ru/obj/i386/j/ru/src-5/alpha  INSTALL=
=3D"sh /j/ru/src-5/tools/install.sh"  PATH=3D/j/ru/obj/i386/j/ru/src-5/alph=
a/usr/sbin:/j/ru/obj/i386/j/ru/src-5/alpha/usr/bin:/j/ru/obj/i386/j/ru/src-=
5/alpha/usr/games:/sbin:/bin:/usr/sbin:/usr/bin make KERNEL=3Dkernel all
[...]
: cc -c -O -pipe -mcpu=3Dpentiumpro -Wall -Wredundant-decls -Wnested-extern=
s -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast=
-qual  -fformat-extensions -ansi -g -nostdinc -I-  -I. -I/j/ru/src-5/sys -I=
/j/ru/src-5/sys/dev -I/j/ru/src-5/sys/contrib/dev/acpica -I/j/ru/src-5/sys/=
contrib/ipfilter -D_KERNEL -include opt_global.h -fno-common  -mno-align-lo=
ng-strings -mpreferred-stack-boundary=3D2 -ffreestanding -Werror  /j/ru/src=
-5/sys/dev/advansys/adw_pci.c
: {standard input}: Assembler messages:
: {standard input}:22: Error: bignum invalid
: {standard input}:28: Error: bignum invalid
: *** Error code 1
:=20
: Stop in /j/ru/obj/i386/j/ru/src-5/sys/GENERIC.
: *** Error code 1


On Wed, Aug 07, 2002 at 06:04:11PM +0300, Ruslan Ermilov wrote:
> On Wed, Aug 07, 2002 at 01:51:44PM +0300, Ruslan Ermilov wrote:
> > On Wed, Aug 07, 2002 at 12:16:02PM +0300, Ruslan Ermilov wrote:
> > [...]
> > > Wilko,
> > >=20
> > > I am unable to cross-build i386 on alpha due to this bug in gcc.
> > > Native compiler has no problem building the generated cgram.c,
> > > and I have verified that native and cross compilers produce the
> > > same cgram.c output.  Perhaps, David could shed some light on
> > > this, and even probably fix it:
> > >=20
> > > %%%
> > > --------------------------------------------------------------
> > > >>> stage 4: building everything..
> > > --------------------------------------------------------------
> > > cd /usr/src; MAKEOBJDIRPREFIX=3D/usr/obj/i386  MACHINE_ARCH=3Di386  M=
ACHINE=3Di386  CPUTYPE=3D  OBJFORMAT_PATH=3D/usr/obj/i386/usr/src/alpha/usr=
/libexec  GROFF_BIN_PATH=3D/usr/obj/i386/usr/src/alpha/usr/bin  GROFF_FONT_=
PATH=3D/usr/obj/i386/usr/src/alpha/usr/share/groff_font  GROFF_TMAC_PATH=3D=
/usr/obj/i386/usr/src/alpha/usr/share/tmac  DESTDIR=3D/usr/obj/i386/usr/src=
/alpha  INSTALL=3D"sh /usr/src/tools/install.sh"  PATH=3D/usr/obj/i386/usr/=
src/alpha/usr/sbin:/usr/obj/i386/usr/src/alpha/usr/bin:/usr/obj/i386/usr/sr=
c/alpha/usr/games:/sbin:/bin:/usr/sbin:/usr/bin make -f Makefile.inc1 all
> > > =3D=3D=3D> share/info
> > > [...]
> > > =3D=3D=3D> usr.bin/xlint/lint1
> > > cc -O -pipe -mcpu=3Dpentiumpro -I. -I/usr/src/usr.bin/xlint/lint1 -I/=
usr/src/usr.bin/xlint/lint1/../arch/i386 -I/usr/src/usr.bin/xlint/lint1/../=
common    -c cgram.c
> > > cc -O -pipe -mcpu=3Dpentiumpro -I. -I/usr/src/usr.bin/xlint/lint1 -I/=
usr/src/usr.bin/xlint/lint1/../arch/i386 -I/usr/src/usr.bin/xlint/lint1/../=
common    -c scan.c
> > > gzip -cn lint.7 > lint.7.gz
> > > groff -Tascii -mtty-char -man -t lint.7 | gzip -cn > lint.7.cat.gz
> > > /usr/src/usr.bin/xlint/lint1/cgram.y: In function `toicon':
> > > /usr/src/usr.bin/xlint/lint1/cgram.y:1711: unrecognizable insn:
> > > (insn 247 219 248 (set (reg:CC 17 flags)
> > >         (compare:CC (subreg:SI (reg/v:DI 75) 0)
> > >             (const_int 2147483648 [0x80000000]))) -1 (nil)
> > >     (expr_list:REG_DEAD (reg/v:DI 75)
> > >         (nil)))
> > > /usr/src/usr.bin/xlint/lint1/cgram.y:1711: Internal compiler error in=
 extract_insn, at recog.c:2150
> > > Please submit a full bug report,
> > > with preprocessed source if appropriate.
> > > See <URL:http://www.gnu.org/software/gcc/bugs.html>; for instructions.
> > > *** Error code 1
> > > 1 error
> > > %%%
> > >=20
> > > Meanwhile, I will temporary remove usr.bin/xlint from the build, and
> > > resume the i386 release building on ds10.
> > >=20
> > While attempting to cross-compile kernel, it bombs out with, attempting
> > to build `random' module like this:
> >=20
> > =3D=3D=3D> random
> > cc -O -pipe -mcpu=3Dpentiumpro -I/usr/src/sys/modules/random/../..  -D_=
KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmiss=
ing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wno-format -ansi -DKL=
D_MODULE -nostdinc -I-  -I/usr/src/sys/modules/random/../.. -I. -I@ -I@/dev=
 -I@/../include -fno-common -g -mpreferred-stack-boundary=3D2 -ffreestandin=
g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-p=
rototypes -Wpointer-arith -Winline -Wcast-qual  -Wno-format -ansi -c /usr/s=
rc/sys/crypto/sha2/sha2.c
> > {standard input}: Assembler messages:
> > {standard input}:97: Error: bignum invalid
> > {standard input}:98: Error: bignum invalid
> > {standard input}:101: Error: bignum invalid
> >=20
> > Excluding it as well...  :(
> >=20
> I see the same symptoms on beast.FreeBSD.org running fresh 5.0-CURRENT,
> so the problem is not unique to your DS10 host.
>=20
> Excluding "random" module did not help; buildkernel died similarly
> later:
>=20
> : cc -c -O -pipe -mcpu=3Dpentiumpro -Wall -Wredundant-decls -Wnested-exte=
rns -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wca=
st-qual  -Wno-format -ansi -g -nostdinc -I-  -I. -I/usr/src/sys -I/usr/src/=
sys/dev -I/usr/src/sys/contrib/dev/acpica -I/usr/src/sys/contrib/ipfilter -=
I/usr/src/sys/../include -D_KERNEL -include opt_global.h -fno-common   -mpr=
eferred-stack-boundary=3D2 -ffreestanding -Werror  /usr/src/sys/dev/advansy=
s/adw_pci.c
> : {standard input}: Assembler messages:
> : {standard input}:24: Error: bignum invalid
> : {standard input}:30: Error: bignum invalid
> : *** Error code 1
> : Stop in /usr/obj/i386/usr/src/sys/GENERIC.
> : *** Error code 1
>=20
> David, can you please look into this?



--=20
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

--rS8CxjVDS/+yyDmU
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE9qXk6Ukv4P6juNwoRAtUNAJ0RuSHLdIncXPOqzukMWzBUe1PU9wCfQ93y
OtpHYA8GNSds6Nl4yfdc6+c=
=BKvg
-----END PGP SIGNATURE-----

--rS8CxjVDS/+yyDmU--

--UfEAyuTBtIjiZzX6--

--jKBxcB1XkHIR0Eqt
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+OPtLUkv4P6juNwoRAvRhAJ4+/qcmkAxY4z6dMUf1SJxEdy0FXwCfUAn5
+QtoY0mi58O92Y6pF5/SFVQ=
=m0GP
-----END PGP SIGNATURE-----

--jKBxcB1XkHIR0Eqt--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030130101539.GD22684>