mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bannier (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-9114) cmake build is broken on macos
Date Thu, 26 Jul 2018 23:08:00 GMT

    [ https://issues.apache.org/jira/browse/MESOS-9114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559030#comment-16559030
] 

Benjamin Bannier commented on MESOS-9114:
-----------------------------------------

I did some more digging here. The generated files look identical, and so do manually extracted
tarballs. That made we suspect the cmake code doing the rename of the extracted directory
structure, [https://github.com/Kitware/CMake/blob/e500d6074112c975c96678c0c5f38a2b7e9718b6/Modules/ExternalProject.cmake#L1561-L1566]
{code:java}
message(STATUS \"extracting... [rename]\")
file(REMOVE_RECURSE \${directory})
get_filename_component(contents \${contents} ABSOLUTE)
file(RENAME \${contents} \${directory})
{code}

This extracts the tarball and then moves its content to the final contents. This step fails.

Cmake seems to have an issue with our tarball.

If I extract the tarball, make the top-level directory group-writable, and repackage, the
contents end up in the expected location (no additional subdirectory under {{src/}}) and the
code builds fine with the patch from the description on both macos and linux.

{code}
$ tar xf /SRC/mesos/3rdparty/rapidjson-1.1.0.tar.gz
$ ls -ld rapidjson-1.1.0
drwxr-xr-x. 3 bbannier bbannier 160 Jul 19 02:15 rapidjson-1.1.0
$ chmod g+w rapidjson-1.1.0
$ tar czf rapidjson-1.1.0.tar.gz rapidjson-1.1.0
$ mv rapidjson-1.1.0.tar.gz /SRC/mesos/3rdparty/rapidjson-1.1.0.tar.gz
{code}

> cmake build is broken on macos
> ------------------------------
>
>                 Key: MESOS-9114
>                 URL: https://issues.apache.org/jira/browse/MESOS-9114
>             Project: Mesos
>          Issue Type: Bug
>    Affects Versions: 1.7.0
>         Environment: macos-10.13.6
>            Reporter: Benjamin Bannier
>            Priority: Major
>
> Since the changes for MESOS-9092 have landed it seems impossible to perform a cmake-based
build on macos. This seems independent of the used generator and both {{make}} and {{ninja}}-based
builds appear broken, e.g.,
> {noformat}
> # cmake ~/src/mesos
> # make stout-tests
> ...
>  87%] Building CXX object 3rdparty/stout/tests/CMakeFiles/stout-tests.dir/uuid_tests.cpp.o
> In file included from /Users/bbannier/src/mesos/3rdparty/stout/tests/json_tests.cpp:24:
> In file included from /Users/bbannier/src/mesos/3rdparty/stout/include/stout/json.hpp:41:
> /Users/bbannier/src/mesos/3rdparty/stout/include/stout/jsonify.hpp:36:10: fatal error:
'rapidjson/stringbuffer.h' file not found
> #include <rapidjson/stringbuffer.h>
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~
> ...
> {noformat}
> As a workaround I can apply the following patch,
> {code}
> diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
> index 9b0dfe0ab..b244267e8 100644
> --- a/3rdparty/CMakeLists.txt
> +++ b/3rdparty/CMakeLists.txt
> @@ -440,9 +440,7 @@ EXTERNAL(rapidjson ${RAPIDJSON_VERSION} ${CMAKE_CURRENT_BINARY_DIR})
>  add_library(rapidjson INTERFACE)
>  add_dependencies(rapidjson ${RAPIDJSON_TARGET})
> -target_include_directories(
> -    rapidjson INTERFACE
> -    ${RAPIDJSON_ROOT}/rapidjson-${RAPIDJSON_VERSION}/include)
> +target_include_directories(rapidjson INTERFACE ${RAPIDJSON_ROOT}/include)
>  ExternalProject_Add(
>    ${RAPIDJSON_TARGET}
> {code}
> This however seems to break cmake-based builds on Linux.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message