Ok, so after some trial and error I've finally found the correct
combination of gcc & glibc that works for my device :). Thanks a lot
to everyone who helped me while I was trying to build the toolchain.
The toolchain that works for me has gcc3.3.2 (with the patch for
softfloat) & glibc2.3.2. I can't use gcc3.4 because my Qt code doesn't
compile with version 3.4 of the compiler. I have to use a particular
version of Qt because that's what the device supports.
I've been able to build and test this toolchain using crosstools-0.42,
however when trying to build the same using the sb-toolchains scripts
the build fails :(. The error message I get is pasted below, would
appreciate it if someone could help me get past this problem. Perhaps
something is not correct in my config script, the conf file I am using
is also attached with this email.

I am able to build the toolchain using crosstool within scratchbox on
the host target. After making some modifications to the toolchain dir
generated (eg creating compiler-name, target_setup.sh, making symlinks
for sbox-arm-linux-xxx etc) I am able to create a target for my
toolchain and build code for my device. However I want to use
sb-toolchain to build my toolchain because it will build and install
all the other utilities needed (like gdb,gdbserver, strace etc) and do
the complete post-build configuration. Since I've done all the
configuration manually I don't know yet if I've done everything needed
and if I have done it correctly.

Another small question I have is: Is is possible to have a script that
gets executed everytime a target is selected? For instance I have some
other libraries, not part of the toolchain that I want to have in the
LD_LIBRARY_PATH. I don't want to put this in my .bashrc since the
configuration is specific only to my toolchain. Currently I execute a
script manually after I select my toolchain.

sb-toolchain build error pasted below and my .conf file is attached.

Thanks!
Rohit

sb-toolchain Build error pasted below:

make  -C linuxthreads subdir_install
make[5]: Entering directory
`/home/rohit/sb-toolchains/libc/crosstool-glibc/work/glibc-2.3.2/linuxthreads'
/scratchbox/tools/bin/install -c -m 644
../linuxthreads/sysdeps/pthread/pthread.h
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/include/pthread.h
/scratchbox/tools/bin/install -c -m 644 semaphore.h
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/include/semaphore.h
(echo '/* GNU ld script';\
 echo '   Use the shared library, but some functions are only in';\
 echo '   the static library, so try that secondarily.  */';\
 cat /home/rohit/sb-toolchains/libc/crosstool-glibc/work/build-glibc/format.lds;
\
 echo 'GROUP ( /lib/libpthread.so.0' \
      '/lib/'\
      ')' \
) > 
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libpthread.so.new
mv -f 
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libpthread.so.new
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libpthread.so
/scratchbox/tools/bin/install -c
/home/rohit/sb-toolchains/libc/crosstool-glibc/work/build-glibc/linuxthreads/libpthread.so
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libpthread-0.10.so.new
mv -f 
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libpthread-0.10.so.new
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libpthread-0.10.so
rm -f 
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libpthread.so.0
ln -s libpthread-0.10.so
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libpthread.so.0
/scratchbox/tools/bin/install -c -m 644
/home/rohit/sb-toolchains/libc/crosstool-glibc/work/build-glibc/linuxthreads/libpthread.a
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libpthread.a
: 
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libpthread.a
make[5]: Leaving directory
`/home/rohit/sb-toolchains/libc/crosstool-glibc/work/glibc-2.3.2/linuxthreads'
make  -C resolv subdir_install
make[5]: Entering directory
`/home/rohit/sb-toolchains/libc/crosstool-glibc/work/glibc-2.3.2/resolv'
/scratchbox/tools/bin/install -c -m 644 resolv.h
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/include/resolv.h
/scratchbox/tools/bin/install -c -m 644 netdb.h
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/include/netdb.h
/scratchbox/tools/bin/install -c -m 644
../sysdeps/generic/bits/netdb.h
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/include/bits/netdb.h
/scratchbox/tools/bin/install -c -m 644 arpa/nameser.h
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/include/arpa/nameser.h
/scratchbox/tools/bin/install -c -m 644 arpa/nameser_compat.h
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/include/arpa/nameser_compat.h
/scratchbox/tools/bin/install -c -m 644 sys/bitypes.h
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/include/sys/bitypes.h
/scratchbox/tools/bin/install -c
/home/rohit/sb-toolchains/libc/crosstool-glibc/work/build-glibc/resolv/libresolv.so
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libresolv-2.3.2.so.new
mv -f 
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libresolv-2.3.2.so.new
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libresolv-2.3.2.so
rm -f 
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libresolv.so.2
ln -s libresolv-2.3.2.so
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libresolv.so.2
rm -f 
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libresolv.so.new
/bin/sh ../scripts/rellns-sh
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libresolv.so.2
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libresolv.so.new
mv -f 
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libresolv.so.new
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libresolv.so
/scratchbox/tools/bin/install -c
/home/rohit/sb-toolchains/libc/crosstool-glibc/work/build-glibc/resolv/libnss_dns.so
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libnss_dns-2.3.2.so.new
mv -f 
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libnss_dns-2.3.2.so.new
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libnss_dns-2.3.2.so
rm -f 
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libnss_dns.so.2
ln -s libnss_dns-2.3.2.so
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libnss_dns.so.2
rm -f 
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libnss_dns.so.new
/bin/sh ../scripts/rellns-sh
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libnss_dns.so.2
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libnss_dns.so.new
mv -f 
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libnss_dns.so.new
/scratchbox/compilers/ezx-arm-linux-gcc-3.3.2-glibc-2.3.2-softfloat/arm-linux/lib/libnss_dns.so
make[5]: *** No rule to make target
`/home/rohit/sb-toolchains/libc/crosstool-glibc/work/build-glibc/linuxthreads/libpthread_nonshared.a',
needed by 
`/home/rohit/sb-toolchains/libc/crosstool-glibc/work/build-glibc/resolv/libanl.so'.
 Stop.
make[5]: Leaving directory
`/home/rohit/sb-toolchains/libc/crosstool-glibc/work/glibc-2.3.2/resolv'
make[4]: *** [resolv/subdir_install] Error 2
make[4]: Leaving directory
`/home/rohit/sb-toolchains/libc/crosstool-glibc/work/glibc-2.3.2'
make[3]: *** [install] Error 2
make[3]: Leaving directory
`/home/rohit/sb-toolchains/libc/crosstool-glibc/work/build-glibc'
make[2]: *** [install-work/build-glibc/Makefile] Error 2
make[2]: Leaving directory `/home/rohit/sb-toolchains/libc/crosstool-glibc'
make[1]: *** [dep-../../libc/crosstool-glibc] Error 2
make[1]: Leaving directory `/home/rohit/sb-toolchains/meta/toolchain'
make: *** [build] Error 2



On 3/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Saturday 04 March 2006 20:00, Rohit Chaudhri wrote:
> > Jon,
> > Thanks for the information. With this I was able to get further in
> > building a softfloat toolchain in scratchbox. Before building a custom
> > toolchain I tried building the toolchain as specified by
> > crosstool-armv5b-gcc-3.4.5-glibc-2.3.5.conf. The toolchain was built
> > successfully, I did make a couple of minor changes to the .conf file
> > for the build to succeed:
> > - changed include $(CROSSTOOL_DIR)/gcc-3.4.5-glibc-2.3.5-hdrxxx.dat to
> > include $(CROSSTOOL_DIR)/gcc-3.4.5-glibc-2.3.5.dat, since a .dat file
> > with the original name doesn't exist in crosstool-0.42.tar.gz (this I
> > believe is the latest version since I downloaded this yesterday).
>
> Yes. Dan removed the -hdr portion in the file names in the latest crosstool.
>
> > - changed DPKG_ARCH from armv5b to arm, since dpkg didin't recognize
> > armv5b.
>
> From your other emails, I am guessing that you want an arm toolchain that
> defaults to little endian rather than big endian.  You might try:
> include $(CROSSTOOL_DIR)/arm-softfloat.dat
> include $(CROSSTOOL_DIR)/gcc-3.4.5-glibc-2.3.6.dat
>
> and set ARCH, SUB_ARCH, QEMU_ARCH, DPKG_ARCH all to 'arm'.
>
> >
> > After these changes the toolchain does get built successfully. However
> > some tests in the ./init_tests.sh fail. I am pasting the test results
> > below.
> >
> > I tried building the hello-world package and it builds fine, but
> > doesn't run. This is the error message I get:
> >
> > [sbox-armv5: ~/hello-world] > ./hello
> > Error loading ./hello
> > [sbox-armv5: ~/hello-world] > ldd hello
> >         libc.so.6 => /lib/libc.so.6 (0x00000000)
> >         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)
>
> I think you might have a big endian binary. Do 'file hello' to find out.
>
> >
> > Another runtime problem I run into is related to the sb_gcc_wrapper as
> > shown below:
> >
> > [sbox-armv5: ~/hello-world] > arm-linux-gcc --v
> > sb_gcc_wrapper (arm-linux-gcc): arm-linux-gcc cannot be recognized
> > Maybe you are trying to run a compiler of a wrong architecture?
>
> I'm not sure, but you may want to check in /scratchbox/compilers/bin and the
> wrapper_links script found in there too.
>
> >
> > Don't know why the sb wrapper doesn't recognize any arm-linux-xxx commands.
> > I don't know if the problems mentioned above are related to the
> > changes I made to the .conf file, would appreciate it if someone could
> > confirm this. If so, please tell me what the correct values are for
> > the changes I made as mentined above.
> >
> > I also run into a compile time problem, which seems to be specific to
> > gcc version 3.4   since I donot see this compiler error with gcc 3.3.
> > The error is pasted below:
> >
> > In file included from
> > /scratchbox/compilers/ezx-toolchain//qt-2.3.6/include/qwindowdefs.h:44,
> >                  from
> > /scratchbox/compilers/ezx-toolchain//qt-2.3.6/include/qwidget.h:42,
> >                  from
> > /scratchbox/compilers/ezx-toolchain//qt-2.3.6/include/qapplication.h:42,
> >                  from MyWidget.cpp:14:
> > /scratchbox/compilers/ezx-toolchain//qt-2.3.6/include/qstring.h: In
> > member function `uchar& QChar::cell()':
> > /scratchbox/compilers/ezx-toolchain//qt-2.3.6/include/qstring.h:170:
> > error: cannot bind packed field `((QChar*)this)->QChar::cl' to
> > `uchar&'
> > /scratchbox/compilers/ezx-toolchain//qt-2.3.6/include/qstring.h: In
> > member function `uchar& QChar::row()':
> > /scratchbox/compilers/ezx-toolchain//qt-2.3.6/include/qstring.h:171:
> > error: cannot bind packed field `((QChar*)this)->QChar::rw' to
> > `uchar&'
> >
> > Is there a GCC patch that might fix this problem? I'll also search on
> > the net to see if I can find something.
>
> No idea here.
>
> >
> > I look forward to any helpful responses regarding this. init_tests.sh
> > ouput is pasted below....
> >
> > Thanks,
> > Rohit
> >
> > output from init_tests.sh:
> > [sbox-armv5: ~] > ./sb-toolchains/test_tools/test_scripts/init_tests.sh ARM
> > 1. compiling
> > 2. checking file type
> >     file types        ok
> > 3. stripping binaries
> >     strip             ok
> > 4. testing library dependencies
> >     hello             ok
> >     hello-static      ok
> >     hello c++         ok
> >     hello-static c++  ok
> > 5. running binaries
> >     hello             fail
> >     hello-static      fail
> >     hello c++         fail
> >     hello-static c++  fail
> > [sbox-armv5: ~] >
>
> I think the tool chain you built may have been for arm in big endian, which
> requires qemu-armeb or a target board that is arm big endian.
> _______________________________________________
> Scratchbox-users mailing list
> [email protected]
> http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
>

Attachment: ezx-crosstool-softfloat-arm-gcc-3.3.2-glibc-2.3.2.conf
Description: Binary data

_______________________________________________
Scratchbox-users mailing list
[email protected]
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users

Reply via email to