You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Alex Clemmer <cl...@gmail.com> on 2017/01/15 09:12:35 UTC

Review Request 55543: Fail the build if %PreferredToolArchitecture% is not set to `x64`.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55543/
-----------------------------------------------------------

Review request for mesos, Andrew Schwartzmeyer, Daniel Pravat, and Joseph Wu.


Bugs: MESOS-6720
    https://issues.apache.org/jira/browse/MESOS-6720


Repository: mesos


Description
-------

Before building Mesos on a Windows machine, it is necessary to set
`%PreferredToolArchitecture%` to the value `x64`. This is necessary to
work around (at least) two bugs in the MSVC backend: in particular, the
linker can sometimes take hours or days to link `mesos-x.x.x.lib`, and
the build system occasionally finds it self spuriously unable to find
file `mesos-x.x.x.lib` to link against.

These issues are well-known and documented (e.g., in the official Mesos
"getting started" document), but it is better to simply refuse to build
Mesos at all on Windows unless that environment variable is set.

This commit will introduce such a check.


Diffs
-----

  cmake/CompilationConfigure.cmake 560935b81603dc58c167918d36e2ae0a4060673d 

Diff: https://reviews.apache.org/r/55543/diff/


Testing
-------


Thanks,

Alex Clemmer


Re: Review Request 55543: Fail the build if %PreferredToolArchitecture% is not set to `x64`.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55543/#review164375
-----------------------------------------------------------


Ship it!




So many MSVC problems.

- Andrew Schwartzmeyer


On Jan. 29, 2017, 7:21 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55543/
> -----------------------------------------------------------
> 
> (Updated Jan. 29, 2017, 7:21 a.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, Daniel Pravat, and Joseph Wu.
> 
> 
> Bugs: MESOS-6720
>     https://issues.apache.org/jira/browse/MESOS-6720
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Before building Mesos on a Windows machine, it is necessary to set
> `%PreferredToolArchitecture%` to the value `x64`. This is necessary to
> work around (at least) two bugs in the MSVC backend: in particular, the
> linker can sometimes take hours or days to link `mesos-x.x.x.lib`, and
> the build system occasionally finds it self spuriously unable to find
> file `mesos-x.x.x.lib` to link against.
> 
> These issues are well-known and documented (e.g., in the official Mesos
> "getting started" document), but it is better to simply refuse to build
> Mesos at all on Windows unless that environment variable is set.
> 
> This commit will introduce such a check.
> 
> 
> Diffs
> -----
> 
>   cmake/CompilationConfigure.cmake 560935b81603dc58c167918d36e2ae0a4060673d 
> 
> Diff: https://reviews.apache.org/r/55543/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 55543: Fail the build if %PreferredToolArchitecture% is not set to `x64`.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55543/#review166000
-----------------------------------------------------------


Ship it!




This change LGTM, but I'll need to update `support/windows-build.bat` and `docs/windows.md` with some tweaked instructions.

That script/doc currently doesn't set the environment variable, but calls `msbuild` with the `PreferredToolArchitecture` argument set.

- Joseph Wu


On Feb. 11, 2017, 5:08 p.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55543/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2017, 5:08 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, Daniel Pravat, and Joseph Wu.
> 
> 
> Bugs: MESOS-6720
>     https://issues.apache.org/jira/browse/MESOS-6720
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Before building Mesos on a Windows machine, it is necessary to set
> `%PreferredToolArchitecture%` to the value `x64`. This is necessary to
> work around (at least) two bugs in the MSVC backend: in particular, the
> linker can sometimes take hours or days to link `mesos-x.x.x.lib`, and
> the build system occasionally finds it self spuriously unable to find
> file `mesos-x.x.x.lib` to link against.
> 
> These issues are well-known and documented (e.g., in the official Mesos
> "getting started" document), but it is better to simply refuse to build
> Mesos at all on Windows unless that environment variable is set.
> 
> This commit will introduce such a check.
> 
> 
> Diffs
> -----
> 
>   cmake/CompilationConfigure.cmake 560935b81603dc58c167918d36e2ae0a4060673d 
>   src/CMakeLists.txt 3a4ace9c8011ac8eec5067cd085fa7fe4166b9ee 
>   src/slave/cmake/AgentConfigure.cmake 8d930d329048440d57b621fe8393b11912cdb27b 
> 
> Diff: https://reviews.apache.org/r/55543/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 55543: Fail the build if %PreferredToolArchitecture% is not set to `x64`.

Posted by Alex Clemmer <cl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55543/
-----------------------------------------------------------

(Updated Feb. 12, 2017, 1:08 a.m.)


Review request for mesos, Andrew Schwartzmeyer, Daniel Pravat, and Joseph Wu.


Changes
-------

Address Joseph's comments.


Bugs: MESOS-6720
    https://issues.apache.org/jira/browse/MESOS-6720


Repository: mesos


Description
-------

Before building Mesos on a Windows machine, it is necessary to set
`%PreferredToolArchitecture%` to the value `x64`. This is necessary to
work around (at least) two bugs in the MSVC backend: in particular, the
linker can sometimes take hours or days to link `mesos-x.x.x.lib`, and
the build system occasionally finds it self spuriously unable to find
file `mesos-x.x.x.lib` to link against.

These issues are well-known and documented (e.g., in the official Mesos
"getting started" document), but it is better to simply refuse to build
Mesos at all on Windows unless that environment variable is set.

This commit will introduce such a check.


Diffs (updated)
-----

  cmake/CompilationConfigure.cmake 560935b81603dc58c167918d36e2ae0a4060673d 
  src/CMakeLists.txt 3a4ace9c8011ac8eec5067cd085fa7fe4166b9ee 
  src/slave/cmake/AgentConfigure.cmake 8d930d329048440d57b621fe8393b11912cdb27b 

Diff: https://reviews.apache.org/r/55543/diff/


Testing
-------


Thanks,

Alex Clemmer


Re: Review Request 55543: Fail the build if %PreferredToolArchitecture% is not set to `x64`.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55543/#review163558
-----------------------------------------------------------



Discussed this offline.  In summary, we want to prevent users from (shooting themselves in the foot) bypassing the CMake check by doing something like:
```
PreferredToolArchitecture=x64 cmake ..
msbuild Mesos.sln /m
```

The current solution is effectively only checked at "configure" time.  We should add a build-time step to error out instead.

- Joseph Wu


On Jan. 28, 2017, 11:21 p.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55543/
> -----------------------------------------------------------
> 
> (Updated Jan. 28, 2017, 11:21 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, Daniel Pravat, and Joseph Wu.
> 
> 
> Bugs: MESOS-6720
>     https://issues.apache.org/jira/browse/MESOS-6720
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Before building Mesos on a Windows machine, it is necessary to set
> `%PreferredToolArchitecture%` to the value `x64`. This is necessary to
> work around (at least) two bugs in the MSVC backend: in particular, the
> linker can sometimes take hours or days to link `mesos-x.x.x.lib`, and
> the build system occasionally finds it self spuriously unable to find
> file `mesos-x.x.x.lib` to link against.
> 
> These issues are well-known and documented (e.g., in the official Mesos
> "getting started" document), but it is better to simply refuse to build
> Mesos at all on Windows unless that environment variable is set.
> 
> This commit will introduce such a check.
> 
> 
> Diffs
> -----
> 
>   cmake/CompilationConfigure.cmake 560935b81603dc58c167918d36e2ae0a4060673d 
> 
> Diff: https://reviews.apache.org/r/55543/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 55543: Fail the build if %PreferredToolArchitecture% is not set to `x64`.

Posted by Alex Clemmer <cl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55543/
-----------------------------------------------------------

(Updated Jan. 29, 2017, 7:21 a.m.)


Review request for mesos, Andrew Schwartzmeyer, Daniel Pravat, and Joseph Wu.


Changes
-------

Rearrange dependencies.


Bugs: MESOS-6720
    https://issues.apache.org/jira/browse/MESOS-6720


Repository: mesos


Description
-------

Before building Mesos on a Windows machine, it is necessary to set
`%PreferredToolArchitecture%` to the value `x64`. This is necessary to
work around (at least) two bugs in the MSVC backend: in particular, the
linker can sometimes take hours or days to link `mesos-x.x.x.lib`, and
the build system occasionally finds it self spuriously unable to find
file `mesos-x.x.x.lib` to link against.

These issues are well-known and documented (e.g., in the official Mesos
"getting started" document), but it is better to simply refuse to build
Mesos at all on Windows unless that environment variable is set.

This commit will introduce such a check.


Diffs
-----

  cmake/CompilationConfigure.cmake 560935b81603dc58c167918d36e2ae0a4060673d 

Diff: https://reviews.apache.org/r/55543/diff/


Testing
-------


Thanks,

Alex Clemmer