[ 
https://issues.apache.org/jira/browse/MESOS-6814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alex Clemmer updated MESOS-6814:
--------------------------------
    Description: 
Currently compilation flags are not correctly propagated to all third-party 
dependencies, because in many of these cases, we shell out to `configure` and 
`make` on Unix, without propagating the correct flags and configuration we're 
using for the rest of the build.

For example, if you request to compile Mesos with clang:

{code}
cmake -DCMAKE_C_COMPILER=clang-3.6 -DCMAKE_CXX_COMPILER=clang++-3.6 
-DCMAKE_BUILD_TYPE=Release ..
{code}

we end up with a bunch of lines like:

{{code}}
libtool: compile:  g++ -DHAVE_CONFIG_H -I. 
-I/home/joris/projects/mesos/cmake-build/3rdparty/protobuf-2.6.1/src/protobuf-2.6.1/src/../src
 -I.. -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 
-g -DNDEBUG -MT google/protobuf/compiler/command_line_interface.lo -MD -MP -MF 
google/protobuf/compiler/.deps/command_line_interface.Tpo -c 
/home/joris/projects/mesos/cmake-build/3rdparty/protobuf-2.6.1/src/protobuf-2.6.1/src/../src/google/protobuf/compiler/command_line_interface.cc
 -o google/protobuf/compiler/command_line_interface.o >/dev/null 2>&1
{{code}}

A better solution is probably to use a CMake-based build system for these 
dependencies, or at least propagate important flags to `configure`.

Another possibility is that it actually is desired behavior to compile with GCC 
in this case. If that's true, we should develop good reasons, add them to the 
comments, and close this issue.

  was:
Currently compilation flags are not correctly propagated to all third-party 
dependencies, because in many of these cases, we shell out to `configure` and 
`make` on Unix, without propagating the correct flags and configuration we're 
using for the rest of the build.

For example, if you request to compile Mesos with clang:

{{code}}
cmake -DCMAKE_C_COMPILER=clang-3.6 -DCMAKE_CXX_COMPILER=clang++-3.6 
-DCMAKE_BUILD_TYPE=Release ..
{{/code}}

we end up with a bunch of lines like:

{{code}}
libtool: compile:  g++ -DHAVE_CONFIG_H -I. 
-I/home/joris/projects/mesos/cmake-build/3rdparty/protobuf-2.6.1/src/protobuf-2.6.1/src/../src
 -I.. -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 
-g -DNDEBUG -MT google/protobuf/compiler/command_line_interface.lo -MD -MP -MF 
google/protobuf/compiler/.deps/command_line_interface.Tpo -c 
/home/joris/projects/mesos/cmake-build/3rdparty/protobuf-2.6.1/src/protobuf-2.6.1/src/../src/google/protobuf/compiler/command_line_interface.cc
 -o google/protobuf/compiler/command_line_interface.o >/dev/null 2>&1
{{code}}

A better solution is probably to use a CMake-based build system for these 
dependencies, or at least propagate important flags to `configure`.

Another possibility is that it actually is desired behavior to compile with GCC 
in this case. If that's true, we should develop good reasons, add them to the 
comments, and close this issue.


> Make sure compilation configuration is propagated correctly to third party 
> dependencies
> ---------------------------------------------------------------------------------------
>
>                 Key: MESOS-6814
>                 URL: https://issues.apache.org/jira/browse/MESOS-6814
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Alex Clemmer
>            Assignee: Alex Clemmer
>              Labels: cmake, microsoft
>
> Currently compilation flags are not correctly propagated to all third-party 
> dependencies, because in many of these cases, we shell out to `configure` and 
> `make` on Unix, without propagating the correct flags and configuration we're 
> using for the rest of the build.
> For example, if you request to compile Mesos with clang:
> {code}
> cmake -DCMAKE_C_COMPILER=clang-3.6 -DCMAKE_CXX_COMPILER=clang++-3.6 
> -DCMAKE_BUILD_TYPE=Release ..
> {code}
> we end up with a bunch of lines like:
> {{code}}
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. 
> -I/home/joris/projects/mesos/cmake-build/3rdparty/protobuf-2.6.1/src/protobuf-2.6.1/src/../src
>  -I.. -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare 
> -O2 -g -DNDEBUG -MT google/protobuf/compiler/command_line_interface.lo -MD 
> -MP -MF google/protobuf/compiler/.deps/command_line_interface.Tpo -c 
> /home/joris/projects/mesos/cmake-build/3rdparty/protobuf-2.6.1/src/protobuf-2.6.1/src/../src/google/protobuf/compiler/command_line_interface.cc
>  -o google/protobuf/compiler/command_line_interface.o >/dev/null 2>&1
> {{code}}
> A better solution is probably to use a CMake-based build system for these 
> dependencies, or at least propagate important flags to `configure`.
> Another possibility is that it actually is desired behavior to compile with 
> GCC in this case. If that's true, we should develop good reasons, add them to 
> the comments, and close this issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to