Update static analysis builds to clang 3.9

RESOLVED FIXED in Firefox 57

Status

Firefox Build System
General
RESOLVED FIXED
a year ago
3 months ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

unspecified
mozilla57
Dependency tree / graph

Firefox Tracking Flags

(firefox57 fixed)

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(3 attachments)

(Assignee)

Description

a year ago
Despite bug 1331957 and bug 1331012, we still have static analysis builds using clang 3.8 in the tree: static-analysis-linux64-st-an/opt and static-analysis-linux64-st-an/debug.

Not only that, but they're using an old clang 3.8, that comes with libstdc++ 4.8. Even building a clang 3.8 from the current build-clang doesn't yield that (it then comes with libstdc++ 4.9), and doing static analysis builds with that freshly built clang 3.8 fails.

And more interestingly, it fails with the same error when using clang 3.9... so we might as well figure out why it fails and update to 3.9.

The error is the following:
Executing: /usr/bin/ccache ../../../clang/bin/clang++ -std=gnu++11 -Qunused-arguments -I/home/worker/workspace/build/src/clang/include -fPIC -static-libstdc++ -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wnon-virtual-dtor -std=c++11 -fcolor-diagnostics -O3 -DNDEBUG -fno-exceptions -fno-rtti -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAVE_NEW_ASTMATCHER_NAMES -DHAS_ACCEPTS_IGNORINGPARENIMPCASTS -fno-rtti -fno-exceptions -fno-omit-frame-pointer -Werror -fPIC -shared -Wl,-h,libclang-plugin.so -o libclang-plugin.so /home/worker/workspace/build/src/obj-firefox/build/clang-plugin/tmpRTK1nh.list -L/home/worker/workspace/build/src/clang/lib -lclangASTMatchers -Wl,-rpath-link,/home/worker/workspace/build/src/obj-firefox/dist/bin -Wl,-rpath-link,/usr/local/lib -ldl
/home/worker/workspace/build/src/obj-firefox/build/clang-plugin/tmpRTK1nh.list:
    INPUT("Unified_cpp_build_clang-plugin0.o")
    INPUT("Unified_cpp_build_clang-plugin1.o")
    INPUT("../unix/stdc++compat/stdc++compat.o")
/home/worker/workspace/build/src/clang/lib/libstdc++.a(functexcept.o): In function `std::__throw_out_of_range_fmt(char const*, ...)':
/home/worker/workspace/build/gcc-objdir/x86_64-unknown-linux-gnu/libstdc++-v3/src/c++11/../../../../../gcc-4.9.4/libstdc++-v3/src/c++11/functexcept.cc:91: multiple definition of `std::__throw_out_of_range_fmt(char const*, ...)'
../unix/stdc++compat/stdc++compat.o:/home/worker/workspace/build/src/build/unix/stdc++compat/stdc++compat.cpp:41: first defined here
/home/worker/workspace/build/src/clang/lib/libstdc++.a(eh_aux_runtime.o): In function `__cxa_throw_bad_array_new_length':
/home/worker/workspace/build/gcc-objdir/x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/../../../../gcc-4.9.4/libstdc++-v3/libsupc++/eh_aux_runtime.cc:42: multiple definition of `__cxa_throw_bad_array_new_length'
../unix/stdc++compat/stdc++compat.o:/home/worker/workspace/build/src/build/unix/stdc++compat/stdc++compat.cpp:62: first defined here
clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)
/home/worker/workspace/build/src/config/rules.mk:783: recipe for target 'libclang-plugin.so' failed
gmake[5]: *** [libclang-plugin.so] Error 1

Nathan, would you mind looking into this?
Flags: needinfo?(nfroyd)
I'm going to add --disable-stylo to these builds to work around this issue. When we fix this. we should remove that from the appropriate mozconfigs.
(Assignee)

Updated

10 months ago
Blocks: 1386589
(Assignee)

Updated

10 months ago
Assignee: nobody → mh+mozilla
Flags: needinfo?(nfroyd)
(Assignee)

Updated

10 months ago
Depends on: 1386588
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 5

10 months ago
mozreview-review
Comment on attachment 8892897 [details]
Bug 1356926 - Use the same clang as normal builds for static analysis.

https://reviewboard.mozilla.org/r/163920/#review169404

These changes are beautiful.
Attachment #8892897 - Flags: review?(gps) → review+

Comment 6

10 months ago
mozreview-review
Comment on attachment 8892898 [details]
Bug 1356926 - Enable stylo on static analysis builds.

https://reviewboard.mozilla.org/r/163922/#review169406

Isn't it great how problems go away when you establish consistency?
Attachment #8892898 - Flags: review?(gps) → review+
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 10

10 months ago
mozreview-review
Comment on attachment 8893190 [details]
Bug 1356926 - Make all stdc++compat symbols weak.

https://reviewboard.mozilla.org/r/164218/#review169780

Makes sense to me.
Attachment #8893190 - Flags: review?(nfroyd) → review+

Comment 11

10 months ago
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/721b953ccc76
Make all stdc++compat symbols weak. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/2a497555fda7
Use the same clang as normal builds for static analysis. r=gps
https://hg.mozilla.org/integration/mozilla-inbound/rev/24041731b278
Enable stylo on static analysis builds. r=gps

Comment 12

10 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/721b953ccc76
https://hg.mozilla.org/mozilla-central/rev/2a497555fda7
https://hg.mozilla.org/mozilla-central/rev/24041731b278
Status: NEW → RESOLVED
Last Resolved: 10 months ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57

Updated

3 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.