Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with building for arm.

49 views
Skip to first unread message

Andrzej

unread,
Dec 21, 2011, 6:53:14 AM12/21/11
to
Hello all.

I've got a problem with compiling firefox for arm (armv5te) architecture.

My .mozconfig file :

CROSS_COMPILE=1
INSTALLDIR=/opt/toolchain/arm-2007q3.qt_4.6.2_glib.2.31.0/arm-none-linux-gnueabi/
PREFIX=/opt/toolchain/arm-2007q3.qt_4.6.2_glib.2.31.0/arm-none-linux-gnueabi/
PKG_CONFIG_PATH=/opt/toolchain/arm-2007q3.qt_4.6.2_glib.2.31.0/arm-none-linux-gnueabi/lib/pkgconfig/
#LIBIDL_CONFIG=$PREFIX/bin/libIDL-config-2
#HOST_LIBIDL_CONFIG=/usr/local/bin/libIDL-config-2
FT2_CFLAGS="-I/opt/toolchain/arm-2007q3.qt_4.6.2_glib.2.31.0/arm-none-linux-gnueabi/include/freetype2/ -lfreetype2"

mk_add_options MOZ_CO_PROJECT=browser
#mk_add_options MOZILLA_OFFICIAL=1

ac_add_options --prefix=$INSTALLDIR
ac_add_options --target=arm-none-linux-gnueabi
ac_add_options --x-includes=$PREFIX/include/X11/
ac_add_options --x-libraries=$PREFIX/lib
ac_add_options --with-x
#ac_add_options --disable-xul

ac_add_options --with-freetype-prefix=$PREFIX

ac_add_options --without-libIDL
#ac_add_options --enable-mathml
#ac_add_options --enable-svg
#ac_add_options --enable-extensions
#ac_add_options --enable-crypto
#ac_add_options --enable-logrefcnt
ac_add_options --disable-gtktest
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --enable-optimize
ac_add_options --without-system-nspr
#ac_add_options --without-system-zlib
#ac_add_options --without-system-jpeg
#ac_add_options --without-system-png
ac_add_options --without-system-mng
#ac_add_options --enable-crypto #comment to disable PSM/SSL support
ac_add_options --disable-accessibility
ac_add_options --with-ft-prefix=$PREFIX/lib
ac_add_options --with-pthreads
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --with-gtk-prefix=$PREFIX/lib
ac_add_options --enable-application=browser
ac_add_options --enable-canvas
ac_add_options --disable-mailnews
ac_add_options --disable-ldap
ac_add_options --enable-pango
ac_add_options --disable-composer
ac_add_options --enable-image-decoders
ac_add_options --enable-image-encoders
ac_add_options --enable-svg
ac_add_options --enable-svg-renderer=cairo
ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
#ac_add_options --enable-optimize="-O2"
#ac_add_options --enable-optimize="-Os "
ac_add_options --disable-logging
ac_add_options --enable-strip
ac_add_options --disable-necko-wifi
#ac_add_options --with-libIDL-prefix=$PREFIX\lbi
#ac_add_options --with-glib-prefix=$PREFIX\lib


Everything goes ok until that error:

(...)
/usr/bin/python2.7 /home/freescale/web/mozilla-release/config/pythonpath.py -I../../config /home/freescale/web/mozilla-release/config/expandlibs_exec.py --verbose --uselist --
arm-none-linux-gnueabi-g++ -o plugin-container -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-invalid-offsetof
-Wno-variadic-macros -Werror=return-type -Wno-long-long -fno-strict-aliasing -pthread -ffunction-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED -lgdk-x11-2.0 -lgtk-x11-2.0 -lgdk_pixbuf-2.0 -lnotify
-g -Os -freorder-blocks -finline-limit=50 -fomit-frame-pointer MozillaRuntimeMain.o -lpthread -Wl,-rpath-link,/home/freescale/web/mozilla-release/obj-i686-pc-linux-gnu/dist/bin
-Wl,-rpath-link,/opt/toolchain/arm-2007q3.qt_4.6.2_glib.2.31.0/arm-none-linux-gnueabi//lib -L../../dist/bin -L../../dist/lib -L/home/freescale/web/mozilla-release/obj-i686-pc-linux-gnu/dist/bin
-lxpcom -lmozalloc -lxul -L/home/freescale/web/mozilla-release/obj-i686-pc-linux-gnu/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -Wl,--whole-archive ../../dist/lib/libjemalloc.a
-Wl,--no-whole-archive -rdynamic -Wl,--version-script -Wl,/home/freescale/web/mozilla-release/build/unix/gnu-ld-scripts/jemalloc-standalone-linkage-version-script -ldl
Executing: arm-none-linux-gnueabi-g++ -o plugin-container -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor
-Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long -fno-strict-aliasing -pthread -ffunction-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED -lgdk-x11-2.0 -lgtk-x11-2.0
-lgdk_pixbuf-2.0 -lnotify -g -Os -freorder-blocks -finline-limit=50 -fomit-frame-pointer /home/freescale/web/mozilla-release/obj-i686-pc-linux-gnu/ipc/app/tmpVaptEr.list -lpthread
-Wl,-rpath-link,/home/freescale/web/mozilla-release/obj-i686-pc-linux-gnu/dist/bin -Wl,-rpath-link,/opt/toolchain/arm-2007q3.qt_4.6.2_glib.2.31.0/arm-none-linux-gnueabi//lib -L../../dist/bin
-L../../dist/lib -L/home/freescale/web/mozilla-release/obj-i686-pc-linux-gnu/dist/bin -lxpcom -lmozalloc -lxul -L/home/freescale/web/mozilla-release/obj-i686-pc-linux-gnu/dist/lib -lplds4 -lplc4
-lnspr4 -lpthread -ldl -Wl,--whole-archive ../../dist/lib/libjemalloc.a -Wl,--no-whole-archive -rdynamic -Wl,--version-script
-Wl,/home/freescale/web/mozilla-release/build/unix/gnu-ld-scripts/jemalloc-standalone-linkage-version-script -ldl
/home/freescale/web/mozilla-release/obj-i686-pc-linux-gnu/ipc/app/tmpVaptEr.list:
INPUT(MozillaRuntimeMain.o)

../../dist/bin/libxul.so: undefined reference to `q12'
../../dist/bin/libxul.so: undefined reference to `q13'
../../dist/bin/libxul.so: undefined reference to `q15'
../../dist/bin/libxul.so: undefined reference to `d30'
../../dist/bin/libxul.so: undefined reference to `Q0'
../../dist/bin/libxul.so: undefined reference to `d26'
../../dist/bin/libxul.so: undefined reference to `q11'
../../dist/bin/libxul.so: undefined reference to `q3'
../../dist/bin/libxul.so: undefined reference to `q14'
../../dist/bin/libxul.so: undefined reference to `q5'
collect2: ld returned 1 exit status


I discovered that all missed variables are defined into liborc. So - I gave -lorc-0.4 for above compilation command and tried if this help. It doesn't help - same error.

Any help? Suggestion?

Regards
Andrzej



Justin Dolske

unread,
Dec 21, 2011, 4:01:47 PM12/21/11
to
On 12/21/11 3:53 AM, Andrzej wrote:
> Hello all.
>
> I've got a problem with compiling firefox for arm (armv5te) architecture.
>
> My .mozconfig file :

...is full of all kinds of useless crud.

Delete that mozconfig, and start with a minimal mozconfig (such as
listed on https://wiki.mozilla.org/Mobile/Fennec/Android).

Don't muck with mozconfig until you've got a functional build. And,
generally, even not after that.

Justin

Robert Kaiser

unread,
Dec 21, 2011, 6:36:07 PM12/21/11
to
Andrzej schrieb:
> I've got a problem with compiling firefox for arm (armv5te) architecture.

AFAIK, we require armv7 at minimum right now, and armv6 is planned for
some time in the future.

Robert Kaiser

Andrzej

unread,
Dec 22, 2011, 3:51:47 AM12/22/11
to
W dniu 2011-12-21 22:01, Justin Dolske pisze:
Ok, thnx for hint.

I've deleted older one and i've created new mozconfig with these options:

----------------
PREFIX=/opt/omap3evm/toolchain/arm-2007q3.qt_4.6.2_glib.2.31.0/arm-none-linux-gnueabi/
mk_add_options MOZ_MAKE_FLAGS="-j8 -s"
mk_add_options MOZ_OBJDIR=./objdir-linux

ac_add_options --prefix=$INSTALLDIR
ac_add_options --target=arm-none-linux-gnueabi
ac_add_options --with-ccache
ac_add_options --disable-necko-wifi

#without this - cannot find freetype includes for target
ac_add_options --with-freetype-prefix=$PREFIX
----------------

and then:

make -f client.mk build

I still have errors:

(...)
Executing: /usr/bin/ccache arm-none-linux-gnueabi-g++ -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-invalid-offsetof
-Wno-variadic-macros -Werror=return-type -pedantic -Wno-long-long -fno-strict-aliasing -pthread -ffunction-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED -lgdk-x11-2.0 -lgtk-x11-2.0
-lgdk_pixbuf-2.0 -lnotify -g -Os -freorder-blocks -finline-limit=50 -fomit-frame-pointer -o TestRacingServiceManager /home/freescale/web/mozilla-release/xpcom/tests/tmprQLjwi.list -lpthread
-Wl,-rpath-link,/home/freescale/web/mozilla-release/dist/bin -Wl,-rpath-link,/lib -lorc-0.4 -L../../dist/bin -L../../dist/lib -L/home/freescale/web/mozilla-release/dist/bin -lxpcom -lmozalloc -lxul
../../dist/lib/libxpcomglue_s.a -L/home/freescale/web/mozilla-release/dist/bin -lxpcom -lmozalloc -L/home/freescale/web/mozilla-release/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl
../../dist/lib/libjs_static.a -ldl
/home/freescale/web/mozilla-release/xpcom/tests/tmprQLjwi.list:
INPUT(TestRacingServiceManager.o)

/usr/bin/python2.7 ../../config/pythonpath.py -I../../config ../../config/expandlibs_exec.py --verbose --uselist -- /usr/bin/ccache arm-none-linux-gnueabi-g++ -fno-rtti -fno-exceptions -Wall
-Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -pedantic -Wno-long-long -fno-strict-aliasing
-pthread -ffunction-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED -lgdk-x11-2.0 -lgtk-x11-2.0 -lgdk_pixbuf-2.0 -lnotify -g -Os -freorder-blocks -finline-limit=50 -fomit-frame-pointer -o
TestRegistrationOrder TestRegistrationOrder.o -lpthread -Wl,-rpath-link,/home/freescale/web/mozilla-release/dist/bin -Wl,-rpath-link,/lib -lorc-0.4 -L../../dist/bin -L../../dist/lib
-L/home/freescale/web/mozilla-release/dist/bin -lxpcom -lmozalloc -lxul /home/freescale/web/mozilla-release/dist/lib/libxpcomglue_s.a -L/home/freescale/web/mozilla-release/dist/bin -lxpcom -lmozalloc
-L/home/freescale/web/mozilla-release/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl /home/freescale/web/mozilla-release/dist/lib/libjs_static.a -ldl
Executing: /usr/bin/ccache arm-none-linux-gnueabi-g++ -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-invalid-offsetof
-Wno-variadic-macros -Werror=return-type -pedantic -Wno-long-long -fno-strict-aliasing -pthread -ffunction-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED -lgdk-x11-2.0 -lgtk-x11-2.0
-lgdk_pixbuf-2.0 -lnotify -g -Os -freorder-blocks -finline-limit=50 -fomit-frame-pointer -o TestRegistrationOrder /home/freescale/web/mozilla-release/xpcom/tests/tmpHlIZDi.list -lpthread
-Wl,-rpath-link,/home/freescale/web/mozilla-release/dist/bin -Wl,-rpath-link,/lib -lorc-0.4 -L../../dist/bin -L../../dist/lib -L/home/freescale/web/mozilla-release/dist/bin -lxpcom -lmozalloc -lxul
../../dist/lib/libxpcomglue_s.a -L/home/freescale/web/mozilla-release/dist/bin -lxpcom -lmozalloc -L/home/freescale/web/mozilla-release/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl
../../dist/lib/libjs_static.a -ldl
/home/freescale/web/mozilla-release/xpcom/tests/tmpHlIZDi.list:
INPUT(TestRegistrationOrder.o)

../../dist/bin/libxul.so: undefined reference to `q12'
../../dist/bin/libxul.so: undefined reference to `q13'
../../dist/bin/libxul.so: undefined reference to `q15'
../../dist/bin/libxul.so: undefined reference to `d30'
../../dist/bin/libxul.so: undefined reference to `Q0'
../../dist/bin/libxul.so: undefined reference to `d26'
../../dist/bin/libxul.so: undefined reference to `q11'
../../dist/bin/libxul.so: undefined reference to `q3'
../../dist/bin/libxul.so: undefined reference to `q14'
../../dist/bin/libxul.so: undefined reference to `q5'
collect2: ld returned 1 exit status
make[4]: *** [TestCallTemplates] Error 1
make[4]: *** Waiting for unfinished jobs....
../../dist/bin/libxul.so: undefined reference to `q12'
../../dist/bin/libxul.so: undefined reference to `q13'
../../dist/bin/libxul.so: undefined reference to `q15'
../../dist/bin/libxul.so: undefined reference to `d30'
../../dist/bin/libxul.so: undefined reference to `Q0'
../../dist/bin/libxul.so: undefined reference to `d26'
../../dist/bin/libxul.so: undefined reference to `q11'
../../dist/bin/libxul.so: undefined reference to `q3'
../../dist/bin/libxul.so: undefined reference to `q14'
../../dist/bin/libxul.so: undefined reference to `q5'
collect2: ld returned 1 exit status
make[4]: *** [nsIFileEnumerator] Error 1
../../dist/bin/libxul.so: undefined reference to `q12'
../../dist/bin/libxul.so: undefined reference to `q13'
../../dist/bin/libxul.so: undefined reference to `q15'
../../dist/bin/libxul.so: undefined reference to `d30'
../../dist/bin/libxul.so: undefined reference to `Q0'
../../dist/bin/libxul.so: undefined reference to `d26'
../../dist/bin/libxul.so: undefined reference to `q11'
../../dist/bin/libxul.so: undefined reference to `q3'
../../dist/bin/libxul.so: undefined reference to `q14'
../../dist/bin/libxul.so: undefined reference to `q5'
collect2: ld returned 1 exit status
make[4]: *** [TestRacingServiceManager] Error 1
../../dist/bin/libxul.so: undefined reference to `q12'
../../dist/bin/libxul.so: undefined reference to `q13'
../../dist/bin/libxul.so: undefined reference to `q15'
../../dist/bin/libxul.so: undefined reference to `d30'
../../dist/bin/libxul.so: undefined reference to `Q0'
../../dist/bin/libxul.so: undefined reference to `d26'
../../dist/bin/libxul.so: undefined reference to `q11'
../../dist/bin/libxul.so: undefined reference to `q3'
../../dist/bin/libxul.so: undefined reference to `q14'
../../dist/bin/libxul.so: undefined reference to `q5'
collect2: ld returned 1 exit status
make[4]: *** [TestINIParser] Error 1
../../dist/bin/libxul.so: undefined reference to `q12'
../../dist/bin/libxul.so: undefined reference to `q13'
../../dist/bin/libxul.so: undefined reference to `q15'
../../dist/bin/libxul.so: undefined reference to `d30'
../../dist/bin/libxul.so: undefined reference to `Q0'
../../dist/bin/libxul.so: undefined reference to `d26'
../../dist/bin/libxul.so: undefined reference to `q11'
../../dist/bin/libxul.so: undefined reference to `q3'
../../dist/bin/libxul.so: undefined reference to `q14'
../../dist/bin/libxul.so: undefined reference to `q5'
collect2: ld returned 1 exit status
make[4]: *** [TestRegistrationOrder] Error 1
make[4]: Leaving directory `/home/freescale/web/mozilla-release/xpcom/tests'
make[3]: *** [tools] Error 2
make[3]: Leaving directory `/home/freescale/web/mozilla-release/xpcom'
make[2]: *** [tools_tier_platform] Error 2
make[2]: Leaving directory `/home/freescale/web/mozilla-release'
make[1]: *** [tier_platform] Error 2
make[1]: Leaving directory `/home/freescale/web/mozilla-release'
make: *** [default] Error 2

Strange, because "-lorc-0.4" is passed to the compiler and by the compiler is seen..

Regards
Andrzej

Andrzej

unread,
Dec 22, 2011, 4:00:43 AM12/22/11
to
W dniu 2011-12-22 00:36, Robert Kaiser pisze:
> Andrzej schrieb:
>> I've got a problem with compiling firefox for arm (armv5te) architecture.
>
> AFAIK, we require armv7 at minimum right now, and armv6 is planned for some time in the future.

Thanks for the explanation. Could you tell me which version of firefox will run on armv5? It would be great, if it will support multimedia via html5...

Sincerely
Andrzej

Mike Hommey

unread,
Dec 22, 2011, 5:11:39 AM12/22/11
to Andrzej, dev-b...@lists.mozilla.org
If you build desktop Firefox, all versions build on armv4t and more,
though you may need to disable parts of the JIT.

Mike

Mike Hommey

unread,
Dec 22, 2011, 5:15:44 AM12/22/11
to Andrzej, dev-b...@lists.mozilla.org
On Thu, Dec 22, 2011 at 09:51:47AM +0100, Andrzej wrote:
> ../../dist/bin/libxul.so: undefined reference to `q12'
> ../../dist/bin/libxul.so: undefined reference to `q13'
> ../../dist/bin/libxul.so: undefined reference to `q15'
> ../../dist/bin/libxul.so: undefined reference to `d30'
> ../../dist/bin/libxul.so: undefined reference to `Q0'
> ../../dist/bin/libxul.so: undefined reference to `d26'
> ../../dist/bin/libxul.so: undefined reference to `q11'
> ../../dist/bin/libxul.so: undefined reference to `q3'
> ../../dist/bin/libxul.so: undefined reference to `q14'
> ../../dist/bin/libxul.so: undefined reference to `q5'

If you are building mobile firefox, the build defaults to targetting
armv7, and that enables neon code. These errors may come from there.

You can try --with-arch=toolchain-default --with-cpu=toolchain-default
--with-float-abi=toolchain-default --with-soft-float=toolchain-default
--with-thumb=toolchain-default --with-thumb-interwork=toolchain-default.

Mike

Robert Kaiser

unread,
Dec 22, 2011, 9:30:18 AM12/22/11
to
Mike Hommey schrieb:
> If you build desktop Firefox, all versions build on armv4t and more,

Ah, didn't know that built at all.

> though you may need to disable parts of the JIT.

Yes, what I heard we only have JIT for armv7+

Robert Kaiser

Mike Hommey

unread,
Dec 22, 2011, 9:55:33 AM12/22/11
to Robert Kaiser, dev-b...@lists.mozilla.org
When nanojit was the only assembler, it supported armv4t+. IIRC, the
assembler we now use supports armv5+ (or maybe it's v6+) but ifdefs
are borked and it actually only supports armv7+

Mike

Andrzej

unread,
Jan 3, 2012, 8:07:09 AM1/3/12
to
W dniu 2011-12-22 11:15, Mike Hommey pisze:
I've tried that - no progress..

But...

I figured out, that configure file contains something like this:

*:arm*)
if test -n "$GNU_AS" ; then
VPX_AS=$AS
VPX_ASFLAGS="-march=armv7-a -mfpu=neon"
VPX_DASH_C_FLAG="-c"
VPX_AS_CONVERSION='$(PERL) $(topsrcdir)/media/libvpx/build/make/ads2gas.pl'
VPX_ASM_SUFFIX="$ASM_SUFFIX"
VPX_ARM_ASM=1
fi

So - i've compiled VPX outside of mozilla sources with options for armv5te: "./configure --target=armv5te-linux-gcc --target=arm-none-linux-gnueabi"
I fixed some variables info config/autoconf.mk and recompiled mozilla.

For now i've got only that error:

/usr/bin/ccache arm-none-linux-gnueabi-g++ -o MozillaRuntimeMain.o -c -fvisibility=hidden -DOSTYPE=\"Linux\" -DOSARCH=Linux -DEXCLUDE_SKIA_DEPENDENCIES -DCHROMIUM_MOZILLA_BUILD -DOS_LINUX=1
-DOS_POSIX=1 -I../../toolkit/xre -I../../xpcom/base -I../../ipc/chromium/src -I../../ipc/glue -I../../ipc/ipdl/_ipdlheaders -I. -I. -I../../dist/include -I../../dist/include/nsprpub
-I/home/freescale/web/mozilla-release-v8/dist/include/nspr -I/home/freescale/web/mozilla-release-v8/dist/include/nss -fPIC -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual
-Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long -fno-strict-aliasing -pthread -ffunction-sections -fdata-sections
-pipe -DNDEBUG -DTRIMMED -g -Os -freorder-blocks -finline-limit=50 -fomit-frame-pointer -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/MozillaRuntimeMain.pp
/home/freescale/web/mozilla-release-v8/ipc/app/MozillaRuntimeMain.cpp
/usr/bin/python2.6 ../../config/pythonpath.py -I../../config ../../config/expandlibs_exec.py --uselist -- /usr/bin/ccache arm-none-linux-gnueabi-g++ -o plugin-container -fno-rtti -fno-exceptions
-Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long -fno-strict-aliasing
-pthread -ffunction-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED -g -Os -freorder-blocks -finline-limit=50 -fomit-frame-pointer MozillaRuntimeMain.o -lpthread
-Wl,-rpath-link,/home/freescale/web/mozilla-release-v8/dist/bin -Wl,-rpath-link,/lib -L../../dist/bin -L../../dist/lib -L/home/freescale/web/mozilla-release-v8/dist/bin -lxpcom -lmozalloc -lxul
-L/home/freescale/web/mozilla-release-v8/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -Wl,--whole-archive ../../dist/lib/libjemalloc.a -Wl,--no-whole-archive -rdynamic -Wl,--version-script
-Wl,../../build/unix/gnu-ld-scripts/jemalloc-standalone-linkage-version-script -ldl
../../dist/bin/libxul.so: undefined reference to `Q0'

Andrzej
0 new messages