linker error: undefined reference to _dl_global_scope_alloc@GLIBC_2.1

Kris Kennaway kris at obsecurity.org
Fri Apr 14 06:58:19 UTC 2006


On Fri, Apr 14, 2006 at 12:26:09PM +0530, Premal Mishra wrote:
> Hi Kris,
> 
> I was trying to build a linux binary but seems doing it the wrong way.
> 
> Problem is: I want to use a library which is built for linux. So i did
> the following:
> 
>  1. cd /compat/linux
>  2. linked /compat/linux/lib/libc.so.6
> 
> When i linked to libc.so.6 the undefined reference errors for
> __ctype_b were gone.
> 
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060414/befc47b4/attachment.pgp


More information about the freebsd-questions mailing list