Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Apr 2006 02:58:18 -0400
From:      Kris Kennaway <kris@obsecurity.org>
To:        Premal Mishra <premal.mishra@gmail.com>
Cc:        freebsd-questions@freebsd.org, Kris Kennaway <kris@obsecurity.org>
Subject:   Re: linker error: undefined reference to _dl_global_scope_alloc@GLIBC_2.1
Message-ID:  <20060414065818.GA77746@xor.obsecurity.org>
In-Reply-To: <2211edca0604132356k42ead631p81f9a646a01f5a9a@mail.gmail.com>
References:  <2211edca0604131404i5f8e7dd8w979a9381d875050f@mail.gmail.com> <20060413220040.GA71356@xor.obsecurity.org> <2211edca0604132356k42ead631p81f9a646a01f5a9a@mail.gmail.com>

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

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

On Fri, Apr 14, 2006 at 12:26:09PM +0530, Premal Mishra wrote:
> Hi Kris,
>=20
> I was trying to build a linux binary but seems doing it the wrong way.
>=20
> Problem is: I want to use a library which is built for linux. So i did
> the following:
>=20
>  1. cd /compat/linux
>  2. linked /compat/linux/lib/libc.so.6
>=20
> When i linked to libc.so.6 the undefined reference errors for
> __ctype_b were gone.
>=20
> How to correctly build a linux binary?

chroot to /compat/linux, so that no FreeBSD files are visible.  You
will need to install the linux_devtools port to provide linux versions
of the compiler toolchain etc.

Kris

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

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

iD8DBQFEP0gJWry0BWjoQKURAnw+AKC9AuUJzm3xHlQb+xC+MaPE7rH2rACg0Tq3
ZY8ODq+Tylhdd2ZpSqpZLj0=
=3Q16
-----END PGP SIGNATURE-----

--gBBFr7Ir9EOA20Yy--



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