Bug 185461 - [GTK][JHBuild] LLVM 3.7.0 build is broken with GCC 8.1
Summary: [GTK][JHBuild] LLVM 3.7.0 build is broken with GCC 8.1
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-08 19:22 PDT by Carlos Eduardo Ramalho
Modified: 2018-05-09 10:03 PDT (History)
8 users (show)

See Also:


Attachments
Patch for second option (1.36 KB, patch)
2018-05-08 19:26 PDT, Carlos Eduardo Ramalho
no flags Details | Formatted Diff | Diff
Patch for first option (1.56 KB, patch)
2018-05-08 19:43 PDT, Carlos Eduardo Ramalho
no flags Details | Formatted Diff | Diff
Patch (2.78 KB, patch)
2018-05-08 22:42 PDT, Carlos Eduardo Ramalho
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-sierra-wk2 (2.91 MB, application/zip)
2018-05-08 23:48 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Eduardo Ramalho 2018-05-08 19:22:11 PDT
While building LLVM 3.7.0 from JHBuild with GCC 8.1 we get a simple casting error:

/home/cadubentzen/Downloads/llvm-3.7.0.src/include/llvm/IR/ValueMap.h:102:31: error: cannot convert ‘const std::unique_ptr<llvm::DenseMap<const llvm::Metadata*, llvm::TrackingMDRef> >’ to ‘bool’ in return
   bool hasMD() const { return MDMap; }

I see two options:
- Add a patch with the explicit cast in JHBuild, pretty easy and no impact in other places;
- Raise LLVM to 3.9.0 (release that had it fixed first, which was in LLVV's SVN at r265828).

I tested that the first solution works and no errors occur in other places during compilation.

But if it's desirable to have a higher LLVM version, we can raise it to 3.9.0.
Comment 1 Carlos Eduardo Ramalho 2018-05-08 19:26:00 PDT
Created attachment 339918 [details]
Patch for second option

Patch for second option. LLVM 3.9.0 was the first release to drop autotools and uses only CMake. Needs ChangeLog entries.
Comment 2 Carlos Eduardo Ramalho 2018-05-08 19:43:58 PDT
Created attachment 339921 [details]
Patch for first option

Patch for first option. Needs ChangeLog entries yet as well.
Comment 3 Michael Catanzaro 2018-05-08 20:08:27 PDT
Second option seems somewhat nicer.

I would jump straight to LLVM 6. We can see if test results break after we land it. I'd assume probably not.
Comment 4 Carlos Eduardo Ramalho 2018-05-08 22:42:17 PDT
Created attachment 339931 [details]
Patch
Comment 5 Carlos Eduardo Ramalho 2018-05-08 22:44:49 PDT
(In reply to Michael Catanzaro from comment #3)
> Second option seems somewhat nicer.
> 
> I would jump straight to LLVM 6. We can see if test results break after we
> land it. I'd assume probably not.

LLVM 6 removed some APIs that broke Mesa 17.3.3, so I also raised Mesa to 18.0.3 and now it works.

Any objections on raising Mesa version as well? I wonder if this will break any layout tests.
Comment 6 Build Bot 2018-05-08 23:48:10 PDT
Comment on attachment 339931 [details]
Patch

Attachment 339931 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/7620484

New failing tests:
http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients.html
Comment 7 Build Bot 2018-05-08 23:48:12 PDT
Created attachment 339935 [details]
Archive of layout-test-results from ews107 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 8 Michael Catanzaro 2018-05-09 08:09:06 PDT
Comment on attachment 339931 [details]
Patch

Let's try it and see what happens to the bots. It could very well break tests, but only one way to find out.
Comment 9 Build Bot 2018-05-09 09:08:50 PDT
Comment on attachment 339931 [details]
Patch

Rejecting attachment 339931 [details] from commit-queue.

cadubentzen@gmail.com does not have committer permissions according to https://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/contributors.json.

- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.

- If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/contributors.json by adding yourself to the file (no review needed).  The commit-queue restarts itself every 2 hours.  After restart the commit-queue will correctly respect your committer rights.
Comment 10 Carlos Eduardo Ramalho 2018-05-09 09:12:44 PDT
(In reply to Build Bot from comment #6)
> Comment on attachment 339931 [details]
> Patch
> 
> Attachment 339931 [details] did not pass mac-wk2-ews (mac-wk2):
> Output: http://webkit-queues.webkit.org/results/7620484
> 
> New failing tests:
> http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients.html

mcatanzaro, can you land the patch? This regression certainly isn't related to the patch and seems like a flaky test on the mac-wk2 bot.
Comment 11 Michael Catanzaro 2018-05-09 09:36:03 PDT
Comment on attachment 339931 [details]
Patch

Yeah, our EWS doesn't run tests, so the bots won't notice any test regressions until after it lands.
Comment 12 WebKit Commit Bot 2018-05-09 10:03:02 PDT
Comment on attachment 339931 [details]
Patch

Clearing flags on attachment: 339931

Committed r231569: <https://trac.webkit.org/changeset/231569>
Comment 13 WebKit Commit Bot 2018-05-09 10:03:03 PDT
All reviewed patches have been landed.  Closing bug.