linker error: undefined reference to _dl_global_scope_alloc@GLIBC_2.1

Premal Mishra premal.mishra at gmail.com
Fri Apr 14 07:21:42 UTC 2006


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?

Regards
Premal.








On 4/14/06, Kris Kennaway <kris at obsecurity.org> wrote:
> On Fri, Apr 14, 2006 at 02:34:03AM +0530, Premal Mishra wrote:
> > Hi ,
> >
> > Am gettin a linker error:
> >
> > in /compat/linux/lib/libc.so.6: undefined reference to
> > _dl_global_scope_alloc at GLIBC_2.1
> >
> > Also, there were many other similar listimgs with suffixes @GLIBC_2.2,
> > @GLIBC_2.0
> >
> > Which library conatins these missing definitions!!!
>
> What are you trying to do?  I'm guessing you're trying to link FreeBSD
> code to the linux libc, which is impossible.
>
> Kris
>
>
>


More information about the freebsd-questions mailing list