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).
- changed DPKG_ARCH from armv5b to arm, since dpkg didin't recognize armv5b.

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)

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?

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.

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: ~] >









On 3/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Saturday 04 March 2006 06:46, Ricardo Kekki wrote:
> > On Fri, 3 Mar 2006, Rohit Chaudhri wrote:
> > > Since installation of foreign toolchains in Scratchbox 1.0.2 is
> > > difficult so I am trying to build a new toolchain based on an existing
> > > configuration file. I need to build a gcc3.3-glibc2.3.2 toolchain for
> > > ARM with software FP support. I started with the file
> > > meta/toolchain/arm-gcc3.3-glibc.conf and set the USE_SOFTFLOAT to
> > > "yes", changed the COMPILER_NAME.
> >
> > I would recommend building softfloat toolchains for arm with gcc-3.4 or
> > later. see http://gcc.gnu.org/gcc-3.4/changes.html. Or you need to fix the
> > gcc build for gcc-3.3 to actually support softfloats.
> >
> > > I believe Scratchbox 0.9.8 had a gcc-glibc toolchain for arm with
> > > software FP support, I tried installing that toolchain in Scratchbox
> > > 1.0.2, but it doesn't show up in sb-menu. Perhaps its not compatible
> > > with the latest sb version any more.
> >
> > The codesourcery based toolchains can be built from the darcs
> > repository. Just use arm-gcc3.4.cs-glibc-sf.conf. I think scratchbox has
> > never provided softfloat toolchains with the gcc-3.3 or older gcc.
>
> Another new option that is available that you might want to try is to get the
> darcs 1.2/sb-toolchain repo and use a crosstool CONFIG. To use this do the
> following:
>
> [sbox-HOST: ~] > darcs get --set-scripts-executable \
> http://scratchbox.org/repos/1.2/sb-toolchains
>
> [sbox-HOST: ~] > wget http://kegel.com/crosstool/crosstool-0.42.tar.gz
> #(or whatever the latest one is).
>
> [sbox-HOST: ~] > tar xzf crosstool-0.42.tar.gz
>
> [sbox-HOST: ~] > cd sb-toolchains
>
> [sbox-HOST: ~/sb-toolchains] > ./import-crosstool.sh ../crosstool-0.42/
>
> This will import the crosstool dat files and patch sets to use with
> sb-toolchains. Use meta/toolchain/crosstool-armv5b-gcc-3.4.5-glibc-2.3.5.conf
> as an example. Then do:
>
> [sbox-HOST: ~/sb-toolchains] > make CONFIG=meta/toolchains/<myconfig> all-sums
> [sbox-HOST: ~/sb-toolchains] > make CONFIG=meta/toolchains/<myconfig>
>
> This will create a toolchain that uses build steps that were ported over from
> crosstool to sb-toolchains and makes use of variables found in the crosstool
> *.dat files and the crosstool patch repository.
>
> Hope this helps.
>
> Jon
>
> _______________________________________________
> Scratchbox-users mailing list
> [email protected]
> http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
>
_______________________________________________
Scratchbox-users mailing list
[email protected]
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users

Reply via email to