Mobile/DFBPorting doesn't compile with csl2007q3-51 on Beagleboard/OMAP3530

Hi,

I've successfully used the Mobile/DFBPorting Wiki (http://
wiki.mozilla.org/Mobile/DFBPorting) to port Firefox on a TI/Davinci
platform. Now I'd like to switch to the OMAP world. I've an OMAP 3530
EVM at hand and a Beagleboard (Serial 19080033 Rev. B4).

I've managed to cross-compile all the needed packages with
csl2007q3-51. However, I can't compile Firefox correctly. I get a lot
of errors like:

/opt/omap3evm/toolchain/arm-2007q3/bin/../lib/gcc/arm-none-linux-
gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: ERROR:
jsapi.o: Conflicting definitions of wchar_t
/opt/omap3evm/toolchain/arm-2007q3/bin/../lib/gcc/arm-none-linux-
gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: failed to
merge target specific data of file jsapi.o

There's already a thread on a similar problem at the Debian ARM port:
http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg529736.html

With my Buildroot GCC 4.1.2 on the Davinci board, it worked well.

So I'd like to know if anybody knows a proper way to handle this?

Regards,
Matthieu.

Using EABI? AFAIK mozilla still breaks on EABI due to them hardcoding
hard-FPA.

regards,

Koen

> Hi,

> I've successfully used the Mobile/DFBPorting Wiki (http://
> wiki.mozilla.org/Mobile/DFBPorting) to port Firefox on a TI/Davinci
> platform.

Using EABI? AFAIK mozilla still breaks on EABI due to them hardcoding
hard-FPA.

Well, on my Davinci board, I see:
mpoullet@EmbeddedVM:~/MozillaDFB/mozilla-dfb-src$ file obj-dfb/dist/
bin/firefox-bin
obj-dfb/dist/bin/firefox-bin: ELF 32-bit LSB executable, ARM, version
1 (SYSV), dynamically linked (uses shared libs), not stripped

and the GCC I use says:
mpoullet@EmbeddedVM:~/MozillaDFB/mozilla-dfb-src$ ${CROSS_COMPILE}gcc -
v
Es werden eingebaute Spezifikationen verwendet.
Ziel: arm-linux-gnueabi
Konfiguriert mit: ../.././source/gcc-4.1.2/configure --prefix=/home/
mpoullet/build/archiv/tmp-0-gcc_x86_64 --with-
pkgversion=GCC_by_mpoullet --with-sysroot=/home/mpoullet/build/archiv/
tmp-0-release_uclibc --with-gnu-ld --with-float=soft --with-
cpu=arm926ej-s --with-gmp=/home/mpoullet/build/archiv/tmp-0-gcc_x86_64
--with-mpfr=/home/mpoullet/build/archiv/tmp-0-gcc_x86_64 --enable-
languages=c,c++ --enable-tls --enable-nls --enable-shared --enable-
multilibs --enable-target-optspace --enable-__cxa_atexit --enable-
threads --target=arm-linux-gnueabi
Thread-Modell: posix
gcc-Version 4.1.2

So it seems that it uses EABI...
I've looked a little bit more on this issue and I see that my Davinci
build environment (gcc/uclibc) supports -fshort-wchar, so wchar_t is 2
bytes and not 4 as the csl toolchain expects it on my OMAP system.

Anyway, what are the alternatives to surf the web on a Beagle/Omap
platform?

Regards,
Matthieu.

mpoullet wrote:

> Hi,

> I've successfully used the Mobile/DFBPorting Wiki (http://
> wiki.mozilla.org/Mobile/DFBPorting) to port Firefox on a TI/Davinci
> platform.

Using EABI? AFAIK mozilla still breaks on EABI due to them hardcoding
hard-FPA.

Well, on my Davinci board, I see:
mpoullet@EmbeddedVM:~/MozillaDFB/mozilla-dfb-src$ file obj-dfb/dist/
bin/firefox-bin
obj-dfb/dist/bin/firefox-bin: ELF 32-bit LSB executable, ARM, version
1 (SYSV), dynamically linked (uses shared libs), not stripped

and the GCC I use says:
mpoullet@EmbeddedVM:~/MozillaDFB/mozilla-dfb-src$ ${CROSS_COMPILE}gcc -
v
Es werden eingebaute Spezifikationen verwendet.
Ziel: arm-linux-gnueabi
Konfiguriert mit: ../.././source/gcc-4.1.2/configure --prefix=/home/
mpoullet/build/archiv/tmp-0-gcc_x86_64 --with-
pkgversion=GCC_by_mpoullet --with-sysroot=/home/mpoullet/build/archiv/
tmp-0-release_uclibc --with-gnu-ld --with-float=soft --with-
cpu=arm926ej-s --with-gmp=/home/mpoullet/build/archiv/tmp-0-gcc_x86_64
--with-mpfr=/home/mpoullet/build/archiv/tmp-0-gcc_x86_64 --enable-
languages=c,c++ --enable-tls --enable-nls --enable-shared --enable-
multilibs --enable-target-optspace --enable-__cxa_atexit --enable-
threads --target=arm-linux-gnueabi
Thread-Modell: posix
gcc-Version 4.1.2

So it seems that it uses EABI...

The Mozilla javascript code used to be completely broken on ARM.
They fixed the worst of it about a year ago, but it's still broken
with non-gcc compilers. It has also been known to break with
gcc without -fno-strict-aliasing.

I've looked a little bit more on this issue and I see that my Davinci
build environment (gcc/uclibc) supports -fshort-wchar, so wchar_t is 2
bytes and not 4 as the csl toolchain expects it on my OMAP system.

That could of course explain a thing or two.

Thanks for these explanations, I've tried to put the pieces of this
puzzle together with google, but it's hard to get the big picture...

However, this patch seems to fix my problem:
https://bugzilla.mozilla.org/show_bug.cgi?id=423913
https://bugzilla.mozilla.org/attachment.cgi?id=317321

I don't get these linking errors anymore.

I'll let you know as soon as Mobile/DFBPorting works on OMAP.

Thanks all!
Matthieu.

I've been using webkit based browsers quite happily on all my ARM and
powerpc boards. Webkit is also faster and uses less memory compared to
mozilla based stuff. It's even shipped with QT 4.4 if you swing that
way.

regards,

Koen