linking correct libc

Fri May 29 20:39:00 GMT 2009


On Tuesday 26 May 2009 09:02:13 wrote:
> > If it is really an ARM file, you can run again, but setting:
> > LDFLAGS="-L/back/ts/root2/usr/lib/ -v -Wl,--verbose"
> attempt to open /back/ts/root2/usr/lib// succeeded
> opened script file /back/ts/root2/usr/lib//
> opened script file /back/ts/root2/usr/lib//
> attempt to open /lib/ succeeded

Look at that: you've got a in your root2 tree!
- Where does it come from?
- How did you construct your root2 tree?

The cross-gcc expects to find its in its sysroot directory (which
it finds automagically). If it finds a elsewhere, then all its
internal logic is then completelt broken. Remove that file, and see if
it fixes it.

Usually, to build a "rootfs", you'd do something like (replace with adequate
values, obviously!, and iterate for all your packages):
  cd my-package-1
  ./configure --prefix=/usr --build=i686-pc-linux-gnu   \
              --host=arm-unknown-linux-gnueabi          \
              --option1 --option2 [...]
  make install DESTDIR=/back/ts/root2
  cd ..

Once you're done, your root2 will contain all the files installed by your
packages, and only those. It should *not* contain files from the toolchain
(from the syysroot, notably). So it is not suited for direct usage.

You would then use the script provided with crosstool-NG that is specifically
used to complete your root-dir structure with the necessary files:
  arm-unknown-linux-gnueabi-populate -v    \
      -s /back/ts/root2                    \
      -d /back/ts/root2-full

Then, root2-full can be used as input to build file system images for your
target (eg. mksquashfs, mkfs.jffs2and so on...), or can be used as an
NFS-root. Of course, your root2 will still only contain the files installed
by your packages.

This way, you achieve two main goals:
- you don't modify the sysroot, so your toolchain can be reused to build
  other things;
- your root-dir contains only the files installed by the packages, and can
  thus be considered "pure".

Yann E. MORIN.

PS. Be patient, if no one answers, it can be for at least two reasons:
- no one has the answer, in which case saying so is just a waste
  of bandwidth;
- someone might have the answer, but is not reading his/her mails
  due to other duties.

Remember, this is a volunteer-based effort, and you can't expect anyone
to abide by your desires. Repeating the same problem again and again
will surely not help.


|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  X  AGAINST      |  \e/  There is no  |
| | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

For unsubscribe information see

More information about the crossgcc mailing list