[uClibc] Toolchain procedure questions...

Michael O'Brien mob at mbedthis.com
Mon Jul 5 17:09:27 UTC 2004


Wonderful !

As a newcomer to uClibc, I would appreciate some well layered
documentation. 

I would add one more use-case:

I'd like to build uClibc without chroot if at all possible. I've managed
to get it configured and it works well and uClinux operates this way
also.

The issue is that if you have a large build tree or a complex
development environment it can become less efficient to be copying
source into and out of a chroot tree.


Michael O'Brien
Mbedthis Software
http://www.mbedthis.com
 
On Mon, 2004-07-05 at 08:51, Nick Jennings wrote:
> Hi all, I have read several threads from people who have had trouble
> getting a grasp on the uClibc toolchain proceedure. The documentation is
> non-existent, and what is written about it just points people to the
> "auto-magical" build environments which take care of the details for you.
> I've seen some hostility in regards to people who have made comments about
> the lack of documentation, and before I become another target, I'd like to
> at least attempt to figure this out once and for all and write some real
> documentation on the subject. Even if everything is "taken care of" with
> the toolchain and/or buildroot tarballs, it does not mean people do not
> need to know how to do it by hand.
> 
> 
> For example. I have no net connection where I am living now. I am
> travelling and just have my laptop and a USB key. I go to the internet
> cafe's and download all the code and documentation I think I'm going to
> need and so therefore the Makefiles which try to download all the source
> aren't going to work for me.
> 
> 
> The other reason the pre-build environments, or automated build scripts
> aren't going to work for me is I want to understand fully what's going on-
> it's more of a research project than a pragmatic "this needs to get done"
> project. I'm pretty fuzzy when it comes to the details of this process and
> would like to become a bit more fluent in my understanding.
> I've tried to study the toolchains makefiles, but I'm no expert with the
> whole process so I can only get bits and pieces that I actually understand
> so far. I appreciate any help, and i've kept track of what process I've
> gone through already. (It took a lot of trial and error to get even this
> far). Below is as far as I've gotten.
> 
> 
> To try to get some clarification first, let me outline my understand of
> what needs to be done. Hopefully this will help to point me in the right
> direction and save me some headache if I am mistaken.
> 
> 
> 1. Build uClib with the native compiler and libraries on the system.
> 2. Build gcc-3.3.3 with the LD_LIBRARY_PATH set to the uClibc libraries.
> 3. Build binutils with the uClibc libraries *AND* the newly compiled gcc
>     binary I just built against uClibc (this is where things break as shown
>     below)
> 4. Build busybox in the same what I build binutils.
> 5. chroot into the environment with these newly compiled uclibc based
>     binaries.
> 
> 
> 
> I know this is wrong, and even possibly naive :) ... but it's my best
> guess so far. This is my first attempt at this, although I have used
> uClibc in the past, but that was with the old wrapper method. Thanks in
> advance for any help, and the more I figure out, and further I get, the
> better I'll be able to write some real documentation and it could possibly
> be included in the uClibc distfiles once complete.
> Here's my documented attempt so far:
> 
> 
> ------------------------------------
> 
> *) built uClibc (0.9.26) with the default debian config (the only config
>  that worked for me).
>   (installed into /usr/i386-linux-uclibc)
> 
>   NOTE: The symlinks in i386-linux-uclibc/lib/ seem to point to
>   /usr/i386-linux-uclibc/lib/ no matter where PREFIX specified to install.
> 
> 
> *) built gcc (3.3.3) trying to link with uClibc libraries with the following
>  configure parameters (scavenged from the toolchain makefile):
> 
>    $ ../gcc-3.3.3/configure \
> --with-local-prefix=/home/builder/toolchain/usr/i386-linux-uclibc/include/ \
> --prefix=/home/builder/toolchain/usr/ --disable-nls --disable-shared \
> --enable-languages=c --with-gnu-ld \
> --includedir=/home/builder/toolchain/usr/i386-linux-uclibc/include/ \
> --disable-__cxa_atexit --enable-target-optspace
> 
>    $ make LD_LIBRARY_PATH="/usr/i386-linux-uclib/lib"
> 
>    $ make install
> 
>  but ldd'ing the gcc binary (~/toolchain/usr/bin/gcc) shows:
> 
>    $ ldd gcc
>        linux-gate.so.1 =>  (0xffffe000)
>        libc.so.6 => /lib/tls/libc.so.6 (0x40029000)
>        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> 
> 
> *) built binutils (2.14) with the same configure parameters I used for gcc.
>  but during the build I get the following failure:
> 
> checking whether build environment is sane... sleep:
> /usr/i386-linux-uclibc/lib/libpthread.so.0: no version information
> available (required by /lib/tls/librt.so.1)sleep:
> /usr/i386-linux-uclibc/lib/libpthread.so.0: no version information
> available (required by /lib/tls/librt.so.1)sleep:
> /usr/i386-linux-uclibc/lib/libpthread.so.0: no version information
> available (required by /lib/tls/librt.so.1)sleep:
> /usr/i386-linux-uclibc/lib/libpthread.so.0: no version information
> available (required by /lib/tls/librt.so.1)sleep: relocation error:
> /lib/tls/librt.so.1:
> symbol__pthread_clock_settime, version GLIBC_PRIVATE not defined in file
> libpthread.so.0 with link time referencels:
> /usr/i386-linux-uclibc/lib/libpthread.so.0: no version information
> available (required by /lib/tls/librt.so.1)ls:
> /usr/i386-linux-uclibc/lib/libpthread.so.0: no version information
> available (required by /lib/tls/librt.so.1)ls:
> /usr/i386-linux-uclibc/lib/libpthread.so.0: no version information
> available (required by /lib/tls/librt.so.1)ls:
> /usr/i386-linux-uclibc/lib/libpthread.so.0: no version information
> available (required by /lib/tls/librt.so.1)ls: relocation error:
> /lib/tls/librt.so.1: symbol __pthread_clock_settime,
> version GLIBC_PRIVATE not defined in file libpthread.so.0 with link time
> referenceconfigure: error: ls -t appears to fail.  Make sure there is not
> a brokenalias in your environment
> configure: error: newly created file is older than distributed files!
> Check your system clock
> make: *** [configure-opcodes] Error 1
> [builder at localhost binutils-toolchain-build]$
> 
> 
> 
> 
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://uclibc.org/mailman/listinfo/uclibc
-- 
Michael O'Brien
Mbedthis Software
mob at mbedthis.com
http://www.mbedthis.com
(425) 890-1590




More information about the uClibc mailing list