Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 374327 - www-client/firefox-5.0-r2 build fail on arm platform
Summary: www-client/firefox-5.0-r2 build fail on arm platform
Status: RESOLVED DUPLICATE of bug 362237
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-07 10:34 UTC by Yixun Lan
Modified: 2011-08-06 16:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
the full build log (build.log,39.07 KB, text/plain)
2011-07-08 03:01 UTC, Yixun Lan
Details
the full config.log (config.log,59.73 KB, text/plain)
2011-07-10 02:28 UTC, Yixun Lan
Details
patch for arm hardfloat toolchain (firefox-5.0-hardfloat.patch,5.23 KB, text/plain)
2011-07-10 14:36 UTC, Yixun Lan
Details
patch for ebuild (firefox-5.0-ebuild.patch,790 bytes, patch)
2011-07-11 04:38 UTC, Yixun Lan
Details | Diff
hardfloat support patch (firefox-5.0-hardfloat.patch,5.49 KB, patch)
2011-07-11 04:39 UTC, Yixun Lan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yixun Lan archtester gentoo-dev 2011-07-07 10:34:10 UTC
when come to configure, it failt to check return size of int pointer
sizeof(int *), actual value should 4, but see follow it return 0

checking for conic... checking for valid optimization flags... yes
checking size of int *... 0
configure: error: Unexpected pointer size


file of configure

  cat > conftest.$ac_ext <<EOF
#line 21079 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(int *));
  exit(0);
}
EOF
if { (eval echo configure:21090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_int_p=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_int_p=0
fi
                                      

Reproducible: Always

Steps to Reproduce:
1.emerge =www-client/firefox-5.0-r2
2.
3.



app-shells/bash:          4.2_p10
dev-lang/python:          2.7.2, 3.2
dev-util/ccache:          3.1.5
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1
sys-devel/gcc:            4.5.2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r3
Repositories: gentoo pandaboard enlightenment-niifaq
Installed sets: 
ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -mfpu=neon -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard"
CHOST="armv7a-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -mfpu=neon -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard"
DISTDIR="/mnt/data/panda/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://sabayon/ ftp://sabayon/ http://mirrors.163.com/gentoo http://ftp.twaren.net/Linux/Gentoo http://mirrors.xmu.edu.cn/gentoo http://mirror.averse.net/pub/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US zh zh_CN"
MAKEOPTS="-j4 -l4"
PKGDIR="/mnt/data/panda/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/mnt/data/panda/portage"
PORTDIR_OVERLAY="/var/lib/layman/pandaboard /var/lib/layman/enlightenment-niifaq"
SYNC="rsync://sabayon/gentoo-portage"
Portage 2.2.0_alpha43_p2 (!../usr/portage/profiles/default/linux/arm/10.0, gcc-4.5.2, glibc-2.13-r3, 2.6.38.4 armv7l)
=================================================================
System uname: Linux-2.6.38.4-armv7l-ARMv7_Processor_rev_2_-v7l-with-gentoo-2.0.3
Timestamp of tree: Wed, 06 Jul 2011 12:15:01 +0000
ccache version 3.1.5 [disabled]
USE="X acl arm berkdb bzip2 cli cracklib crypt cups cxx fortran gdbm gpm iconv ipv6 jpeg modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl png pppd python readline session ssl sysfs tcpd unicode xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US zh zh_CN" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev omapfb dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Yixun Lan archtester gentoo-dev 2011-07-07 10:37:20 UTC
I'm trying to add echo " actual size of intp ${ac_cv_sizeof_int_p}"
 before follow line:
 ac_cv_sizeof_int_p=`cat conftestval`

but quite wired, neither it print this line nor it print message "configure: failed program was:" , this is "if"! shouldn't it run into "yes" or "no"??
Comment 2 Yixun Lan archtester gentoo-dev 2011-07-08 03:01:58 UTC
Created attachment 279401 [details]
the full build log
Comment 3 Yixun Lan archtester gentoo-dev 2011-07-08 03:06:07 UTC
checking for wget... checking for wget... wget
wget
checking for conic... checking for valid optimization flags... yes
checking size of int *... 0
configure: error: Unexpected pointer size
*** Fix above errors and then restart with               "make -f client.mk build"
make[2]: *** [configure] Error 1
make[2]: Leaving directory `/var/tmp/portage/www-client/firefox-5.0-r2/work/mozilla-release'
make[1]: *** [obj-armv7l-unknown-linux-gnueabi/Makefile] Error 2
make[1]: Leaving directory `/var/tmp/portage/www-client/firefox-5.0-r2/work/mozilla-release'
make: *** [build] Error 2
emake failed
 ^[[31;01m*^[[0m ERROR: www-client/firefox-5.0-r2 failed (compile phase):
 ^[[31;01m*^[[0m   emake failed


Notice that, it try to invoke armv7l-unknown-linux-gnueabi
but in my system should be armv7a-hardfloat-linux-gnueabi, why harded toolchain?
Comment 4 Yixun Lan archtester gentoo-dev 2011-07-08 07:30:50 UTC
This follow lines doesn't make sense, I've already add -mfpu=neon

checking host system type... armv7l-unknown-linux-gnueabi
checking target system type... armv7l-unknown-linux-gnueabi
checking build system type... armv7l-unknown-linux-gnueabi


checking for ARM NEON support in compiler... no
Comment 5 Yixun Lan archtester gentoo-dev 2011-07-10 02:28:20 UTC
Created attachment 279561 [details]
the full config.log

configure:21090: armv7a-hardfloat-linux-gnueabi-gcc -o conftest  -pipe -mfpu=neon -march=armv7-a -mtune=cortex-a9 -fno-strict-aliasing -pthread -march=armv7-a -marm -mfloat-abi=softfp   -lpthread -Wl,-O1 conftest.c -ldl  1>&5
configure: In function 'main':
configure:21084:11: warning: incompatible implicit declaration of built-in function 'exit'
/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.2/../../../../armv7a-hardfloat-linux-gnueabi/bin/ld: error: conftest uses VFP register arguments, /var/tmp/portage/www-client/firefox-5.0-r2/temp/ccZgb4lB.o does not
/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.2/../../../../armv7a-hardfloat-linux-gnueabi/bin/ld: failed to merge target specific data of file /var/tmp/portage/www-client/firefox-5.0-r2/temp/ccZgb4lB.o
collect2: ld returned 1 exit status
configure: failed program was:
#line 21079 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(int *));
  exit(0);
}
Comment 6 Yixun Lan archtester gentoo-dev 2011-07-10 02:33:10 UTC
I'm set "-mfpu=neon -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard" in make.conf, but it changed to "-mfloat-abi=softfp", I think it have problem with -mfpu=neon. Is it possible to compile firefox with hardfloat abi?
Comment 7 Yixun Lan archtester gentoo-dev 2011-07-10 14:36:19 UTC
Created attachment 279629 [details]
patch for arm hardfloat toolchain

firefox hard-coded with softfp, this patch will make it work with hardfloat toolchain
Comment 8 Yixun Lan archtester gentoo-dev 2011-07-11 04:37:04 UTC
here is upstream bug about this, they do provide a patch to fix this problem. I've tried, it works fine.. Can you guys look into this? and apply those patches. following provided patches are my slightly modified version

https://bugzilla.mozilla.org/show_bug.cgi?id=632915
Comment 9 Yixun Lan archtester gentoo-dev 2011-07-11 04:38:24 UTC
Created attachment 279709 [details, diff]
patch for ebuild

this patch make it apply on condition (ARCH == arm && use hardfloat toolchain)
Comment 10 Yixun Lan archtester gentoo-dev 2011-07-11 04:39:11 UTC
Created attachment 279711 [details, diff]
hardfloat support patch
Comment 11 Raúl Porcel (RETIRED) gentoo-dev 2011-08-06 16:15:37 UTC

*** This bug has been marked as a duplicate of bug 362237 ***