question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compile FAILED in docker environment.

See original GitHub issue

Describe the bug

Hello, i met compile problem using official docker environment.

Host: Mac OS Big Sur 11.2.3 Doris version: commit e7a6d659a9525a1ac4a403d9fc07d3b7addadf70 (HEAD -> master, origin/master, origin/HEAD) Docker Image : apachedoris/doris-dev:build-env-1.3

Launch docker:

docker run -it -v /Users/xxx/.m2:/root/.m2 -v ~/IdeaProjects/incubator-doris:/root/incubator-doris apachedoris/doris-dev:build-env-1.3

Run build script:

[root@2da2f96a4588 incubator-doris]# sh build.sh

Error Info:

Python 2.7.5
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/share/maven
Java version: 11.0.10, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-11.0.10.0.9-0.el7_9.x86_64
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "5.10.25-linuxkit", arch: "amd64", family: "unix"
cmake version 3.19.4

CMake suite maintained and supported by Kitware (kitware.com/cmake).
1.10.2
/root/incubator-doris/env.sh: line 130: ccache: command not found
Get params:
    BUILD_BE            -- 1
    BUILD_FE            -- 1
    BUILD_UI            -- 1
    BUILD_SPARK_DPP     -- 1
    CLEAN               -- 0
    RUN_UT              -- 0
    WITH_MYSQL          -- OFF
    WITH_LZO            -- OFF
    GLIBC_COMPATIBILITY -- ON

Build generated code
make -C script
make[1]: Entering directory `/root/incubator-doris/gensrc/script'
/root/incubator-doris/gensrc/script/gen_build_version.sh
make[1]: Leaving directory `/root/incubator-doris/gensrc/script'
make -C proto
make[1]: Entering directory `/root/incubator-doris/gensrc/proto'
/var/local/thirdparty/installed/bin/protoc --proto_path=/root/incubator-doris/gensrc/proto --cpp_out=/root/incubator-doris/gensrc/proto/../build//gen_cpp /root/incubator-doris/gensrc/proto/internal_service.proto
/var/local/thirdparty/installed/bin/protoc --proto_path=/root/incubator-doris/gensrc/proto --cpp_out=/root/incubator-doris/gensrc/proto/../build//gen_cpp /root/incubator-doris/gensrc/proto/palo_internal_service.proto
make[1]: Leaving directory `/root/incubator-doris/gensrc/proto'
make -C thrift
make[1]: Entering directory `/root/incubator-doris/gensrc/thrift'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/incubator-doris/gensrc/thrift'
Build Backend: Release
-- GLIBC_COMPATIBILITY is ON
-- Build type is RELEASE
-- Build target arch is x86_64
-- make test: OFF
-- GCC version is greater than 7.3.0, disable -Werror. Be careful with compile warnings.
-- defined PIC_LIB_PATH
-- build gensrc if necessary
make: Entering directory `/root/incubator-doris/gensrc'
make -C script
make[1]: Entering directory `/root/incubator-doris/gensrc/script'
/root/incubator-doris/gensrc/script/gen_build_version.sh
make[1]: Leaving directory `/root/incubator-doris/gensrc/script'
make -C proto
make[1]: Entering directory `/root/incubator-doris/gensrc/proto'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/incubator-doris/gensrc/proto'
make -C thrift
make[1]: Entering directory `/root/incubator-doris/gensrc/thrift'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/incubator-doris/gensrc/thrift'
make: Leaving directory `/root/incubator-doris/gensrc'
-- Compiler Flags:  -Wall -Wno-sign-compare -Wno-unknown-pragmas -pthread -fno-strict-aliasing -fno-omit-frame-pointer -std=gnu++17 -D__STDC_FORMAT_MACROS -Wno-deprecated -Wno-vla -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX=1 -msse4.2  -Wno-attributes -DS2_USE_GFLAGS -DS2_USE_GLOG -faligned-new  -g -Wno-unused-local-typedefs -O3 -gdwarf-2 -DNDEBUG
-- Some symbols from glibc will be replaced for compatibility
-- Configuring done
-- Generating done
-- Build files have been written to: /root/incubator-doris/be/build_Release
[0/2] Re-checking globbed directories...
[1/679] Building CXX object src/agent/CMakeFiles/Agent.dir/heartbeat_server.cpp.o
FAILED: src/agent/CMakeFiles/Agent.dir/heartbeat_server.cpp.o
/opt/rh/devtoolset-10/root/usr/bin/../bin/g++ -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -I../src -I../test -I../../gensrc/build -I/var/local/thirdparty/installed/include -I/var/local/thirdparty/installed/gperftools/include -I/var/local/thirdparty/installed/include/thrift -I/var/local/thirdparty/installed/include/event -Wall -Wno-sign-compare -Wno-unknown-pragmas -pthread -fno-strict-aliasing -fno-omit-frame-pointer -std=gnu++17 -D__STDC_FORMAT_MACROS -Wno-deprecated -Wno-vla -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX=1 -msse4.2  -Wno-attributes -DS2_USE_GFLAGS -DS2_USE_GLOG -faligned-new  -g -Wno-unused-local-typedefs -O3 -gdwarf-2 -DNDEBUG -fdiagnostics-color=always -O3 -DNDEBUG -MD -MT src/agent/CMakeFiles/Agent.dir/heartbeat_server.cpp.o -MF src/agent/CMakeFiles/Agent.dir/heartbeat_server.cpp.o.d -o src/agent/CMakeFiles/Agent.dir/heartbeat_server.cpp.o -c ../src/agent/heartbeat_server.cpp
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
[2/679] Building CXX object src/agent/CMakeFiles/Agent.dir/task_worker_pool.cpp.o
../src/agent/task_worker_pool.cpp: In member function 'void doris::TaskWorkerPool::_drop_tablet_worker_thread_callback()':
../src/agent/task_worker_pool.cpp:428:73: warning: the address of 'err' will never be NULL [-Waddress]
  428 |                 drop_tablet_req.tablet_id, drop_tablet_req.schema_hash, &err);
      |                                                                         ^~~~
ninja: build stopped: subcommand failed.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
stdpaincommented, Aug 6, 2021

给docker调大点内存

0reactions
roanhe-tscommented, Aug 17, 2021

Is this problem solved? I am facing the same one. Docker Image : apachedoris/doris-dev:build-env-1.2 Source code: incubator-doris-0.14.0

[ 0%] Building CXX object src/agent/CMakeFiles/Agent.dir/agent_server.cpp.o g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See https://gcc.gnu.org/bugs/ for instructions. make[2]: *** [src/agent/CMakeFiles/Agent.dir/agent_server.cpp.o] Error 4 make[1]: *** [src/agent/CMakeFiles/Agent.dir/all] Error 2 make: *** [all] Error 2

I gave up. Maybe you could try to increase memory allocated for your docker engine.

https://github.com/apache/incubator-doris/issues/5821#issuecomment-893957920

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to ensure that the docker build fails if an ENV has not ...
To error out the build, just add the following with your env variable in the docker-compose file. ${ENV_VAR?Variable ENV_VAR not set}.
Read more >
Failed to compile after starting Docker containers · Issue #1464
Solution : On the container client on Docker, (in CMD), I run yarn install. I have an error (mission node_modules : react Router)....
Read more >
How to Fix and Debug Docker Containers Like a Superhero
Container errors are tricky to diagnose, but some investigative magic works wonders. Read along to learn how to debug Docker containers.
Read more >
Compiling a module in docker fails during build but succeeds ...
I'm new to docker and trying to create my first container to make the installation of a set of tools very simple. I'm...
Read more >
Changing the "Docker Command" results in failed builds ...
I was playing around with Render when trying to get multiline environment variables to work. My plan was to add a secret env...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found