Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Mapbox GL Native on Linux-Build from Source  #9614

Closed

Description

@vans88

Hello Everyone, I wanna build mapbox-gl-native from source code. But I encountered the following error. I have cloned the code from github and the version is "5.0.2". I will show you the related dependencies as follows:

Related Dependencies:

os: unbutu 14.04.5
kernel: 4.2.0-27-generic
mapbox-gl-native 5.0.2
gcc 5.4.0
cmake 3.8.2
node v5.0.0
npm 3.3.6
crul 7.54

All dependencies are meet the requirement "Installing dependencies " in article:
https://github.com/mapbox/mapbox-gl-native/blob/master/INSTALL.md

My Error info

vans@ubuntu:~/mapbox-gl-native$ pwd
/home/vans/mapbox-gl-native
vans@ubuntu:~/mapbox-gl-native$ make
mkdir -p build/linux-x86_64/Debug
(cd build/linux-x86_64/Debug && cmake -G Ninja ../../.. \
                -DCMAKE_BUILD_TYPE=Debug \
                -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
                -DWITH_CXX11ABI=OFF \
                -DWITH_COVERAGE= \
                -DWITH_OSMESA= \
                -DWITH_EGL=)
-- Updating submodules...
-- Running 'npm install' for mapbox-gl-js...
-- Downloading: https://nodejs.org/download/release/v5.0.0/SHASUMS256.txt
CMake Error at cmake/NodeJS.cmake:52 (message):
  Unable to download checksum file from
  https://nodejs.org/download/release/v5.0.0/SHASUMS256.txt: NOTFOUND
Call Stack (most recent call first):
  cmake/NodeJS.cmake:267 (download_file)
  cmake/node.cmake:3 (nodejs_init)
  CMakeLists.txt:108 (include)

-- Configuring incomplete, errors occurred!
See also "/home/vans/mapbox-gl-native/build/linux-x86_64/Debug/CMakeFiles/CMakeOutput.log".
make: *** [build/linux-x86_64/Debug/build.ninja] Error 1

maybe help

At first glance it looks like curl, but at the command line execute
curl https://nodejs.org/download/release/v5.0.0/SHASUMS256.txt. The result is successfully and I can obtain the file SHASUM256.txt.

code fragment from NodeJS.cmake

# Download with a bit of nice output (without spewing progress)
 41 function(download_file DESCRIPTION URL FILE)
 42     message(STATUS "Downloading: ${URL}")
 43     file(DOWNLOAD
 44         ${URL}
 45         ${FILE}.tmp
 46         ${ARGN}
 47         STATUS RESULT
 48     )
 49     list(GET RESULT 0 STATUS)
 50     if(STATUS)
 51         list(GET result 1 MESSAGE)
 52         message(FATAL_ERROR "Unable to download ${DESCRIPTION} from ${URL}: ${MESSAGE}")
 53     else()
 54         file(RENAME ${FILE}.tmp ${FILE})
 55     endif()
 56 endfunction()

for help

Anyone can tell me some tips about my error ? Many Thanks!

source code link:

https://github.com/mapbox/mapbox-gl-native

Activity

  1. vans88 commented on Jul 27, 2017

    @vans88
    Author

    CMakeOutput.txt
    For generating Makefile again, I clone the code again. and run command "cmake ." The above error occurred again. Detailed information as follows:

    Error info:

    cmake .
    -- The CXX compiler identification is GNU 5.4.0
    -- The C compiler identification is GNU 5.4.0
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Updating submodules...
    -- Running 'npm install' for mapbox-gl-native...
    @mapbox/[email protected] /home/vans/Tools/mapbox-gl-native-5.0.2
    ├─┬ [email protected]
    │ ├─┬ [email protected]
    │ │ ├── [email protected]
    │ │ ├── [email protected]
    │ │ └── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├─┬ [email protected]
    │ │ └── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ └── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├─┬ [email protected]
    │ ├─┬ [email protected]
    │ │ └── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├─┬ [email protected]
    │ │ └── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├─┬ [email protected]
    │ │ ├── [email protected]
    │ │ └── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├─┬ [email protected]
    │ │ └── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├─┬ [email protected]
    │ │ ├── [email protected]
    │ │ └── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├─┬ [email protected]
    │ │ ├── [email protected]
    │ │ ├── [email protected]
    │ │ ├── [email protected]
    │ │ └── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├─┬ [email protected]
    │ │ └── [email protected]
    │ ├── [email protected]
    │ └── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├─┬ [email protected]
    │ ├─┬ [email protected]
    │ │ └── [email protected]
    │ ├─┬ [email protected]
    │ │ ├── [email protected]
    │ │ └─┬ [email protected]
    │ │   ├── [email protected]
    │ │   └── [email protected]
    │ ├─┬ [email protected]
    │ │ ├─┬ [email protected]
    │ │ │ └── [email protected]
    │ │ ├── [email protected]
    │ │ ├─┬ [email protected]
    │ │ │ ├── [email protected]
    │ │ │ ├── [email protected]
    │ │ │ ├── [email protected]
    │ │ │ ├── [email protected]
    │ │ │ ├─┬ [email protected]
    │ │ │ │ ├── [email protected]
    │ │ │ │ └─┬ [email protected]
    │ │ │ │   └── [email protected]
    │ │ │ ├─┬ [email protected]
    │ │ │ │ └── [email protected]
    │ │ │ └── [email protected]
    │ │ └── [email protected]
    │ ├─┬ [email protected]
    │ │ ├── [email protected]
    │ │ ├── [email protected]
    │ │ ├── [email protected]
    │ │ └── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├─┬ [email protected]
    │ │ ├── [email protected]
    │ │ └─┬ [email protected]
    │ │   └── [email protected]
    │ └─┬ [email protected]
    │   ├── [email protected]
    │   ├── [email protected]
    │   ├─┬ [email protected]
    │   │ └── [email protected]
    │   ├─┬ [email protected]
    │   │ ├── [email protected]
    │   │ ├── [email protected]
    │   │ ├── [email protected]
    │   │ └── [email protected]
    │   └── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├─┬ [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├─┬ [email protected]
    │ │ └── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├─┬ [email protected]
    │ │ └── [email protected]
    │ ├─┬ [email protected]
    │ │ ├─┬ [email protected]
    │ │ │ ├── [email protected]
    │ │ │ └─┬ [email protected]
    │ │ │   └── [email protected]
    │ │ └── [email protected]
    │ ├─┬ [email protected]
    │ │ ├── [email protected]
    │ │ ├── [email protected]
    │ │ ├── [email protected]
    │ │ └── [email protected]
    │ ├─┬ [email protected]
    │ │ ├── [email protected]
    │ │ ├─┬ [email protected]
    │ │ │ ├── [email protected]
    │ │ │ ├── [email protected]
    │ │ │ ├── [email protected]
    │ │ │ └── [email protected]
    │ │ └─┬ [email protected]
    │ │   ├── [email protected]
    │ │   ├── [email protected]
    │ │   ├── [email protected]
    │ │   ├─┬ [email protected]
    │ │   │ └── [email protected]
    │ │   ├── [email protected]
    │ │   ├─┬ [email protected]
    │ │   │ └── [email protected]
    │ │   ├── [email protected]
    │ │   └── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├─┬ [email protected]
    │ │ └── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├─┬ [email protected]
    │ │ └── [email protected]
    │ ├── [email protected]
    │ └── [email protected]
    └─┬ [email protected]
      ├── [email protected]
      ├── [email protected]
      ├─┬ [email protected]
      │ └── [email protected]
      ├── [email protected]
      ├─┬ [email protected]
      │ ├── [email protected]
      │ ├── [email protected]
      │ ├─┬ [email protected]
      │ │ └─┬ [email protected]
      │ │   ├── [email protected]
      │ │   └── [email protected]
      │ └── [email protected]
      ├── [email protected]
      ├── [email protected]
      ├── [email protected]
      ├── [email protected]
      ├─┬ [email protected]
      │ └── [email protected]
      ├── [email protected]
      ├─┬ [email protected]
      │ ├─┬ [email protected]
      │ │ ├── [email protected]
      │ │ └── [email protected]
      │ └─┬ [email protected]
      │   ├─┬ [email protected]
      │   │ ├── [email protected]
      │   │ └── [email protected]
      │   ├── [email protected]
      │   └── [email protected]
      └── [email protected]
    
    -- Running 'npm install' for mapbox-gl-js...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/geometry/0.9.0.tar.gz...
    [Mason] Unpacking package to mason_packages/headers/geometry/0.9.0...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/variant/1.1.4.tar.gz...
    [Mason] Unpacking package to mason_packages/headers/variant/1.1.4...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/unique_resource/cba309e.tar.gz...
    [Mason] Unpacking package to mason_packages/headers/unique_resource/cba309e...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/rapidjson/1.1.0.tar.gz...
    [Mason] Unpacking package to mason_packages/headers/rapidjson/1.1.0...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/boost/1.62.0.tar.gz...
    [Mason] Unpacking package to mason_packages/headers/boost/1.62.0...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/geojsonvt/6.2.0.tar.gz...
    [Mason] Unpacking package to mason_packages/headers/geojsonvt/6.2.0...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/supercluster/0.2.0-1.tar.gz...
    [Mason] Unpacking package to mason_packages/headers/supercluster/0.2.0-1...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/kdbush/0.1.1-1.tar.gz...
    [Mason] Unpacking package to mason_packages/headers/kdbush/0.1.1-1...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/earcut/0.12.1.tar.gz...
    [Mason] Unpacking package to mason_packages/headers/earcut/0.12.1...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/protozero/1.4.2.tar.gz...
    [Mason] Unpacking package to mason_packages/headers/protozero/1.4.2...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/pixelmatch/0.10.0.tar.gz...
    [Mason] Unpacking package to mason_packages/headers/pixelmatch/0.10.0...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/geojson/0.4.0.tar.gz...
    [Mason] Unpacking package to mason_packages/headers/geojson/0.4.0...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/polylabel/1.0.2.tar.gz...
    [Mason] Unpacking package to mason_packages/headers/polylabel/1.0.2...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/linux-x86_64/glfw/2017-02-09-77a8f10.tar.gz...
    [Mason] Unpacking package to mason_packages/linux-x86_64/glfw/2017-02-09-77a8f10...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/linux-x86_64/mesa/13.0.4.tar.gz...
    [Mason] Unpacking package to mason_packages/linux-x86_64/mesa/13.0.4...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/linux-x86_64/boost_libprogram_options/1.62.0.tar.gz...
    [Mason] Unpacking package to mason_packages/linux-x86_64/boost_libprogram_options/1.62.0...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/linux-x86_64/sqlite/3.14.2.tar.gz...
    [Mason] Unpacking package to mason_packages/linux-x86_64/sqlite/3.14.2...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/linux-x86_64/libuv/1.9.1.tar.gz...
    [Mason] Unpacking package to mason_packages/linux-x86_64/libuv/1.9.1...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/linux-x86_64/nunicode/1.7.1.tar.gz...
    [Mason] Unpacking package to mason_packages/linux-x86_64/nunicode/1.7.1...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/linux-x86_64/libpng/1.6.25.tar.gz...
    [Mason] Unpacking package to mason_packages/linux-x86_64/libpng/1.6.25...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/linux-x86_64/libjpeg-turbo/1.5.0.tar.gz...
    [Mason] Unpacking package to mason_packages/linux-x86_64/libjpeg-turbo/1.5.0...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/linux-x86_64/webp/0.5.1.tar.gz...
    [Mason] Unpacking package to mason_packages/linux-x86_64/webp/0.5.1...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/linux-x86_64/gtest/1.8.0.tar.gz...
    [Mason] Unpacking package to mason_packages/linux-x86_64/gtest/1.8.0...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/linux-x86_64/benchmark/1.0.0-1.tar.gz...
    [Mason] Unpacking package to mason_packages/linux-x86_64/benchmark/1.0.0-1...
    [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/linux-x86_64/icu/58.1-min-size.tar.gz...
    [Mason] Unpacking package to mason_packages/linux-x86_64/icu/58.1-min-size...
    -- Downloading: https://nodejs.org/download/release/v5.0.0/SHASUMS256.txt
    CMake Error at cmake/NodeJS.cmake:52 (message):
      Unable to download checksum file from
      https://nodejs.org/download/release/v5.0.0/SHASUMS256.txt: NOTFOUND
    Call Stack (most recent call first):
      cmake/NodeJS.cmake:267 (download_file)
      cmake/node.cmake:3 (nodejs_init)
      CMakeLists.txt:108 (include)
    
    
    -- Configuring incomplete, errors occurred!
    See also "/home/vans/Tools/mapbox-gl-native-5.0.2/CMakeFiles/CMakeOutput.log".
    

    CMakeOutput.log

    This log in attachment.

  2. vans88 commented on Jul 27, 2017

    @vans88
    Author

    Why I can obtain the file SHASUM256.txt? Anyone can give some suggestions about the above error? In command line I cat get this file easily. but I don't know which directory to place this file.

    curl https://nodejs.org/download/release/v5.0.0/SHASUMS256.txt -o sum.txt
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2480    0  2480    0     0   1521      0 --:--:--  0:00:01 --:--:--  1520
    
  3. kkaefer commented on Jul 28, 2017

    @kkaefer
    Member

    Given that you can download the SHASUM file with curl, I suspect that your version of CMake is compiled without SSL support. Please upgrade to a new version of CMake that does have SSL support.

  4. vans88 commented on Jul 29, 2017

    @vans88
    Author

    @kkaefer Thank you very much for your suggestion. I recompile the cmake from scratch and could download the SHASUM file this time. but There is a new error about gtest shown as follows.
    make.txt

    Part of Error info

    CMakeFiles/mbgl-test.dir/test/util/number_conversions.test.cpp.o:/home/vans/mapbox-gl-native/build/linux-x86_64/Debug/../../../mason_packages/linux-x86_64/gtest/1.8.0/include/gtest/gtest.h:1382: more undefined references to `testing::internal::EqFailure(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)' follow
    CMakeFiles/mbgl-test.dir/test/util/run_loop.test.cpp.o: In function `RunLoop_MultipleRun_Test::TestBody()':
    /home/vans/mapbox-gl-native/build/linux-x86_64/Debug/../../../test/util/run_loop.test.cpp:51: undefined reference to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)'
    CMakeFiles/mbgl-test.dir/test/util/thread.test.cpp.o: In function `Thread_ExecutesAfter_Test::TestBody()':
    /home/vans/mapbox-gl-native/build/linux-x86_64/Debug/../../../test/util/thread.test.cpp:160: undefined reference to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)'
    /home/vans/mapbox-gl-native/build/linux-x86_64/Debug/../../../test/util/thread.test.cpp:161: undefined reference to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)'
    CMakeFiles/mbgl-test.dir/test/util/thread.test.cpp.o: In function `Thread_WorkRequestDeletionWaitsForWorkToComplete_Test::TestBody()':
    

    initial analysis

    Why there are so many “undefined reference” Error? more detailed information in make.txt

    some deb package with keywords “gtest”

    vans@ubuntu:~/mapbox-gl-native$ apt-cache search gtest
    autopkgtest - automatic as-installed testing for Debian packages
    gtester2xunit - Helper for converting gtester xml output to xunit.
    libgtest-dev - Google's framework for writing C++ tests - header files
    libxorg-gtest-data - X.Org dummy testing environment for Google Test - data
    libxorg-gtest-dev - X.Org dummy testing environment for Google Test - headers
    libxorg-gtest-doc - X.org dummy testing environment for Google Test - documentation
    autopkgtest-xenlvm - autopkgtest Xen/LVM2 based testbed snapshot system
    gnome-desktop-testing - runner for GNOME installed tests
    libdist-zilla-plugin-podspellingtests-perl - release tests for POD spelling
    lxc-tests - Linux Containers userspace tools (test binaries)
    
  5. tobrun commented on Jul 29, 2017

    @tobrun
    Member

    @vans88,
    gtest refers to libgtest-dev - Google's framework for writing C++ tests - header files.

  6. tobrun commented on Jul 29, 2017

    @tobrun
    Member

    FWIW, I'm not seeing those undefined reference errors on my build.
    This is my output:

    tvn@tvn:~/Mapbox/mapbox-gl-native$ make 
    mkdir -p build/linux-x86_64/Debug
    (cd build/linux-x86_64/Debug && cmake -G Ninja ../../.. \
    	-DCMAKE_BUILD_TYPE=Debug \
    	-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
    	-DWITH_CXX11ABI=ON \
    	-DWITH_COVERAGE= \
    	-DWITH_OSMESA= \
    	-DWITH_EGL=)
    -- The CXX compiler identification is GNU 5.4.0
    -- The C compiler identification is GNU 5.4.0
    -- Check for working CXX compiler using: Ninja
    -- Check for working CXX compiler using: Ninja -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Check for working C compiler using: Ninja
    -- Check for working C compiler using: Ninja -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Updating submodules...
    -- Downloading: https://nodejs.org/download/release/v4.8.3/SHASUMS256.txt
    -- NodeJS: Using node, version v4.8.3
    -- Downloading: https://nodejs.org/download/release/v4.8.3/node-v4.8.3-headers.tar.gz
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/tvn/Mapbox/mapbox-gl-native/build/linux-x86_64/Debug
    platform/linux/ninja  -j8 -C build/linux-x86_64/Debug mbgl-test
    ninja: Entering directory `build/linux-x86_64/Debug'
    [30/329] Building C object CMakeFiles/...l-core.dir/src/parsedate/parsedate.c.o
    cc1: warning: command line option ‘-fvisibility-inlines-hidden’ is valid for C++/ObjC++ but not for C
    [329/329] Linking CXX executable mbgl-test
    ``
    
  7. vans88 commented on Jul 30, 2017

    @vans88
    Author

    @tobrun @kkaefer Many Thanks for your tips on my compiling “mapbox-gl-native” from scratch。This morning I have installed libgtest-dev deb package. But I found there is a gtest directory which generated by compiling process in mapbox-gl-native DIR. And the directory structure here(mapbox-gl-native SOURCE dir)is almost the same as the directory structure that is generated after the package libgtest-dev is installed.

    gtest directory in mapbox-gl-native

    vans@ubuntu:~/mapbox-gl-native$ find . -type d -name gtest
    ./mason_packages/linux-x86_64/gtest
    ./mason_packages/linux-x86_64/gtest/1.8.0/include/gtest
    ./mason_packages/.binaries/linux-x86_64/gtest
    
    vans@ubuntu:~/mapbox-gl-native/mason_packages/linux-x86_64/gtest/1.8.0$ pwd
    /home/vans/mapbox-gl-native/mason_packages/linux-x86_64/gtest/1.8.0
    vans@ubuntu:~/mapbox-gl-native/mason_packages/linux-x86_64/gtest/1.8.0$ ls -R
    .:
    include  lib  mason.ini
    
    ./include:
    gtest
    
    ./include/gtest:
    gtest-death-test.h  gtest-message.h     gtest-param-test.h.pump  gtest-printers.h  gtest-spi.h        gtest-typed-test.h
    gtest.h             gtest-param-test.h  gtest_pred_impl.h        gtest_prod.h      gtest-test-part.h  internal
    
    ./include/gtest/internal:
    custom                       gtest-linked_ptr.h                 gtest-port-arch.h  gtest-tuple.h.pump
    gtest-death-test-internal.h  gtest-param-util-generated.h       gtest-port.h       gtest-type-util.h
    gtest-filepath.h             gtest-param-util-generated.h.pump  gtest-string.h     gtest-type-util.h.pump
    gtest-internal.h             gtest-param-util.h                 gtest-tuple.h
    
    ./include/gtest/internal/custom:
    gtest.h  gtest-port.h  gtest-printers.h
    
    ./lib:
    libgtest.a
    

    libgtest-dev package info

    vans@ubuntu:/usr/include/gtest$ dpkg -l | grep libgtest-dev
    ii  libgtest-dev                                          1.6.0-1ubuntu6                                      all          Google's framework for writing C++ tests - header files
    vans@ubuntu:/usr/include/gtest$ dpkg -L libgtest-dev
    /.
    /usr
    /usr/include
    /usr/include/gtest
    /usr/include/gtest/gtest-param-test.h.pump
    /usr/include/gtest/gtest-printers.h
    /usr/include/gtest/gtest_prod.h
    /usr/include/gtest/gtest-typed-test.h
    /usr/include/gtest/internal
    /usr/include/gtest/internal/gtest-port.h
    /usr/include/gtest/internal/gtest-tuple.h
    /usr/include/gtest/internal/gtest-string.h
    /usr/include/gtest/internal/gtest-param-util-generated.h
    ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... 
    

    nex step

    even though I add the two following in Makefile。The error in my last comment always exists. and @tobrun which version of your mapbox-gl-native? In my compiling, I use the version is v5.0.2

    #For mbgl-test
    export CFLAGS="-I/usr/include/gtest  -I/usr/include/gtest/internal"
    export CXXFLAGS="-I/usr/include/gtest  -I/usr/include/gtest/internal"
    

    Here I have installed package libgtest-dev. and add build flags in Makefile. I grep the keyword "GetBoolAssertionFailureMessage" and “EqFailure” and detailed info shown as follows

    grep with keywords in mapbox-gl-native source DIR

    /mason_packages/linux-x86_64/gtest/1.8.0/include/gtest/internal/gtest-internal.h:226:GTEST_API_ std::string GetBoolAssertionFailureMessage(
    ./mason_packages/linux-x86_64/gtest/1.8.0/include/gtest/internal/gtest-internal.h:1192:    fail(::testing::internal::GetBoolAssertionFailureMessage(\
    
    /mason_packages/linux-x86_64/gtest/1.8.0/include/gtest/gtest.h:1378:  return EqFailure(lhs_expression,
    ./mason_packages/linux-x86_64/gtest/1.8.0/include/gtest/gtest.h:1649:  return EqFailure(lhs_expression,
    ./mason_packages/linux-x86_64/gtest/1.8.0/include/gtest/internal/gtest-internal.h:219:GTEST_API_ AssertionResult EqFailure(const char* expected_expression,
    

    in dir generated by libgtest-dev package

    vans@ubuntu:/usr/include/gtest$ pwd
    /usr/include/gtest
    vans@ubuntu:/usr/include/gtest$ grep "EqFailure" . -rn
    ./gtest.h:1333:  return EqFailure(expected_expression,
    ./gtest.h:1581:  return EqFailure(expected_expression,
    ./internal/gtest-internal.h:274:GTEST_API_ AssertionResult EqFailure(const char* expected_expression,
    vans@ubuntu:/usr/include/gtest$ grep "GetBoolAssertionFailureMessage" . -rn
    ./internal/gtest-internal.h:281:GTEST_API_ String GetBoolAssertionFailureMessage(
    ./internal/gtest-internal.h:1182:    fail(::testing::internal::GetBoolAssertionFailureMessage(\
    
    
  8. vans88 commented on Jul 30, 2017

    @vans88
    Author

    @tobrun You just said gtest refer to libgtest-dev。 This situation puzzles me deeply and there is something wrong???
    Looking forward to your reply,Thank you!!!

  9. tobrun commented on Jul 30, 2017

    @tobrun
    Member

    I can't recall having to download gtest seperatly. I assumed it was one of the dependencies being pulled in by https://github.com/mapbox/mason. I see you mention INSTALL.md but this is the one used for all platforms, have you taken a look at the one specific for Linux here?

    re used version, I'm compiling from master.

  10. vans88 commented on Jul 30, 2017

    @vans88
    Author

    Build successfully

    @kkaefer @tobrun Many thanks for suggestions. I clone the master branch of mapbox-gl-native, and run make command again. There are no warnning and errors this time. Thanks argin and I think you can close this comment. I also upload my compiling log as an attachment.
    make.txt

    https://github.com/mapbox/mapbox-gl-native

  11. kkaefer commented on Jul 30, 2017

    @kkaefer
    Member

    Likely, you upgraded your libcxx/libstdcxx between running make the first time and subsequent runs. The first time you run it, the build system determines whether it needs to load C++11-ABI compatible dependencies, and downloads these, so upgrading the library without running make clean leads to incompatible ABIs and thus linker errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions