jemalloc.o:jemalloc.c:function malloc_rtree_new: error: undefined reference to 'ffs'

RESOLVED FIXED in mozilla32

Status

defect
RESOLVED FIXED
6 years ago
Last year

People

(Reporter: nalexander, Assigned: glandium)

Tracking

(Depends on 1 bug)

unspecified
mozilla32
x86
macOS
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

I am unable to build Fennec with NDK toolchain r8e and r9 on Mac OS X.  I will try r8c shortly.

I see some old concern about ffs being available on Android (http://cphacker0901.wordpress.com/1900/09/25/build-alsa-with-androids-tool-chain/).

Log:

11:01.45 libmozglue_android.a.desc
11:01.52 libmozglue.so
11:01.60 Executing: /usr/local/Cellar/android-ndk/r8e/toolchains/x86-4.7/prebuilt/darwin-x86/bin/i686-linux-android-g++ -idirafter /usr/local/Cellar/android-ndk/r8e/platforms/android-9/arch-x86/usr/include -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Werror=int-to-pointer-cast -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -mandroid -fno-short-enums -fno-exceptions -Wno-psabi -isystem ../../../build/stlport/stlport -isystem /usr/local/Cellar/android-ndk/r8e/sources/cxx-stl/system/include -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pipe -DNDEBUG -DTRIMMED -fno-omit-frame-pointer -funwind-tables -fPIC -shared -Wl,-z,defs -Wl,-h,libmozglue.so -o libmozglue.so /Users/nalexander/Mozilla/gecko/objdir-x86/mozglue/build/tmp2KXkM4.list -mandroid -L/usr/local/Cellar/android-ndk/r8e/platforms/android-9/arch-x86/usr/lib -Wl,-rpath-link=/usr/local/Cellar/android-ndk/r8e/platforms/android-9/arch-x86/usr/lib --sysroot=/usr/local/Cellar/android-ndk/r8e/platforms/android-9/arch-x86 -llog -Wl,--allow-shlib-undefined -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -Wl,-rpath-link,/Users/nalexander/Mozilla/gecko/objdir-x86/dist/bin -Wl,-rpath-link,/usr/local/lib -Wl,--wrap=PR_GetEnv,--wrap=PR_SetEnv -Wl,--wrap=fork,--wrap=pthread_atfork,--wrap=raise -Wl,--wrap=memccpy,--wrap=memchr,--wrap=memrchr,--wrap=memcmp,--wrap=memcpy,--wrap=memmove,--wrap=memset,--wrap=memmem,--wrap=memswap,--wrap=index,--wrap=strchr,--wrap=strrchr,--wrap=strlen,--wrap=strcmp,--wrap=strcpy,--wrap=strcat,--wrap=strcasecmp,--wrap=strncasecmp,--wrap=strstr,--wrap=strcasestr,--wrap=strtok,--wrap=strtok_r,--wrap=strerror,--wrap=strerror_r,--wrap=strnlen,--wrap=strncat,--wrap=strncmp,--wrap=strncpy,--wrap=strlcat,--wrap=strlcpy,--wrap=strcspn,--wrap=strpbrk,--wrap=strsep,--wrap=strspn,--wrap=strcoll,--wrap=strxfrm -Wl,--wrap=malloc,--wrap=calloc,--wrap=valloc,--wrap=free,--wrap=realloc,--wrap=memalign -Wl,--wrap=__builtin_new,--wrap=__builtin_vec_new,--wrap=__builtin_delete,--wrap=__builtin_vec_delete -Wl,--wrap=strdup,--wrap=strndup -Wl,--wrap=vasprintf,--wrap=asprintf -Wl,--wrap=posix_memalign,--wrap=malloc_usable_size -Wl,--wrap=_Znwj,--wrap=_Znaj,--wrap=_ZdlPv,--wrap=_ZdaPv -Wl,--wrap=_ZnwjRKSt9nothrow_t,--wrap=_ZnajRKSt9nothrow_t,--wrap=_ZdlPvRKSt9nothrow_t,--wrap=_ZdaPvRKSt9nothrow_t -lz -Wl,--wrap=pthread_atfork ../../build/stlport/libstlport_static.a -static-libstdc++
11:01.60 /Users/nalexander/Mozilla/gecko/objdir-x86/mozglue/build/tmp2KXkM4.list:
11:01.60     INPUT("BionicGlue.o")
11:01.60     INPUT("SSE.o")
11:01.60     INPUT("../../memory/build/jemalloc_config.o")
11:01.60     INPUT("../../memory/build/mozmemory_wrap.o")
11:01.60     INPUT("../../memory/mozjemalloc/jemalloc.o")
11:01.60     INPUT("../linker/CustomElf.o")
11:01.60     INPUT("../linker/ElfLoader.o")
11:01.60     INPUT("../linker/Mappable.o")
11:01.60     INPUT("../linker/SeekableZStream.o")
11:01.60     INPUT("../linker/Zip.o")
11:01.60     INPUT("../android/APKOpen.o")
11:01.60     INPUT("../android/nsGeckoUtils.o")
11:01.60     INPUT("../android/NSSBridge.o")
11:01.60     INPUT("../android/SQLiteBridge.o")
11:01.60     INPUT("../../mfbt/Compression.o")
11:01.60     INPUT("../../mfbt/Decimal.o")
11:01.60     INPUT("../../mfbt/FloatingPoint.o")
11:01.60     INPUT("../../mfbt/HashFunctions.o")
11:01.60     INPUT("../../mfbt/Poison.o")
11:01.60     INPUT("../../mfbt/SHA1.o")
11:01.60     INPUT("../../mfbt/bignum-dtoa.o")
11:01.60     INPUT("../../mfbt/bignum.o")
11:01.60     INPUT("../../mfbt/cached-powers.o")
11:01.60     INPUT("../../mfbt/diy-fp.o")
11:01.60     INPUT("../../mfbt/double-conversion.o")
11:01.60     INPUT("../../mfbt/fast-dtoa.o")
11:01.60     INPUT("../../mfbt/fixed-dtoa.o")
11:01.60     INPUT("../../mfbt/strtod.o")
11:01.60
11:01.60 /Users/nalexander/Mozilla/gecko/objdir-x86/mozglue/build/../../memory/mozjemalloc/jemalloc.o:jemalloc.c:function malloc_rtree_new: error: undefined reference to 'ffs'
11:01.60 /Users/nalexander/Mozilla/gecko/objdir-x86/mozglue/build/../../memory/mozjemalloc/jemalloc.o:jemalloc.c:function arena_run_reg_alloc: error: undefined reference to 'ffs'
11:01.60 /Users/nalexander/Mozilla/gecko/objdir-x86/mozglue/build/../../memory/mozjemalloc/jemalloc.o:jemalloc.c:function arena_run_reg_alloc: error: undefined reference to 'ffs'
11:01.60 /Users/nalexander/Mozilla/gecko/objdir-x86/mozglue/build/../../memory/mozjemalloc/jemalloc.o:jemalloc.c:function arena_malloc_small: error: undefined reference to 'ffs'
11:01.60 collect2: error: ld returned 1 exit status
11:01.60 make[5]: *** [libmozglue.so] Error 1
11:01.60 make[4]: *** [mozglue/build/libs] Error 2
11:01.60 make[3]: *** [libs] Error 2
11:01.60 make[2]: *** [default] Error 2
11:01.61 make[1]: *** [realbuild] Error 2
11:01.61 make: *** [build] Error 2
11:01.64 599 compiler warnings present.
My mozconfig:

# Build Fennec
ac_add_options --enable-application=mobile/android

# Android
ac_add_options --target=i386-linux-android

ac_add_options --with-android-ndk="$ANDROID_NDK_HOME/r8e"
ac_add_options --with-android-sdk="$ANDROID_HOME/platforms/android-16"

ac_add_options --disable-optimize
ac_add_options --disable-crashreporter
ac_add_options --disable-debug-symbols

mk_add_options MOZ_OBJDIR=./objdir-x86
mk_add_options AUTOCLOBBER=1

ac_add_options --disable-unified-compilation

glandium: do you have any suggestions?
Flags: needinfo?(mh+mozilla)
Maybe ffs got removed in the android-16 sdk?  I see it in the r8e / android-14 directory on Linux.

What does find $ANDROID_NDK_HOME/r8e -name '*.h' | xargs fgrep 'ffs(' |grep arch-arm say for you?
Flags: needinfo?(nalexander)
(In reply to Nick Alexander :nalexander from comment #0)
> I am unable to build Fennec with NDK toolchain r8e and r9 on Mac OS X.  I
> will try r8c shortly.

Sorry, I forgot the most important part -- this is building for x86 devices.  (I have --target=i386-linux-android set; I've also tried both NDKs with i686-linux-android.)
nfroyd:

chocho:local nalexander$ find $ANDROID_NDK_HOME/r8e -name '*.h' | xargs fgrep 'ffs(' | grep arch-arm
/usr/local/Cellar/android-ndk/r8e/platforms/android-14/arch-arm/usr/include/asm-generic/bitops/ffz.h:#define ffz(x) __ffs(~(x))
/usr/local/Cellar/android-ndk/r8e/platforms/android-14/arch-arm/usr/include/strings.h:int	 ffs(int);
/usr/local/Cellar/android-ndk/r8e/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/ffz.h:#define ffz(x) __ffs(~(x))
/usr/local/Cellar/android-ndk/r8e/platforms/android-3/arch-arm/usr/include/strings.h:int	 ffs(int);
/usr/local/Cellar/android-ndk/r8e/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/ffz.h:#define ffz(x) __ffs(~(x))
/usr/local/Cellar/android-ndk/r8e/platforms/android-4/arch-arm/usr/include/strings.h:int	 ffs(int);
/usr/local/Cellar/android-ndk/r8e/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/ffz.h:#define ffz(x) __ffs(~(x))
/usr/local/Cellar/android-ndk/r8e/platforms/android-5/arch-arm/usr/include/strings.h:int	 ffs(int);
/usr/local/Cellar/android-ndk/r8e/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/ffz.h:#define ffz(x) __ffs(~(x))
/usr/local/Cellar/android-ndk/r8e/platforms/android-8/arch-arm/usr/include/strings.h:int	 ffs(int);
/usr/local/Cellar/android-ndk/r8e/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/ffz.h:#define ffz(x) __ffs(~(x))
/usr/local/Cellar/android-ndk/r8e/platforms/android-9/arch-arm/usr/include/strings.h:int	 ffs(int);
chocho:local nalexander$ find $ANDROID_NDK_HOME/r8e -name '*.h' | xargs fgrep 'ffs(' | grep arch-x86
/usr/local/Cellar/android-ndk/r8e/platforms/android-14/arch-x86/usr/include/asm-generic/bitops/ffz.h:#define ffz(x) __ffs(~(x))
/usr/local/Cellar/android-ndk/r8e/platforms/android-14/arch-x86/usr/include/strings.h:int	 ffs(int);
/usr/local/Cellar/android-ndk/r8e/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/ffz.h:#define ffz(x) __ffs(~(x))
/usr/local/Cellar/android-ndk/r8e/platforms/android-9/arch-x86/usr/include/strings.h:int	 ffs(int);
Flags: needinfo?(nalexander)
/me applauds nalexander for displaying adaptability

Ah, so maybe ffs got removed in android-16?  I wonder if there's anything equivalent in strings.h now.
So, strings.h appears fine.  However,

/usr/local/Cellar/android-ndk/r8e-darwin-x86_64/platforms/android-9/arch-arm/usr/lib/libc.a

includes

ffs.o:
00000000 t $a
00000000 T ffs

But

/usr/local/Cellar/android-ndk/r8e-darwin-x86_64/platforms/android-9/arch-x86/usr/lib/libc.a

doesn't appear to include ffs at all.
Caused by:
  ac_add_options --disable-optimize
Flags: needinfo?(mh+mozilla)
Duplicate of this bug: 1018665
Note that on bug 1018665 I see it even building for ARM.
(In reply to Eric Rescorla (:ekr) from comment #9)
> Note that on bug 1018665 I see it even building for ARM.

The problem is the android toolchain being broken for non-optimized builds using some builtins. It's not really related to arm vs. not.
(In reply to Mike Hommey [:glandium] from comment #10)
> (In reply to Eric Rescorla (:ekr) from comment #9)
> > Note that on bug 1018665 I see it even building for ARM.
> 
> The problem is the android toolchain being broken for non-optimized builds
> using some builtins. 

Hmm.... It seems like this could be fixed by deactivating this change
for non-optimized builds, then, at least until the android toolchain
changes. No?


> It's not really related to arm vs. not.

OK, I was just filling in the details.
This just tripped up :bbrittain too.

It seems like we should be able to build B2G in any reasonable build
configuration and non-optimized is one such configuration, so I'd
like to get this fixed. Any reason we shouldn't turn off this flag
for non-optimized builds?
Flags: needinfo?(mh+mozilla)
Try applying this in memory/jemalloc/src:
https://github.com/jemalloc/jemalloc/commit/9c3a10fdf6baa5ddb042b6adbef1ff1b3c613ce3.patch
Flags: needinfo?(mh+mozilla)
This patch does not apply.

patching file configure.ac
Hunk #1 succeeded at 1165 (offset 56 lines).
Hunk #2 succeeded at 1180 (offset 56 lines).
patching file include/jemalloc/internal/arena.h
Hunk #1 succeeded at 815 (offset -155 lines).
patching file include/jemalloc/internal/bitmap.h
patching file include/jemalloc/internal/jemalloc_internal.h.in
Hunk #1 succeeded at 280 (offset 65 lines).
can't find file to patch at input line 123
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/include/jemalloc/internal/jemalloc_internal_decls.h b/include/jemalloc/internal/jemalloc_internal_decls.h
|index 7775ab3..fa59040 100644
|--- a/include/jemalloc/internal/jemalloc_internal_decls.h
|+++ b/include/jemalloc/internal/jemalloc_internal_decls.h
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
patching file include/jemalloc/internal/jemalloc_internal_defs.h.in
Hunk #1 succeeded at 158 (offset 5 lines).
patching file include/jemalloc/internal/util.h
Hunk #1 succeeded at 109 with fuzz 2.
Hunk #2 succeeded at 117 (offset -1 lines).
Hunk #3 FAILED at 196.
1 out of 3 hunks FAILED -- saving rejects to file include/jemalloc/internal/util.h.rej
patching file src/arena.c
Hunk #1 succeeded at 2383 (offset -100 lines).
patching file src/rtree.c
The conflict in include/jemalloc/internal/util.h doesn't matter, it's for code that wasn't there in the version we have in-tree.
As for include/jemalloc/internal/jemalloc_internal_decls.h, on the File to patch prompt, enter include/jemalloc/internal/jemalloc_internal.h.in.
Duplicate of this bug: 1018946
Forget it, that patch only helps halfway. The configure logic needs to be inverted to work.
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Should try both patches, or just the most recent patch in c19?
Flags: needinfo?(mh+mozilla)
(In reply to Eric Rescorla (:ekr) from comment #20)
> Should try both patches, or just the most recent patch in c19?

You need both. One is a plain cherry pick of the upstream patch, and the other an additional patch I sent upstream.
Flags: needinfo?(mh+mozilla)
(In reply to Mike Hommey [:glandium] from comment #21)
> and the other an additional patch I sent upstream.

Already made it upstream:
https://github.com/jemalloc/jemalloc/commit/1a3eafd1b045163f27e4a5acf01280edfe28c309
:)
Regrettably, this seems not to fix the problem:
celt_pitch_xcorr_arm-gnu.o
In file included from src/include/jemalloc/internal/jemalloc_internal.h:568:0,
                 from /home/ekr/dev/gecko-dev/memory/jemalloc/src/src/base.c:2:
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:123:4: error: #error Both JEMALLOC_INTERNAL_FFSL && JEMALLOC_INTERNAL_FFS should have been defined by configure
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h: In function 'jemalloc_ffsl':
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:130:9: warning: implicit declaration of function 'JEMALLOC_INTERNAL_FFSL' [-Wimplicit-function-declaration]
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h: In function 'jemalloc_ffs':
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:137:9: warning: implicit declaration of function 'JEMALLOC_INTERNAL_FFS' [-Wimplicit-function-declaration]
In file included from src/include/jemalloc/internal/jemalloc_internal.h:568:0,
                 from /home/ekr/dev/gecko-dev/memory/jemalloc/src/src/arena.c:2:
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:123:4: error: #error Both JEMALLOC_INTERNAL_FFSL && JEMALLOC_INTERNAL_FFS should have been defined by configure
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h: In function 'jemalloc_ffsl':
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:130:9: warning: implicit declaration of function 'JEMALLOC_INTERNAL_FFSL' [-Wimplicit-function-declaration]
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h: In function 'jemalloc_ffs':
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:137:9: warning: implicit declaration of function 'JEMALLOC_INTERNAL_FFS' [-Wimplicit-function-declaration]
In file included from src/include/jemalloc/internal/jemalloc_internal.h:568:0,
                 from /home/ekr/dev/gecko-dev/memory/jemalloc/src/src/bitmap.c:2:
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:123:4: error: #error Both JEMALLOC_INTERNAL_FFSL && JEMALLOC_INTERNAL_FFS should have been defined by configure
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h: In function 'jemalloc_ffsl':
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:130:9: warning: implicit declaration of function 'JEMALLOC_INTERNAL_FFSL' [-Wimplicit-function-declaration]
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h: In function 'jemalloc_ffs':
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:137:9: warning: implicit declaration of function 'JEMALLOC_INTERNAL_FFS' [-Wimplicit-function-declaration]
In file included from src/include/jemalloc/internal/jemalloc_internal.h:568:0,
                 from /home/ekr/dev/gecko-dev/memory/jemalloc/src/src/atomic.c:2:
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:123:4: error: #error Both JEMALLOC_INTERNAL_FFSL && JEMALLOC_INTERNAL_FFS should have been defined by configure
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h: In function 'jemalloc_ffsl':
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:130:9: warning: implicit declaration of function 'JEMALLOC_INTERNAL_FFSL' [-Wimplicit-function-declaration]
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h: In function 'jemalloc_ffs':
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:137:9: warning: implicit declaration of function 'JEMALLOC_INTERNAL_FFS' [-Wimplicit-function-declaration]
In file included from src/include/jemalloc/internal/jemalloc_internal.h:568:0,
                 from /home/ekr/dev/gecko-dev/memory/jemalloc/src/src/chunk_dss.c:2:
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:123:4: error: #error Both JEMALLOC_INTERNAL_FFSL && JEMALLOC_INTERNAL_FFS should have been defined by confi
ure
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h: In function 'jemalloc_ffsl'://home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:130:9: warning: implicit dec
aration of function 'JEMALLOC_INTERNAL_FFSL' [-Wimplicit-function-declaration]
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:130:9: warning: implicit declaration of function 'JEMALLOC_INTERNAL_FFSL' [-Wimplicit-function-declaration]
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h: In function 'jemalloc_ffs':
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:137:9: warning: implicit declaration of function 'JEMALLOC_INTERNAL_FFS' [-Wimplicit-function-declaration]
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h: In function 'jemalloc_ffs':
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:137:9: warning: implicit declaration of function 'JEMALLOC_INTERNAL_FFS' [-Wimplicit-function-declaration]
In file included from src/include/jemalloc/internal/jemalloc_internal.h:568:0,
                 from /home/ekr/dev/gecko-dev/memory/jemalloc/src/src/chunk_mmap.c:2:
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:123:4: error: #error Both JEMALLOC_INTERNAL_FFSL && JEMALLOC_INTERNAL_FFS should have been defined by configure
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h: In function 'jemalloc_ffsl':
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:130:9: warning: implicit declaration of function 'JEMALLOC_INTERNAL_FFSL' [-Wimplicit-function-declaration]
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h: In function 'jemalloc_ffs':
/home/ekr/dev/gecko-dev/memory/jemalloc/src/include/jemalloc/internal/util.h:137:9: warning: implicit declaration of function 'JEMALLOC_INTERNAL_FFS' [-Wimplicit-function-declaration]
nsDependentString.o
nsDependentSubstring.o

In the directory  /home/ekr/dev/gecko-dev/objdir-flame-debug/memory/jemalloc
The following command failed to execute properly:
/usr/bin/ccache /home/ekr/dev/B2G/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc -o base.o -c -I../../dist/system_wrappers -include /home/ekr/dev/gecko-dev/config/gcc_hidden.h -Dabort=moz_abort -DNO_NSPR_10_SUPPORT -I/home/ekr/dev/gecko-dev/memory/jemalloc -I. -I/home/ekr/dev/gecko-dev/memory/jemalloc/src/include -Isrc/include -I../../dist/include -I/home/ekr/dev/gecko-dev/objdir-flame-debug/dist/include/nspr -I/home/ekr/dev/gecko-dev/objdir-flame-debug/dist/include/nss -I/home/ekr/dev/gecko-dev/objdir-flame-debug/dist/include -I/home/ekr/dev/gecko-dev/modules/zlib/src -fPIC -DANDROID -isystem /home/ekr/dev/B2G/bionic/libc/arch-arm/include -isystem /home/ekr/dev/B2G/bionic/libc/include/ -isystem /home/ekr/dev/B2G/bionic/libc/kernel/common -isystem /home/ekr/dev/B2G/bionic/libc/kernel/arch-arm -isystem /home/ekr/dev/B2G/bionic/libm/include -I/home/ekr/dev/B2G/system -I/home/ekr/dev/B2G/system/core/include -isystem /home/ekr/dev/B2G/bionic -I/home/ekr/dev/B2G/hardware/libhardware/include -I/home/ekr/dev/B2G/external/valgrind/fxos-include -I/home/ekr/dev/B2G/frameworks/native/include -I/home/ekr/dev/B2G/frameworks/av/include -I/home/ekr/dev/B2G/frameworks/av/include/media -I/home/ekr/dev/B2G/frameworks/av/include/camera -I/home/ekr/dev/B2G/frameworks/native/include/media/openmax -I/home/ekr/dev/B2G/frameworks/av/media/libstagefright/include -I/home/ekr/dev/B2G/external/dbus -I/home/ekr/dev/B2G/external/bluetooth/bluez/lib -include ../../mozilla-config.h -DMOZILLA_CLIENT -MD -MP -MF .deps/base.o.pp -DANDROID -isystem /home/ekr/dev/B2G/bionic/libc/arch-arm/include -isystem /home/ekr/dev/B2G/bionic/libc/include/ -isystem /home/ekr/dev/B2G/bionic/libc/kernel/common -isystem /home/ekr/dev/B2G/bionic/libc/kernel/arch-arm -isystem /home/ekr/dev/B2G/bionic/libm/include -I/home/ekr/dev/B2G/system -I/home/ekr/dev/B2G/system/core/include -isystem /home/ekr/dev/B2G/bionic -I/home/ekr/dev/B2G/hardware/libhardware/include -I/home/ekr/dev/B2G/external/valgrind/fxos-include -I/home/ekr/dev/B2G/frameworks/native/include -I/home/ekr/dev/B2G/frameworks/av/include -I/home/ekr/dev/B2G/frameworks/av/include/media -I/home/ekr/dev/B2G/frameworks/av/include/camera -I/home/ekr/dev/B2G/frameworks/native/include/media/openmax -I/home/ekr/dev/B2G/frameworks/av/media/libstagefright/include -I/home/ekr/dev/B2G/external/dbus -I/home/ekr/dev/B2G/external/bluetooth/bluez/lib -Wall -Wpointer-arith -Wdeclaration-after-statement -Werror=return-type -Werror=int-to-pointer-cast -Wtype-limits -Wempty-body -Wsign-compare -Wno-unused -mandroid -fno-short-enums -fno-exceptions -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=softfp -mno-unaligned-access -std=gnu99 -fgnu89-inline -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-math-errno -pipe -DDEBUG -DTRACING -g -funwind-tables -std=gnu99 /home/ekr/dev/gecko-dev/memory/jemalloc/src/src/base.c
Comment on attachment 8433834 [details] [diff] [review]
Try to use __builtin_ffsl if ffsl is unavailable

These patches look fine to me. I think the error in #c23 is because configure isn't being re-executed - those defines should always be present (if configure runs :) based on my understanding of these patches. ekr, can you confirm that a clobber fixes it?
Attachment #8433834 - Flags: review?(mshal) → review+
Flags: needinfo?(ekr)
Attachment #8433835 - Flags: review?(mshal) → review+
Depends on: 1021347
Flags: needinfo?(ekr)
It seems that ti still block fennec for x86 build with "ac_add_options --disable-optimize" in mozconfig.

And, build for arm is ok with same build environment.

My build environment:
Android NDK, r8e

Ubuntu 12.04 64-bit

mozconfig:
ac_add_options --enable-debug
ac_add_options --disable-optimize

# Add the correct paths here:
ac_add_options --with-android-ndk="$HOME/android-ndk-r8e"
ac_add_options --with-android-sdk="$HOME/adt-bundle-linux-x86_64/sdk/platforms/android-21"

# android options
ac_add_options --enable-application=mobile/android
ac_add_options --target=i386-linux-android

ac_add_options --with-ccache
ac_add_options --enable-debug-symbols

mk_add_options MOZ_OBJDIR=./x86-objdir-droid
Flags: needinfo?(mh+mozilla)
Flags: needinfo?(mh+mozilla)
Blocks: 1104634
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.