mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.35k stars 1.33k forks source link

Unable to compile on Ubuntu 18.04 and gcc 7.5.0 #16575

Closed AAverin closed 3 years ago

AAverin commented 3 years ago

Platform: Ubuntu 18.04 Mapbox SDK version:

Steps to trigger behavior

Following all the development steps, I get a compilation error:

c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
CMakeFiles/mbgl-core.dir/build.make:107: recipe for target 'CMakeFiles/mbgl-core.dir/src/mbgl/annotation/annotation_manager.cpp.o' failed
make[2]: *** [CMakeFiles/mbgl-core.dir/src/mbgl/annotation/annotation_manager.cpp.o] Error 4
CMakeFiles/Makefile2:1238: recipe for target 'CMakeFiles/mbgl-core.dir/all' failed
make[1]: *** [CMakeFiles/mbgl-core.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
make: *** [all] Error 2
AAverin commented 3 years ago

Happens on both next and old build systems.

[16/376] Building CXX object CMakeFiles/mbgl-core.dir/src/mbgl/annotation/annotation_manager.cpp.o
FAILED: CMakeFiles/mbgl-core.dir/src/mbgl/annotation/annotation_manager.cpp.o
/usr/bin/c++ -DMBGL_RENDER_BACKEND_OPENGL=1 -DRAPIDJSON_HAS_STDSTRING=1 -DTEST_RUNNER_ROOT_PATH=\"/srv/.../mapbox-gl-native\" -I../../../include -I../../../src -I../../../platform/default/include -I../../../platform/linux -I../../../mason_packages/linux-x86_64/libpng/1.6.25/include/libpng16 -I../../../mason_packages/linux-x86_64/libjpeg-turbo/1.5.0/include -I../../../mason_packages/linux-x86_64/icu/63.1-min-static-data/include -isystem ../../../vendor/earcut.hpp/include -isystem ../../../vendor/eternal/include -isystem ../../../vendor/geojson-vt-cpp/include -isystem ../../../vendor/shelf-pack-cpp/include -isystem ../../../vendor/unique_resource -isystem ../../../vendor/wagyu/include -isystem ../../../vendor/boost/include -isystem ../../../vendor/mapbox-base/extras/args -isystem ../../../vendor/mapbox-base/extras/expected-lite/include -isystem ../../../vendor/mapbox-base/extras/filesystem/include -isystem ../../../vendor/mapbox-base/extras/kdbush.hpp/include -isystem ../../../vendor/mapbox-base/extras/rapidjson/include -isystem ../../../vendor/mapbox-base/mapbox/geojson.hpp/include -isystem ../../../vendor/mapbox-base/mapbox/geometry.hpp/include -isystem ../../../vendor/mapbox-base/mapbox/jni.hpp/include -isystem ../../../vendor/mapbox-base/mapbox/optional -isystem ../../../vendor/mapbox-base/mapbox/pixelmatch-cpp/include -isystem ../../../vendor/mapbox-base/mapbox/supercluster.hpp/include -isystem ../../../vendor/mapbox-base/mapbox/variant/include -isystem ../../../vendor/mapbox-base/mapbox/weak/include -isystem ../../../vendor/mapbox-base/mapbox/typewrapper/include -isystem ../../../vendor/mapbox-base/mapbox/value/include -isystem ../../../vendor/polylabel/include -isystem ../../../vendor/protozero/include -isystem ../../../vendor/vector-tile/include -isystem ../../../vendor/nunicode/include -Werror -ftemplate-depth=1024 -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wno-variadic-macros -Wno-unknown-pragmas -fno-rtti -fext-numeric-literals -g -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++14 -MD -MT CMakeFiles/mbgl-core.dir/src/mbgl/annotation/annotation_manager.cpp.o -MF CMakeFiles/mbgl-core.dir/src/mbgl/annotation/annotation_manager.cpp.o.d -o CMakeFiles/mbgl-core.dir/src/mbgl/annotation/annotation_manager.cpp.o -c ../../../src/mbgl/annotation/annotation_manager.cpp
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
ninja: build stopped: subcommand failed.
Makefile:424: recipe for target 'offline' failed
AAverin commented 3 years ago

Similar error on gcc-10

[  6%] Building CXX object CMakeFiles/mbgl-core.dir/src/mbgl/annotation/annotation_manager.cpp.o
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
CMakeFiles/mbgl-core.dir/build.make:107: recipe for target 'CMakeFiles/mbgl-core.dir/src/mbgl/annotation/annotation_manager.cpp.o' failed
make[2]: *** [CMakeFiles/mbgl-core.dir/src/mbgl/annotation/annotation_manager.cpp.o] Error 1
CMakeFiles/Makefile2:1238: recipe for target 'CMakeFiles/mbgl-core.dir/all' failed
make[1]: *** [CMakeFiles/mbgl-core.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
make: *** [all] Error 2
AAverin commented 3 years ago

The issue seems to be related to OOM when there is not enough RAM available. What are the minimal requirements?