Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Firefox build issues with Rust and the new VS2017 15.5 update

145 views
Skip to first unread message

Ryan VanderMeulen

unread,
Dec 5, 2017, 11:16:37 AM12/5/17
to dev-platform, Firefox Dev, dev-builds
FYI, the VC++ 2017 v14.12 toolset included in the recently-released VS2017
15.5 update appears to have broken building Firefox due to issues with the
Rust compiler (in particular, the version of libclang we ship with it) and
one of the system headers:

C:\PROGRA~2\MIB055~1\2017\COMMUN~1\VC\Tools\MSVC\1412~1.258\include\type_traits:898:47:
error: '_Ty' does not refer to a value

Which in turns leads to a Rust panic and build failure.

The Visual Studio installer allows you to install the prior v14.11 toolset
as well, but I haven't verified yet that our build system will properly use
it if it's there. In the mean time, I'd strongly advise avoiding this
update until it's sorted out.

-Ryan

Emilio Cobos Álvarez

unread,
Dec 5, 2017, 12:16:47 PM12/5/17
to dev-pl...@lists.mozilla.org
On 12/05/2017 05:16 PM, Ryan VanderMeulen wrote:
> FYI, the VC++ 2017 v14.12 toolset included in the recently-released VS2017
> 15.5 update appears to have broken building Firefox due to issues with the
> Rust compiler (in particular, the version of libclang we ship with it) and
> one of the system headers:
>
> C:\PROGRA~2\MIB055~1\2017\COMMUN~1\VC\Tools\MSVC\1412~1.258\include\type_traits:898:47:
> error: '_Ty' does not refer to a value
>
> Which in turns leads to a Rust panic and build failure.

That looks like bindgen, but the error is a C++ one, that is, it's clang
who is choking to parse type_traits. Which version of libclang is this
using?

There's nothing tying the rust compiler version and the libclang
version, so probably just using a newer clang that is up-to-date with
the C++ features that that MSVC header uses should be enough.

-- Emilio

Ralph Giles

unread,
Dec 5, 2017, 1:01:59 PM12/5/17
to Emilio Cobos Álvarez, dev-platform
On Tue, Dec 5, 2017 at 9:16 AM, Emilio Cobos Álvarez <emi...@crisal.io>
wrote:


> That looks like bindgen, but the error is a C++ one, that is, it's clang
> who is choking to parse type_traits. Which version of libclang is this
> using?
>

The libclang version supplied to bindgen is set by
https://searchfox.org/mozilla-central/source/build/build-clang/clang-win32.json

That's a patched svn r311608 which is somewhere around 4.0.1.

-r

Ryan VanderMeulen

unread,
Dec 5, 2017, 2:15:00 PM12/5/17
to dev-platform, Firefox Dev, dev-builds
As a follow-up, it looks like updating to a newer LLVM version fixes the
problem. That update is being tracked in
https://bugzilla.mozilla.org/show_bug.cgi?id=1423307.

For anybody already hitting this bustage locally, you can try updating your
clang toolchain under ~/.mozbuild/clang to the one below until the in-tree
changes are landed:
https://queue.taskcluster.net/v1/task/Q7sN0gfPSE-OAEV5vuGtEA/runs/0/artifacts/public/build/clang.tar.bz2

-Ryan

On Tue, Dec 5, 2017 at 11:16 AM, Ryan VanderMeulen <
rvande...@mozilla.com> wrote:

> FYI, the VC++ 2017 v14.12 toolset included in the recently-released VS2017
> 15.5 update appears to have broken building Firefox due to issues with the
> Rust compiler (in particular, the version of libclang we ship with it) and
> one of the system headers:
>
> C:\PROGRA~2\MIB055~1\2017\COMMUN~1\VC\Tools\MSVC\1412~1.
> 258\include\type_traits:898:47: error: '_Ty' does not refer to a value
>
> Which in turns leads to a Rust panic and build failure.
>

Adam Gashlin

unread,
Dec 6, 2017, 2:40:32 PM12/6/17
to dev-builds, dev-platform, Firefox Dev
I encountered an issue building with the latest VS update, warnings treated
as errors regarding TR1 deprecation, in at least some gtest files. This can
be avoided by running as

CXXFLAGS=-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING ./mach build

though I imagine there are better ways of adding in that define.

On Tue, Dec 5, 2017 at 11:14 AM, Ryan VanderMeulen <
rvande...@mozilla.com> wrote:

> As a follow-up, it looks like updating to a newer LLVM version fixes the
> problem. That update is being tracked in https://bugzilla.mozilla.org/
> show_bug.cgi?id=1423307.
>
> For anybody already hitting this bustage locally, you can try updating
> your clang toolchain under ~/.mozbuild/clang to the one below until the
> in-tree changes are landed:
> https://queue.taskcluster.net/v1/task/Q7sN0gfPSE-
> OAEV5vuGtEA/runs/0/artifacts/public/build/clang.tar.bz2
>
> -Ryan
>
> On Tue, Dec 5, 2017 at 11:16 AM, Ryan VanderMeulen <
> rvande...@mozilla.com> wrote:
>
>> FYI, the VC++ 2017 v14.12 toolset included in the recently-released
>> VS2017 15.5 update appears to have broken building Firefox due to issues
>> with the Rust compiler (in particular, the version of libclang we ship with
>> it) and one of the system headers:
>>
>> C:\PROGRA~2\MIB055~1\2017\COMMUN~1\VC\Tools\MSVC\1412~1.258\include\type_traits:898:47:
>> error: '_Ty' does not refer to a value
>>
>> Which in turns leads to a Rust panic and build failure.
>>
>> The Visual Studio installer allows you to install the prior v14.11
>> toolset as well, but I haven't verified yet that our build system will
>> properly use it if it's there. In the mean time, I'd strongly advise
>> avoiding this update until it's sorted out.
>>
>> -Ryan
>>
>
>
> _______________________________________________
> firefox-dev mailing list
> firef...@mozilla.org
> https://mail.mozilla.org/listinfo/firefox-dev
>
>

Ryan VanderMeulen

unread,
Dec 7, 2017, 10:01:02 AM12/7/17
to dev-platform, Firefox Dev, dev-builds
Bug 1423307 has been merged to m-c now. After you've updated m-c, you can
re-run |./mach bootstrap| to pick up the newer clang binaries that will fix
the _Ty problem.

-Ryan

On Tue, Dec 5, 2017 at 2:14 PM, Ryan VanderMeulen <rvande...@mozilla.com

James Cheng

unread,
Dec 7, 2017, 11:14:03 PM12/7/17
to Ryan VanderMeulen, dev-builds, dev-platform, Firefox Dev
Hi Ryan,

I did ``./mach bootstrap`` and the problem still happened with my VS 15.5
update.

I deleted the folders under my .mozbuild and do the bootstrap again but it
seems useless...

The errors are something like

9:58.83
c:\gecko-dev\obj-x86_64-pc-mingw32\dist\include\gtest/gtest-printers.h(878):
error C4996: 'std::tr1': warning STL4002: The non-Standard std::tr1
namespace and TR1-only machinery are deprecated and will be REMOVED. You
can define _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING to acknowledge that
you have received this warning.

and I did the bootstrap with the latest central(Bug 1423307 included).

Can I do anything for troubleshooting?

Thank you.

1. Firefox for Desktop Artifact Mode
2. Firefox for Desktop
3. Firefox for Android Artifact Mode
4. Firefox for Android
Your choice: 2
Running pip to ensure Mercurial is up-to-date...
Requirement already up-to-date: Mercurial in
c:\mozilla-build\python\lib\site-packages
Your version of Python (2.7.14) is new enough.
Your version of Rust (1.22.1) is new enough.
Rust supports i686-pc-windows-msvc, x86_64-pc-windows-msvc targets.
0:23.30 Downloading clang.tar.bz2
0:23.30 Downloading to temporary location
c:\Users\jameswc\.mozbuild\toolchains\1e9883794cf0be12-clang.tar.bz2
0:23.77 Downloading... 0.0 %
0:24.38 Downloading... 5.0 %
0:25.14 Downloading... 10.0 %
0:25.72 Downloading... 15.0 %
0:26.31 Downloading... 20.0 %
0:26.90 Downloading... 25.0 %
0:27.52 Downloading... 30.0 %
0:28.11 Downloading... 35.0 %
0:28.70 Downloading... 40.0 %
0:29.56 Downloading... 45.0 %
0:30.24 Downloading... 50.0 %
0:30.85 Downloading... 55.0 %
0:31.44 Downloading... 60.0 %
0:32.01 Downloading... 65.0 %
0:32.57 Downloading... 70.0 %
0:33.14 Downloading... 75.0 %
0:33.67 Downloading... 80.0 %
0:34.32 Downloading... 85.0 %
0:34.95 Downloading... 90.0 %
0:35.46 Downloading... 95.0 %
0:36.11 Downloading... 100.0 %
0:36.12 Downloaded artifact to
c:\Users\jameswc\.mozbuild\toolchains\1e9883794cf0be12-clang.tar.bz2
0:36.47 untarring "c:\Users\jameswc\.mozbuild\clang.tar.bz2"

Your system should be ready to build Firefox for Desktop!
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>

Ryan VanderMeulen

unread,
Dec 7, 2017, 11:46:53 PM12/7/17
to James Cheng, dev-builds, dev-platform, Firefox Dev
That's the issue Adam raised, separate from the clang one. It's tracked in
bug 1423649. For now, you can use the workaround Adam gave in this thread
already or you can use the patch attached to the bug.

Ryan VanderMeulen

unread,
Dec 8, 2017, 6:10:18 PM12/8/17
to James Cheng, dev-builds, dev-platform, Firefox Dev
The fix for bug 1423649 has been merged to m-c. You *should* be good to go
now :-)

-Ryan
0 new messages