Subject: Re: 2.x and COMPAT_NETBSD32
To: None <port-amd64@netbsd.org>
From: Quentin Garnier <cube@cubidou.net>
List: port-amd64
Date: 03/10/2006 00:22:10
--LtWARj4qtdVynAWs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Mar 09, 2006 at 06:17:17PM -0500, Jan Schaumann wrote:
> Quentin Garnier <cube@cubidou.net> wrote:
> > On Thu, Mar 09, 2006 at 05:01:47PM -0500, Jan Schaumann wrote:
> > > Quentin Garnier <cube@cubidou.net> wrote:
> > > =20
> > > >  - change all the absolute symlinks in /emul/netbsd32/usr/lib* to be
> > > >    relative instead of abosulte.  This is the easiest and the clean=
est,
> > > >    but it involves some work.
> > >=20
> > > Hmm, I've done that, so my /emul/netbsd32/lib contains
> >=20
> > The contents of /emul/netbsd32/lib is irrelevant.
> >=20
> > The contents of /emul/netbsd32/usr/libexec and /emul/netbsd32/usr/lib a=
re.
>=20
> Right, my mistake, typo in the message.  I have those libraries in
> /emul/netbsd32/usr/lib.  /emul/netbsd32/usr/libexec contains:
>=20
> /emul/netbsd32/usr/libexec/ld.so
> /emul/netbsd32/usr/libexec/ld.elf_so
>=20
> Both are the actual files, not symlinks.

In itself, that's strange.

> > > $ ./a.out
> > > ./a.out: 1: Syntax error: "(" unexpected
> >=20
> > Symptom that no correct interpreter is found;  because it is set to
> > /usr/libexec/ld.so_elf which in /emul/netbsd32 is a symlink to
> > /libexec/ld.so_elf.
>=20
> Well, unfortunately that's not the case.  It's the actual ld.so_elf from
> an i386 system, no symlink.
>=20
> > ktrace is helpful for those problems;  unfortunately it's not possible
> > to have an explicit error message.
>=20
> ktrace hasn't really been helpful to me here, either.
>=20
>   2897 ktrace   EMUL  "netbsd"
>   2897 ktrace   CALL  execve(0x7f7ffffffc52,0x7f7ffffffb18,0x7f7ffffffb28)
>   2897 ktrace   NAMI  "./a.out"
>   2897 ktrace   RET   execve -1 errno 8 Exec format error
>   2897 ktrace   CALL  execve(0x4089ec43,0x7f7ffffff5f0,0x7f7ffffffb28)

Hmm.  What does "readelf -e ./a.out" say?

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBRBC4otgoQloHrPnoAQKfDAf/aU/hkJOdrdMXkxYMTxqeM+BNO9GqNX7z
fzvY6Nm2EqUOuk+wt1JWcD//VuNwHcHDwbdxhM49+V9/ikSKnYGdYsIBnbwR5dHl
r5gQ1WoRQJxkOeOy/jYZyyLcrwGFbyM3oxxvbv/QYp0ro+C79wGCdV+ATjEpMVKw
35sTbpKzM5VcjgtMwHxvuzSQJOLlLzxtO5dL9jYAic3bUgtpACVL4Ik2zTO9hecT
exHW0sxAm3SBxXwRns+6qcK8ouDQT57maXm2i08pH2naNoU7xq56PDKZQ24y0JyG
YA6xAEHnw8wAxzYr5yiebW6DGTJqJGrIWQqcYcPwN4UNW4A+WZhIuQ==
=A285
-----END PGP SIGNATURE-----

--LtWARj4qtdVynAWs--