Windows build failure - C2131: expression did not evaluate to a constant

classic Classic list List threaded Threaded
8 messages Options
slacka slacka
Reply | Threaded
Open this post in threaded view
|

Windows build failure - C2131: expression did not evaluate to a constant

After commit:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=644188bf7f3a

    Compute (un-)premultiply_table at compile time

I'm seeing the following build failure on Windows 32-bit release build:
D:/core/vcl/source/bitmap/BitmapTools.cxx(1078): error C2131: expression did not evaluate to a constant
D:/core/vcl/source/bitmap/BitmapTools.cxx(1097): error C2131: expression did not evaluate to a constant
make[1]: *** [D:/core/solenv/gbuild/LinkTarget.mk:293: D:/core/workdir/CxxObject/vcl/source/bitmap/BitmapTools.o] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:283: build] Error 2


Do I need to upgrade MSVC again?
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Noel Grandin-2 Noel Grandin-2
Reply | Threaded
Open this post in threaded view
|

Re: Windows build failure - C2131: expression did not evaluate to a constant



> I'm seeing the following build failure on Windows 32-bit release build:
> D:/core/vcl/source/bitmap/BitmapTools.cxx(1078): error C2131: expression did not evaluate to a constant
> D:/core/vcl/source/bitmap/BitmapTools.cxx(1097): error C2131: expression did not evaluate to a constant
> make[1]: *** [D:/core/solenv/gbuild/LinkTarget.mk:293: D:/core/workdir/CxxObject/vcl/source/bitmap/BitmapTools.o] Error 2

You need the latest Visual Studio 2017 release.

Doing an update from inside Visual Studio (help->check for update) should suffice.
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Kaganski Mike Kaganski Mike
Reply | Threaded
Open this post in threaded view
|

Re: Windows build failure - C2131: expression did not evaluate to a constant

On 04.12.2018 9:30, Noel Grandin wrote:

>
>
>> I'm seeing the following build failure on Windows 32-bit release build:
>> D:/core/vcl/source/bitmap/BitmapTools.cxx(1078): error C2131:
>> expression did not evaluate to a constant
>> D:/core/vcl/source/bitmap/BitmapTools.cxx(1097): error C2131:
>> expression did not evaluate to a constant
>> make[1]: *** [D:/core/solenv/gbuild/LinkTarget.mk:293:
>> D:/core/workdir/CxxObject/vcl/source/bitmap/BitmapTools.o] Error 2
>
> You need the latest Visual Studio 2017 release.

So, it seems that commit establishes another VS baseline?

--
Best regards,
Mike Kaganski
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: Windows build failure - C2131: expression did not evaluate to a constant

In reply to this post by slacka
On 04/12/2018 02:54, Luke Benes wrote:

> After commit:
> https://cgit.freedesktop.org/libreoffice/core/commit/?id=644188bf7f3a
>
>      Compute (un-)premultiply_table at compile time
>
> I'm seeing the following build failure on Windows 32-bit release build:
> D:/core/vcl/source/bitmap/BitmapTools.cxx(1078): error C2131: expression did not evaluate to a constant
> D:/core/vcl/source/bitmap/BitmapTools.cxx(1097): error C2131: expression did not evaluate to a constant
> make[1]: *** [D:/core/solenv/gbuild/LinkTarget.mk:293: D:/core/workdir/CxxObject/vcl/source/bitmap/BitmapTools.o] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make: *** [Makefile:283: build] Error 2
>
>
> Do I need to upgrade MSVC again?

Our recently-bumped MSVC baseline is Visual Studio 2017 version 15.7
(the "version 15.7" suffix is important, there are many different
releases of Visual Studio 2017, with ever-increasing C++ standard
compliance).  That should be enforced by configure since
<https://gerrit.libreoffice.org/plugins/gitiles/core/+/206b8c4ae320d7d8614f21800d8f77fa29f8f5ff%5E!/>
"On Windows, check for at least Visual Studio 2017 version 15.7".

<https://gerrit.libreoffice.org/#/c/64428/> "Compute
(un-)premultiply_table at compile time" was checked by Jenkins' tb78 at
<https://ci.libreoffice.org/job/gerrit_windows/23400/>, and the mention
of "14.14" in e.g. "export
COMPATH=C:/PROGRA~2/MIB055~1/2017/COMMUN~1/VC/Tools/MSVC/14.14.26428"
(<https://ci.libreoffice.org/job/gerrit_windows/23400/consoleFull>)
makes it look like that configuration indeed uses Visual Studio 2017
version 15.7 per the mapping from "MSVC++ 14.14" to "_MSC_VER == 1914
(Visual Studio 2017 version 15.7)" documented at
<https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering>.

Not sure what goes wrong for you.  What version of VS are you using?
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Kaganski Mike Kaganski Mike
Reply | Threaded
Open this post in threaded view
|

Re: Windows build failure - C2131: expression did not evaluate to a constant

On 04.12.2018 10:37, Stephan Bergmann wrote:

>
> Our recently-bumped MSVC baseline is Visual Studio 2017 version 15.7
> (the "version 15.7" suffix is important, there are many different
> releases of Visual Studio 2017, with ever-increasing C++ standard
> compliance).  That should be enforced by configure since
> <https://gerrit.libreoffice.org/plugins/gitiles/core/+/206b8c4ae320d7d8614f21800d8f77fa29f8f5ff%5E!/>
> "On Windows, check for at least Visual Studio 2017 version 15.7".
>
> <https://gerrit.libreoffice.org/#/c/64428/> "Compute
> (un-)premultiply_table at compile time" was checked by Jenkins' tb78 at
> <https://ci.libreoffice.org/job/gerrit_windows/23400/>, and the mention
> of "14.14" in e.g. "export
> COMPATH=C:/PROGRA~2/MIB055~1/2017/COMMUN~1/VC/Tools/MSVC/14.14.26428"
> (<https://ci.libreoffice.org/job/gerrit_windows/23400/consoleFull>)
> makes it look like that configuration indeed uses Visual Studio 2017
> version 15.7 per the mapping from "MSVC++ 14.14" to "_MSC_VER == 1914
> (Visual Studio 2017 version 15.7)" documented at
> <https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering>.
>
>
> Not sure what goes wrong for you.  What version of VS are you using?

I have just pulled, and I confirm this with 64-bit build, with VS
version 15.9.3.

--
Best regards,
Mike Kaganski
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Kaganski Mike Kaganski Mike
Reply | Threaded
Open this post in threaded view
|

Re: Windows build failure - C2131: expression did not evaluate to a constant

On 04.12.2018 14:17, Kaganski Mike wrote:
>
> I have just pulled, and I confirm this with 64-bit build, with VS
> version 15.9.3.
>

I mean, I confirm that with my version of compiler, the problem is
reproducible.
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Kaganski Mike Kaganski Mike
Reply | Threaded
Open this post in threaded view
|

Re: Windows build failure - C2131: expression did not evaluate to a constant

On 04.12.2018 14:18, Kaganski Mike wrote:

> On 04.12.2018 14:17, Kaganski Mike wrote:
>>
>> I have just pulled, and I confirm this with 64-bit build, with VS
>> version 15.9.3.
>>
>
> I mean, I confirm that with my version of compiler, the problem is
> reproducible.
> _______________________________________________
> LibreOffice mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>

Reported that to
https://developercommunity.visualstudio.com/content/problem/398218/c2131-error-with-stdarray-and-stdmake-integer-sequ.html.

As noted there, I have discovered the code to succeed if I replace 256
to any number up to 234.

--
Best regards,
Mike Kaganski
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: Windows build failure - C2131: expression did not evaluate to a constant

On 04/12/2018 14:18, Kaganski Mike wrote:
> Reported that to
> https://developercommunity.visualstudio.com/content/problem/398218/c2131-error-with-stdarray-and-stdmake-integer-sequ.html.
>
> As noted there, I have discovered the code to succeed if I replace 256
> to any number up to 234.

So lets revert that again until there is a newer Visual Studio 2017 that
fixes that regression.  <https://gerrit.libreoffice.org/#/c/64618/>
"Revert 'Compute (un-)premultiply_table at compile time'".
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice