You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Andrew Schwartzmeyer <an...@schwartzmeyer.com> on 2018/04/19 02:12:57 UTC

Review Request 66711: Made 3rdparty jemalloc only build when enabled.

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

Review request for mesos, Alexander Rukletsov, Benjamin Bannier, Benno Evers, and Joseph Wu.


Repository: mesos


Description
-------

The `ExternalProjectAdd` CMake module defines
download/update/patch/configure steps unconditionally as default
targets. This meant that `cmake --build .` on Windows attempted to run
the `configure` script of jemalloc, which obviously fails.

By wrapping the 3rdparty import with `ENABLE_JEMALLOC_ALLOCATOR` we
fix this bug on Windows, and avoid unnecessary build steps on Linux.


Diffs
-----

  3rdparty/CMakeLists.txt 70affa3550d91b48b97417d857a0eeacd60f9b2c 


Diff: https://reviews.apache.org/r/66711/diff/1/


Testing
-------

`ninja` on Windows (no target arguments); now the `jemalloc` configuration step is entirely skipped. Previously it resulted in:

```
FAILED: 3rdparty/jemalloc-5.0.1/src/jemalloc-5.0.1-stamp/jemalloc-5.0.1-configure
cmd.exe /C "cd /D C:\Users\andschwa\src\mesos\build\master\3rdparty\jemalloc-5.0.1\src\jemalloc-5.0.1-build && C:\Users\andschwa\src\mesos\build\master\3rdparty\jemalloc-5.0.1\src\jemalloc-5.0.1\configure --enable-stats --enable-prof --with-malloc-conf=prof:true,prof_active:false && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/Users/andschwa/src/mesos/build/master/3rdparty/jemalloc-5.0.1/src/jemalloc-5.0.1-stamp/jemalloc-5.0.1-configure"
```

Please correct me if I'm wrong about this.


Thanks,

Andrew Schwartzmeyer


Re: Review Request 66711: Made 3rdparty jemalloc only build when enabled.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66711/#review201513
-----------------------------------------------------------



Patch looks great!

Reviews applied: [66711]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On April 18, 2018, 7:12 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66711/
> -----------------------------------------------------------
> 
> (Updated April 18, 2018, 7:12 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Bannier, Benno Evers, and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `ExternalProjectAdd` CMake module defines
> download/update/patch/configure steps unconditionally as default
> targets. This meant that `cmake --build .` on Windows attempted to run
> the `configure` script of jemalloc, which obviously fails.
> 
> By wrapping the 3rdparty import with `ENABLE_JEMALLOC_ALLOCATOR` we
> fix this bug on Windows, and avoid unnecessary build steps on Linux.
> 
> 
> Diffs
> -----
> 
>   3rdparty/CMakeLists.txt 70affa3550d91b48b97417d857a0eeacd60f9b2c 
> 
> 
> Diff: https://reviews.apache.org/r/66711/diff/1/
> 
> 
> Testing
> -------
> 
> `ninja` on Windows (no target arguments); now the `jemalloc` configuration step is entirely skipped. Previously it resulted in:
> 
> ```
> FAILED: 3rdparty/jemalloc-5.0.1/src/jemalloc-5.0.1-stamp/jemalloc-5.0.1-configure
> cmd.exe /C "cd /D C:\Users\andschwa\src\mesos\build\master\3rdparty\jemalloc-5.0.1\src\jemalloc-5.0.1-build && C:\Users\andschwa\src\mesos\build\master\3rdparty\jemalloc-5.0.1\src\jemalloc-5.0.1\configure --enable-stats --enable-prof --with-malloc-conf=prof:true,prof_active:false && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/Users/andschwa/src/mesos/build/master/3rdparty/jemalloc-5.0.1/src/jemalloc-5.0.1-stamp/jemalloc-5.0.1-configure"
> ```
> 
> Please correct me if I'm wrong about this.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 66711: Made 3rdparty jemalloc only build when enabled.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.

> On April 18, 2018, 8:57 p.m., Mesos Reviewbot Windows wrote:
> > PASS: Mesos patch 66711 was successfully built and tested.
> > 
> > Reviews applied: `['66711']`
> > 
> > All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66711

Yay, it fixed the build bot!


- Andrew


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


On April 18, 2018, 7:12 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66711/
> -----------------------------------------------------------
> 
> (Updated April 18, 2018, 7:12 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Bannier, Benno Evers, and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `ExternalProjectAdd` CMake module defines
> download/update/patch/configure steps unconditionally as default
> targets. This meant that `cmake --build .` on Windows attempted to run
> the `configure` script of jemalloc, which obviously fails.
> 
> By wrapping the 3rdparty import with `ENABLE_JEMALLOC_ALLOCATOR` we
> fix this bug on Windows, and avoid unnecessary build steps on Linux.
> 
> 
> Diffs
> -----
> 
>   3rdparty/CMakeLists.txt 70affa3550d91b48b97417d857a0eeacd60f9b2c 
> 
> 
> Diff: https://reviews.apache.org/r/66711/diff/1/
> 
> 
> Testing
> -------
> 
> `ninja` on Windows (no target arguments); now the `jemalloc` configuration step is entirely skipped. Previously it resulted in:
> 
> ```
> FAILED: 3rdparty/jemalloc-5.0.1/src/jemalloc-5.0.1-stamp/jemalloc-5.0.1-configure
> cmd.exe /C "cd /D C:\Users\andschwa\src\mesos\build\master\3rdparty\jemalloc-5.0.1\src\jemalloc-5.0.1-build && C:\Users\andschwa\src\mesos\build\master\3rdparty\jemalloc-5.0.1\src\jemalloc-5.0.1\configure --enable-stats --enable-prof --with-malloc-conf=prof:true,prof_active:false && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/Users/andschwa/src/mesos/build/master/3rdparty/jemalloc-5.0.1/src/jemalloc-5.0.1-stamp/jemalloc-5.0.1-configure"
> ```
> 
> Please correct me if I'm wrong about this.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 66711: Made 3rdparty jemalloc only build when enabled.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66711/#review201495
-----------------------------------------------------------



PASS: Mesos patch 66711 was successfully built and tested.

Reviews applied: `['66711']`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66711

- Mesos Reviewbot Windows


On April 19, 2018, 2:12 a.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66711/
> -----------------------------------------------------------
> 
> (Updated April 19, 2018, 2:12 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Bannier, Benno Evers, and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `ExternalProjectAdd` CMake module defines
> download/update/patch/configure steps unconditionally as default
> targets. This meant that `cmake --build .` on Windows attempted to run
> the `configure` script of jemalloc, which obviously fails.
> 
> By wrapping the 3rdparty import with `ENABLE_JEMALLOC_ALLOCATOR` we
> fix this bug on Windows, and avoid unnecessary build steps on Linux.
> 
> 
> Diffs
> -----
> 
>   3rdparty/CMakeLists.txt 70affa3550d91b48b97417d857a0eeacd60f9b2c 
> 
> 
> Diff: https://reviews.apache.org/r/66711/diff/1/
> 
> 
> Testing
> -------
> 
> `ninja` on Windows (no target arguments); now the `jemalloc` configuration step is entirely skipped. Previously it resulted in:
> 
> ```
> FAILED: 3rdparty/jemalloc-5.0.1/src/jemalloc-5.0.1-stamp/jemalloc-5.0.1-configure
> cmd.exe /C "cd /D C:\Users\andschwa\src\mesos\build\master\3rdparty\jemalloc-5.0.1\src\jemalloc-5.0.1-build && C:\Users\andschwa\src\mesos\build\master\3rdparty\jemalloc-5.0.1\src\jemalloc-5.0.1\configure --enable-stats --enable-prof --with-malloc-conf=prof:true,prof_active:false && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/Users/andschwa/src/mesos/build/master/3rdparty/jemalloc-5.0.1/src/jemalloc-5.0.1-stamp/jemalloc-5.0.1-configure"
> ```
> 
> Please correct me if I'm wrong about this.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 66711: Made 3rdparty jemalloc only build when enabled.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.

> On April 19, 2018, 5:43 a.m., Benno Evers wrote:
> > I'm a bit surprised by the behaviour you describe, i.e. cmake downloading and configuring third-party dependencies that are not going to be used. Am I correct in thinking that for a proper fix, we should wrap *every* third-party dependency into an analogous if-block?

I am quite surprised at this, because yes that would be the implication. I'm going to take a second look with some coffee in me.


- Andrew


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


On April 18, 2018, 7:12 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66711/
> -----------------------------------------------------------
> 
> (Updated April 18, 2018, 7:12 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Bannier, Benno Evers, and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `ExternalProjectAdd` CMake module defines
> download/update/patch/configure steps unconditionally as default
> targets. This meant that `cmake --build .` on Windows attempted to run
> the `configure` script of jemalloc, which obviously fails.
> 
> By wrapping the 3rdparty import with `ENABLE_JEMALLOC_ALLOCATOR` we
> fix this bug on Windows, and avoid unnecessary build steps on Linux.
> 
> 
> Diffs
> -----
> 
>   3rdparty/CMakeLists.txt 70affa3550d91b48b97417d857a0eeacd60f9b2c 
> 
> 
> Diff: https://reviews.apache.org/r/66711/diff/1/
> 
> 
> Testing
> -------
> 
> `ninja` on Windows (no target arguments); now the `jemalloc` configuration step is entirely skipped. Previously it resulted in:
> 
> ```
> FAILED: 3rdparty/jemalloc-5.0.1/src/jemalloc-5.0.1-stamp/jemalloc-5.0.1-configure
> cmd.exe /C "cd /D C:\Users\andschwa\src\mesos\build\master\3rdparty\jemalloc-5.0.1\src\jemalloc-5.0.1-build && C:\Users\andschwa\src\mesos\build\master\3rdparty\jemalloc-5.0.1\src\jemalloc-5.0.1\configure --enable-stats --enable-prof --with-malloc-conf=prof:true,prof_active:false && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/Users/andschwa/src/mesos/build/master/3rdparty/jemalloc-5.0.1/src/jemalloc-5.0.1-stamp/jemalloc-5.0.1-configure"
> ```
> 
> Please correct me if I'm wrong about this.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 66711: Made 3rdparty jemalloc only build when enabled.

Posted by Benno Evers <be...@mesosphere.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66711/#review201515
-----------------------------------------------------------


Ship it!




I'm a bit surprised by the behaviour you describe, i.e. cmake downloading and configuring third-party dependencies that are not going to be used. Am I correct in thinking that for a proper fix, we should wrap *every* third-party dependency into an analogous if-block?

- Benno Evers


On April 19, 2018, 2:12 a.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66711/
> -----------------------------------------------------------
> 
> (Updated April 19, 2018, 2:12 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Bannier, Benno Evers, and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `ExternalProjectAdd` CMake module defines
> download/update/patch/configure steps unconditionally as default
> targets. This meant that `cmake --build .` on Windows attempted to run
> the `configure` script of jemalloc, which obviously fails.
> 
> By wrapping the 3rdparty import with `ENABLE_JEMALLOC_ALLOCATOR` we
> fix this bug on Windows, and avoid unnecessary build steps on Linux.
> 
> 
> Diffs
> -----
> 
>   3rdparty/CMakeLists.txt 70affa3550d91b48b97417d857a0eeacd60f9b2c 
> 
> 
> Diff: https://reviews.apache.org/r/66711/diff/1/
> 
> 
> Testing
> -------
> 
> `ninja` on Windows (no target arguments); now the `jemalloc` configuration step is entirely skipped. Previously it resulted in:
> 
> ```
> FAILED: 3rdparty/jemalloc-5.0.1/src/jemalloc-5.0.1-stamp/jemalloc-5.0.1-configure
> cmd.exe /C "cd /D C:\Users\andschwa\src\mesos\build\master\3rdparty\jemalloc-5.0.1\src\jemalloc-5.0.1-build && C:\Users\andschwa\src\mesos\build\master\3rdparty\jemalloc-5.0.1\src\jemalloc-5.0.1\configure --enable-stats --enable-prof --with-malloc-conf=prof:true,prof_active:false && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/Users/andschwa/src/mesos/build/master/3rdparty/jemalloc-5.0.1/src/jemalloc-5.0.1-stamp/jemalloc-5.0.1-configure"
> ```
> 
> Please correct me if I'm wrong about this.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>