Closed
Bug 989823
Opened 12 years ago
Closed 9 years ago
AddressSanitizer: Cannot compile 32-bit JS shell with Intl enabled
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: decoder, Unassigned)
References
(Blocks 1 open bug)
Details
With Clang r200213 I cannot compile JS shells with 32-bit ASan anymore. I am getting:
clang++ ... /srv/repos/mozilla-central/intl/icu/source/tools/toolutil/toolutil.cpp
In file included from /srv/repos/mozilla-central/intl/icu/source/tools/toolutil/toolutil.cpp:65:
In file included from /srv/repos/mozilla-central/intl/icu/source/i18n/unicode/ucal.h:12:
In file included from /srv/repos/mozilla-central/intl/icu/source/common/unicode/uenum.h:24:
In file included from /srv/repos/mozilla-central/intl/icu/source/common/unicode/strenum.h:14:
In file included from /srv/repos/mozilla-central/intl/icu/source/common/unicode/unistr.h:31:
In file included from /srv/repos/mozilla-central/intl/icu/source/common/unicode/std_string.h:30:
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/string:42:
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/char_traits.h:41:
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/stl_algobase.h:65:
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/stl_pair.h:61:
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/move.h:57:
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/type_traits:257:39: error: use of undeclared identifier '__float128'
struct __is_floating_point_helper<__float128>
^
1 error generated.
*** Failed compilation command follows: ----------------------------------------------------------
/srv/repos/llvm/build/bin/clang++ -m32 -DU_USING_ICU_NAMESPACE=0 -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 -DUCONFIG_NO_LEGACY_CONVERSION -DUCONFIG_NO_TRANSLITERATION -DUCONFIG_NO_REGULAR_EXPRESSIONS -DUCONFIG_NO_BREAK_ITERATION -I/srv/repos/mozilla-central/intl/icu/source/common -I/srv/repos/mozilla-central/intl/icu/source/i18n -ffunction-sections -fdata-sections -D_REENTRANT -DU_HAVE_ELF_H=1 -DU_HAVE_ATOMIC=1 -I/srv/repos/mozilla-central/intl/icu/source/common -I/srv/repos/mozilla-central/intl/icu/source/i18n -DU_BUILD="x86_64-unknown-linux-gnu" -DU_HOST="x86_64-unknown-linux-gnu" -DU_CC="/srv/repos/llvm/build/bin/clang -m32" -DU_CXX="/srv/repos/llvm/build/bin/clang++ -m32" -DU_ATTRIBUTE_DEPRECATED= -DU_TOOLUTIL_IMPLEMENTATION -O3 -O3 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long --std=c++0x -c -DPIC -fPIC -o toolutil.o /srv/repos/mozilla-central/intl/icu/source/tools/toolutil/toolutil.cpp
--- ( rebuild with "make VERBOSE=1 all" to show all parameters ) --------
make[6]: *** [toolutil.o] Error 1
I am using the following build script:
> autoconf2.13
> mkdir objdir
> cd objdir
> LLVM_HOME="/srv/repos/llvm"
> HOST_CC="$LLVM_HOME/build/bin/clang -m32" \
> HOST_CXX="$LLVM_HOME/build/bin/clang++ -m32" \
> CC="$LLVM_HOME/build/bin/clang -m32" \
> CXX="$LLVM_HOME/build/bin/clang++ -m32" \
> AR="ar" \
> CFLAGS="-fsanitize=address" \
> CXXFLAGS="-fsanitize=address" \
> LDFLAGS="-fsanitize=address" \
> ../configure --disable-debug --enable-optimize="-O2 -g" --enable-valgrind --enable-gczeal --enable-address-sanitizer --target=i686-pc-linux-gnu
> make --quiet -j 8
I tried to dig into this and it seems that with the 32 bit build, a lot of CFLAGS are missing that are used in the 64 bit build. So I assume that something goes wrong here due to cross-compilation.
Comment 1•12 years ago
|
||
Why is your compile using 64-bit headers for a 32-bit compile? (I'm pretty sure __float128 is a x86-64-specific type.) I think that's the real problem here. Did clang's sysroot location logic change?
| Reporter | ||
Comment 2•12 years ago
|
||
(In reply to Nathan Froyd (:froydnj) from comment #1)
> Why is your compile using 64-bit headers for a 32-bit compile? (I'm pretty
> sure __float128 is a x86-64-specific type.) I think that's the real problem
> here. Did clang's sysroot location logic change?
I cannot answer that question, but it's still not working. If you want me to run more tests, then I can do that, and I'll be happy to provide any additional information you might need :)
Since there is more difference in the CFLAGS than just the architecture/headers used, I suspect something in our build system is going wrong too.
Flags: needinfo?(nfroyd)
Comment 3•12 years ago
|
||
(In reply to Christian Holler (:decoder) from comment #2)
> (In reply to Nathan Froyd (:froydnj) from comment #1)
> > Why is your compile using 64-bit headers for a 32-bit compile? (I'm pretty
> > sure __float128 is a x86-64-specific type.) I think that's the real problem
> > here. Did clang's sysroot location logic change?
>
> I cannot answer that question, but it's still not working. If you want me to
> run more tests, then I can do that, and I'll be happy to provide any
> additional information you might need :)
>
> Since there is more difference in the CFLAGS than just the
> architecture/headers used, I suspect something in our build system is going
> wrong too.
What version of clang was last working for you?
If there was a last working version of clang, what do the preprocessed .ii files (use -save-temps) look like for the working and non-working versions?
Flags: needinfo?(nfroyd) → needinfo?(choller)
| Reporter | ||
Comment 4•12 years ago
|
||
I've confirmed now that Clang is not the problem: Even the first revision that we were using for ages (r185949) does not build mozilla-central tip anymore, and it shows the same problem as in comment 0. I will try to isolate the commit on our side now that regressed this.
Flags: needinfo?(choller)
Comment 5•9 years ago
|
||
decoder: is this still an issue? Does it still warrant a "critical" severity?
Flags: needinfo?(choller)
| Reporter | ||
Comment 6•9 years ago
|
||
I don't think this is a problem anymore but I don't have the environment here to reproduce this right now. If we hit it again, we should probably just file a new bug.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(choller)
Resolution: --- → WORKSFORME
Updated•8 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•