Re: !(fun) with tls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i think this is something to do with --with-sysroot.
Try removing the sysroot but i am not sure well sysroot/lib should
contain libc.so

/lib/libc.so.6 is provided by glibc whereas /usr/lib/libc.so is
provided by glibc-devel.

Maybe some one experienced can help you out.

On 6/22/06, NZG <ngustavson@xxxxxxxxxxx> wrote:
On Thursday 22 June 2006 12:55 pm, Niklaus wrote:
> sorry i didn't understand your question. I build on debian and
> everything works fine for me
> Please be more elaborate where it didn't
> find libc.so.6.
I think works, creating extra library simlinks allows the build process to see
them.
i.e.
linking
libc.so -> libc.so.6
Allows the build process to find libc.

My question is, why is this necessary?
libc.so.6 is already a simlink to libc-2.3.2.so
 Why doesn't the compiler recognize libc.so.6 as libc.so? This is the name of
the simlink in the  /lib directory of my target and host, and I don't see any
simlinks to it.

Why is this step required? Should I being doing something "cleaner"

thx,
NZG

 You have to copy the symlinks also cp -pf or do a tar
> of those and then untar. Please copy cross gcc as it may help others .



> On 6/22/06, NZG <ngustavson@xxxxxxxxxxx> wrote:
> > Do you know why it doesn't accept libc.so.6 like standard Debian?
> > Is this a patch to gcc?
> >
> > thx,
> > NZG
> >
> > On Thursday 22 June 2006 11:02 am, you wrote:
> > > no gcc couldn't find libc.
> > > your sysroot directory doesn't have a file label libc.so* and libc.a
> > > in lib or /usr/lib/
> > >
> > > For the taget mips-deb-linux my directories look like this. So you
> > > will have to copy them or softlink them.
> > >
> > > pro@deb:~/crossenv/mips-deb-linux/lib$ ls
> > > ld-2.3.4.so               libcrypt.so.1    libnss_compat-2.3.4.so
> > > libnss_nisplus.so.2  libstdc++.so.6
> > > ld.so.1                   libdl-2.3.4.so   libnss_compat.so.2
> > > libpcprofile.so      libstdc++.so.6.0.3
> > > ldscripts                 libdl.so.2       libnss_dns-2.3.4.so
> > > libpthread-0.10.so   libsupc++.a
> > > libBrokenLocale-2.3.4.so  libgcc_s.so      libnss_dns.so.2
> > > libpthread.so.0      libsupc++.la
> > > libBrokenLocale.so.1      libgcc_s.so.1    libnss_files-2.3.4.so
> > > libresolv-2.3.4.so   libthread_db-1.0.so
> > > libSegFault.so            libiberty.a      libnss_files.so.2
> > > libresolv.so.2       libthread_db.so.1
> > > libanl-2.3.4.so           libm-2.3.4.so    libnss_hesiod-2.3.4.so
> > > librt-2.3.4.so       libutil-2.3.4.so
> > > libanl.so.1               libm.so.6        libnss_hesiod.so.2
> > > librt.so.1           libutil.so.1
> > > libc-2.3.4.so             libmemusage.so   libnss_nis-2.3.4.so
> > > libstdc++.a libc.so.6                 libnsl-2.3.4.so  libnss_nis.so.2
> > >     libstdc++.la libcrypt-2.3.4.so         libnsl.so.1
> > > libnss_nisplus-2.3.4.so  libstdc++.so
> > > pro@deb:~/crossenv/mips-deb-linux/lib$ ls libc*
> > > libc-2.3.4.so  libc.so.6  libcrypt-2.3.4.so  libcrypt.so.1
> > > pro@deb:~/crossenv/mips-deb-linux/lib$ cd ..
> > > pro@deb:~/crossenv/mips-deb-linux$ ls
> > > bin  etc  include  lib  sbin  usr
> > > pro@deb:~/crossenv/mips-deb-linux$ cd usr/lib
> > > pro@deb:~/crossenv/mips-deb-linux/usr/lib$ ls
> > > Mcrt1.o  gcrt1.o             libc.a            libdl.so     libnsl.a
> > >        libnss_nis.so           libresolv.so
> > > Scrt1.o  libBrokenLocale.a   libc.so           libg.a       libnsl.so
> > >        libnss_nisplus.so       librt.a
> > > crt1.o   libBrokenLocale.so  libc_nonshared.a  libieee.a
> > > libnss_compat.so  libpthread.a            librt.so
> > > crti.o   libanl.a            libcrypt.a        libm.a
> > > libnss_dns.so     libpthread.so           libthread_db.so
> > > crtn.o   libanl.so           libcrypt.so       libm.so
> > > libnss_files.so   libpthread_nonshared.a  libutil.a
> > > gconv    libbsd-compat.a     libdl.a           libmcheck.a
> > > libnss_hesiod.so  libresolv.a             libutil.so
> > > pro@deb:~/crossenv/mips-deb-linux/usr/lib$
> > >
> > > On 6/22/06, NZG <ngustavson@xxxxxxxxxxx> wrote:
> > > > On Thursday 22 June 2006 10:17 am, Niklaus wrote:
> > > > > export PATH=$prefix/bin:$PATH
> > > >
> > > > Aha! thx, got past
> > > >
> > > > > make[2]: i486-linux-ar: Command not found
> > > >
> > > > Now I get the
> > > > /home/nathan/workspace-new/SIB2.0-SDK/gcc-3.3.6-SIB//i486-linux/bin/l
> > > >d: cannot find -lc
> > > >
> > > > error, which I'm guessing is happening because the libc it needs is
> > > > not in SEARCH_DIR .
> > > >
> > > > My thinking was that
> > > > --with-sysroot=$SYSROOT \
> > > > should add SYSROOT to binutils SEARCH_DIR, but it doesn't appear to.
> > > > Is there something else I should be doing?
> > > >
> > > > thx,
> > > > NZG
> > > >
> > > > > HOW I"M GOING ABOUT IT:
> > > > >
> > > > > #!/bin/sh
> > > > > SYSROOT=$HOME/workspace-new/SIB2.0-SDK/sysroot/
> > > > > PREFIX=$HOME/workspace-new/SIB2.0-SDK/gcc-3.3.6-SIB/
> > > > >
> > > > > mkdir -p binutils-2.15
> > > > > cd binutils-2.15
> > > > >
> > > > > ../../binutils-2.15/configure \
> > > > > --host=i686-linux \
> > > > > --target=i486-linux \
> > > > > --with-sysroot=$SYSROOT \
> > > > > --prefix=$PREFIX \
> > > > > --with-local-prefix=$SYSROOT \
> > > > > --enable-languages=c,c++,objc \
> > > > > --enable-shared \
> > > > > --enable-_cxz_atexit \
> > > > > --with-system-zlib \
> > > > > --enable-nls \
> > > > > --without-included-gettext \
> > > > > --enable-clocal=gnu \
> > > > > --enable-debug
> > > > >
> > > > > make all
> > > > > make install
> > > > >
> > > > > I'm then building gcc into the same directory with the same flags.
> > > > > It builds but then complains that ld can't find the correct ar.
> > > > >
> > > > > make[2]: i486-linux-ar: Command not found
> > > > > make[2]: *** [libgcc.a] Error 127
> > > > >
> > > > > i486-linux-ar does exist in
> > > > > $(PREFIX)/bin/i486-linux-ar
> > > > >
> > > > > The linker scripts don't seem to know this for some reason though:
> > > > > grep -r SEARCH_DIR .
> > > > > ./elf_i386.x:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
> > > > > SEARCH_DIR("=/usr/lib");
> > > > > ./elf_i386.xbn:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
> > > > > SEARCH_DIR("=/usr/lib");
> > > > > ./elf_i386.xc:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
> > > > > SEARCH_DIR("=/usr/lib");
> > > > > ./elf_i386.xd:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
> > > > > SEARCH_DIR("=/usr/lib");
> > > > > ./elf_i386.xdc:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
> > > > > SEARCH_DIR("=/usr/lib");
> > > > > ./elf_i386.xn:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
> > > > > SEARCH_DIR("=/usr/lib");
> > > > > ./elf_i386.xs:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
> > > > > SEARCH_DIR("=/usr/lib");
> > > > > ./elf_i386.xsc:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
> > > > > SEARCH_DIR("=/usr/lib");
> > > > >
> > > > > Am I missing some vital step or flag?
> > > > >
> > > > > thx,
> > > > > NZG
> > > > >
> > > > > --
> > > > > For unsubscribe information see
> > > > > http://sourceware.org/lists.html#faq


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux