Subject: Re: newlock2 and binary compatibility
To: Martijn van Buul <pino+gmane_os_netbsd_current@dohd.org>
From: Bill Stouder-Studenmund <wrstuden@netbsd.org>
List: current-users
Date: 03/02/2007 14:04:43
--SLDf9lqlvOQaIe6s
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Mar 02, 2007 at 08:47:43AM +0000, Martijn van Buul wrote:
> Hey;
>=20
> It seems that since the merge of newlock2, -current is no longer binary
> compatible with 4.0_BETA2, 3.* and 2.* binaries. With the merge, several
> syscalls have been removed, and no emulation is in place. I stumbled=20
> across this while trying to cross-compile i386 NetBSD-4.0_BETA2 packages
> on my -current amd64 host[1], using a pkg_comp chroot. This fails during
> the configuration phase of databases/openldap-client, for example,
> as the configure script tries to run a small pthread test program, which
> fails with a "system call not implemented."

[snip]

> In my specific case, I can probably work around things by trying to
> shoehorn -current's libpthread into 4.0_BETA2, but it's not elegant.

That's probably what you want to do. You will also need add syscall stubs=
=20
for the system calls the new libpthread uses. While they are in libc=20
12.150 & later, you may contaminate your 4.X environment with other stuff.

> Is a "true" solution actually possible? I don't know the old scheduler
> activation syscall interface nor the newlock2 one well enough to figure o=
ut
> if emulation would be feasible, but it would be nice of something could
> be done.

The problem is that the sa code won't work w/o biglock (and sometimes not
even then). And no one came up with a fix.

The main compat idea was that all you need is a libpthread that=20
corresponds to your kernel. chroot environments, though, are more=20
difficult.

Take care,

Bill

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

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

iD8DBQFF6J97Wz+3JHUci9cRAqK3AJ4zOQJ5xDyuGqpQvQjxOb1RQCwq8gCeOT/o
cryFHxQBhPA49nINzGWJz0Q=
=1Bdc
-----END PGP SIGNATURE-----

--SLDf9lqlvOQaIe6s--