Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

odd behaviour of some programs on i386 cross-built from amd64

I decided to try upgrading some little Soekris boxes recently.

At the moment I only have amd64 build machines, so I did a cross-build
targeting i386.

Note that my source tree is somewhat dated, at about 8.99.32, but I've
been running this code without problem on a number of amd64 machines
(mostly Xen servers in both dom0 and domU).

This however is the first time I've upgraded any i386 machine.  The most
recently installed were some 5.1_STABLE systems (which were also
cross-built from amd64, but with similarly old host releases).

However when I finished the upgrade on the first Soekris system there
were some odd looking messages on the console from syslogd when I first
logged in, e.g.:


Syslog messages appear slightly better, but still odd, in the log files:

	Feb 12 10:30:00 lilbit cron[2759]: (root)^`CMD^`START^`(/usr/libexec/atrun)
	Feb 12 10:30:00 lilbit cron[3058]: (root)^`CMD^`FINISH^`(/usr/libexec/atrun)

Then I found that some things just didn't quite work properly at all,
while others didn't work quite correctly.

Since this also happens with the same build running under Xen, so here
are some examples from that environment:

	# uname -a
	NetBSD  8.99.32 NetBSD 8.99.32 (XEN3PAE_DOMU) #4: Thu Apr 16 17:48:40 PDT 2020  woods@future:/build/woods/future/current-amd64-i386-ppro-obj/more/work/woods/m-NetBSD-current/sys/arch/i386/compile/XEN3PAE_DOMU i386

So, the good news is recent i386 XEN3PAE_DOMU kernels do run fine in Xen!

but awk does weird things:

	# echo "1 2" | awk '{n=$2} END {print n}'
	# echo "1 2" | awk '{print $2}'
	# echo "1 2" | awk '{print}'
	1 2
	# echo "1 2" | awk '{n=$2} END {printf("n=%s\n", n)}'
	# echo "1 2" | awk '{printf("$2=%s\n", $2)}'

also od (and hexdump) fail completely with a very odd message:

	# od
	od: "8/2  " %06o " "\n"": bad format
	# file /usr/bin/od
	/usr/bin/od: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for NetBSD 8.99.32, stripped

and ksh also seems to echo spaces as "^`" (just like syslogd did partly)
(it's not the tty driver though -- it's ksh itself, turning off echoctl
has no effect):

	# ksh
	# echo^`hello
	# echo^`"'^`^`^`^`'"
	'    '

Most things seem to work though, including the kernel, with networking,
NFS, etc.  I.e. multiuser boot worked A-OK.

Does any of this look even remotely familiar to anyone else?

Oh, and note also that my build was done with:

	CPUFLAGS = -march=i586 -mtune=pentiumpro

I'll try another build with no CPUFLAGS, and if that similarly fails
I'll try a stock official i386 install and cross-build with that.

					Greg A. Woods <>

Kelowna, BC     +1 250 762-7675           RoboHack <>
Planix, Inc. <>     Avoncote Farms <>

Attachment: pgp_uXxUIsK9_.pgp
Description: OpenPGP Digital Signature

Home | Main Index | Thread Index | Old Index