utensils / docker-opengl

Multi-Arch Docker - Mesa 3D OpenGL Software Rendering (Gallium) - LLVMpipe, and OpenSWR Drivers
MIT License
82 stars 33 forks source link

Make build error #4

Closed adamwhitson closed 4 years ago

adamwhitson commented 4 years ago

Running the "make stable" command to build this image hangs on step 5/16 for a long time on the very first line of this snippet and then errors out in the following lines

CXX rasterizer/core/backends/libswrAVX2_la-gen_rasterizer0.lo g++: fatal error: Killed signal terminated program cc1plus compilation terminated. make[5]: *** [Makefile:3374: rasterizer/core/libswrAVX2_la-backend_sample.lo] Error 1 make[5]: *** Waiting for unfinished jobs.... In file included from ./rasterizer/core/format_conversion.h:28, from rasterizer/memory/StoreTile.h:34, from rasterizer/memory/StoreTile_TileY.cpp:28: ./rasterizer/core/format_types.h: In lambda function: ./rasterizer/core/format_types.h:1416:26: warning: array subscript 4 is above array bounds of 'const uint32_t [4]' {aka 'const unsigned int [4]'} [-Warray-bounds] return MyBpc[comp]; ^ ./rasterizer/core/format_types.h:1404:29: warning: array subscript 4 is above array bounds of 'const SWR_TYPE [4]' [-Warray-bounds] return CompType[comp]; ^ ./rasterizer/core/format_types.h: In lambda function: ./rasterizer/core/format_types.h:1416:26: warning: array subscript 4 is above array bounds of 'const uint32_t [4]' {aka 'const unsigned int [4]'} [-Warray-bounds] return MyBpc[comp]; ^ ./rasterizer/core/format_types.h:1404:29: warning: array subscript 4 is above array bounds of 'const SWR_TYPE [4]' [-Warray-bounds] return CompType[comp]; ^ ./rasterizer/core/format_types.h: In lambda function: ./rasterizer/core/format_types.h:1416:26: warning: array subscript 4 is above array bounds of 'const uint32_t [4]' {aka 'const unsigned int [4]'} [-Warray-bounds] return MyBpc[comp]; ^ ./rasterizer/core/format_types.h:1404:29: warning: array subscript 4 is above array bounds of 'const SWR_TYPE [4]' [-Warray-bounds] return CompType[comp]; ^ make[4]: *** [Makefile:1892: all] Error 2 make[5]: Leaving directory '/var/tmp/build/mesa/src/gallium/drivers/swr' make[4]: Leaving directory '/var/tmp/build/mesa/src/gallium/drivers/swr' make[3]: *** [Makefile:633: all-recursive] Error 1 make[3]: Leaving directory '/var/tmp/build/mesa/src/gallium' make[2]: *** [Makefile:897: all-recursive] Error 1 make[2]: Leaving directory '/var/tmp/build/mesa/src' make[1]: *** [Makefile:682: all] Error 2 make[1]: Leaving directory '/var/tmp/build/mesa/src' make: *** [Makefile:694: all-recursive] Error 1 The command '/bin/sh -c set -xe; cd /var/tmp/build/mesa; git checkout mesa-${MESA_VERSION}; libtoolize; autoreconf --install; ./configure --enable-glx=gallium-xlib --with-gallium-drivers=swrast,swr --disable-dri --disable-gbm --disable-egl --enable-gallium-osmesa --enable-autotools --enable-llvm --with-llvm-prefix=/usr/lib/llvm7/ --prefix=/usr/local; make -j$(getconf _NPROCESSORS_ONLN); make install;' returned a non-zero code: 2 make: *** [19.0.8] Error 2

I did not make any changes to the Dockerfile or Makefile, I just cloned the repo and in terminal in that folder, ran the 'make stable' command. Not sure if it has anything to do with the Mesa version being checked out or not

jamesbrink commented 4 years ago

Sorry for late response, this appears to me like its simply a lack of resources on build machine

Killed signal terminated program cc1plus

@adamwhitson if you are using docker for macOS, try giving the docker VM more memory. The alternative would be for us to disable the concurrent build, but this still will not guarantee memory won't be exhausted. This is very typical in nodejs builds, and even more so haskell builds... when memory is exhausted you will simply see an error like the above.

adamwhitson commented 4 years ago

No worries @jamesbrink . I appreciate you taking the time to respond. I will give that a try. Thanks!

jamesbrink commented 4 years ago

@adamwhitson I will close the issue, but if you find that low memory is not the case, or if others feel we should adjust the build and remove the concurrency feel free to re-open this issue and we can make those changes. The concurrency speeds up the build but I will also do a quick comparison for each, or maybe make it optional to build concurrently