You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
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:
-- 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!
CMakeOutput.txt
For generating Makefile again, I clone the code again. and run command "cmake ." The above error occurred again. Detailed information as follows:
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
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.
@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)
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
``
@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
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
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
@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!!!
@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
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.
Activity
vans88 commentedon Jul 27, 2017
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:
CMakeOutput.log
This log in attachment.
vans88 commentedon Jul 27, 2017
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.
kkaefer commentedon Jul 28, 2017
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.
vans88 commentedon Jul 29, 2017
@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
initial analysis
Why there are so many “undefined reference” Error? more detailed information in make.txt
some deb package with keywords “gtest”
tobrun commentedon Jul 29, 2017
@vans88,
gtest refers to
libgtest-dev - Google's framework for writing C++ tests - header files.tobrun commentedon Jul 29, 2017
FWIW, I'm not seeing those undefined reference errors on my build.
This is my output:
vans88 commentedon Jul 30, 2017
@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
libgtest-dev package info
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
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
in dir generated by libgtest-dev package
vans88 commentedon Jul 30, 2017
@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!!!
tobrun commentedon Jul 30, 2017
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.
vans88 commentedon Jul 30, 2017
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
kkaefer commentedon Jul 30, 2017
Likely, you upgraded your libcxx/libstdcxx between running
makethe 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 runningmake cleanleads to incompatible ABIs and thus linker errors.