wallix / redemption

A GPL RDP proxy
GNU General Public License v2.0
212 stars 87 forks source link

Error when building docker image - g++: fatal error: Killed signal terminated program cc1plus #142

Closed DeanKamali closed 1 year ago

DeanKamali commented 3 years ago

I'm getting an error => ERROR [stage-0 7/8] RUN bjam linkflags=-static-libstdc++ variant=release -q --toolset=gcc cxxflags='-DREDEMPTION_DISABLE_NO_BOOST_PREPROCESSOR_WARNING' rdpproxy 5062.8s

When building on my mac

% docker build . -t redemption
[+] Building 5286.3s (12/17)
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                   0.1s
 => => transferring dockerfile: 1.61kB                                                                                                                                                                                                                                                                                 0.1s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                      0.0s
 => => transferring context: 51B                                                                                                                                                                                                                                                                                       0.0s
 => [internal] load metadata for docker.io/library/ubuntu:20.04                                                                                                                                                                                                                                                        1.5s
 => [internal] load build context                                                                                                                                                                                                                                                                                     33.6s
 => => transferring context: 435.55MB                                                                                                                                                                                                                                                                                 32.9s
 => [stage-0 1/8] FROM docker.io/library/ubuntu:20.04@sha256:82becede498899ec668628e7cb0ad87b6e1c371cb8a1e597d83a47fac21d6af3                                                                                                                                                                                         21.5s
 => => resolve docker.io/library/ubuntu:20.04@sha256:82becede498899ec668628e7cb0ad87b6e1c371cb8a1e597d83a47fac21d6af3                                                                                                                                                                                                  0.0s
 => => sha256:16ec32c2132b43494832a05f2b02f7a822479f8250c173d0ab27b3de78b2f058 28.57MB / 28.57MB                                                                                                                                                                                                                       5.6s
 => => sha256:82becede498899ec668628e7cb0ad87b6e1c371cb8a1e597d83a47fac21d6af3 1.42kB / 1.42kB                                                                                                                                                                                                                         0.0s
 => => sha256:1e48201ccc2ab83afc435394b3bf70af0fa0055215c1e26a5da9b50a1ae367c9 529B / 529B                                                                                                                                                                                                                             0.0s
 => => sha256:1318b700e415001198d1bf66d260b07f67ca8a552b61b0da02b3832c778f221b 1.46kB / 1.46kB                                                                                                                                                                                                                         0.0s
 => => extracting sha256:16ec32c2132b43494832a05f2b02f7a822479f8250c173d0ab27b3de78b2f058                                                                                                                                                                                                                             14.4s
 => [stage-0 2/8] RUN apt-get -qq update && apt-get install -y g++ libboost-tools-dev libboost-test-dev libssl-dev libkrb5-dev     libgssglue-dev libsnappy-dev libpng-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev     libx264-dev libbz2-dev && apt-get install -y git                          156.8s
 => [stage-1 2/6] RUN apt-get -qq update && apt-get install -y python3 libgssapi-krb5-2 libpng16-16 libsnappy1v5                                                                                                                                                                                                      36.6s
 => [stage-0 3/8] RUN mkdir -p /gcc/                                                                                                                                                                                                                                                                                   0.5s
 => [stage-0 4/8] WORKDIR /gcc/                                                                                                                                                                                                                                                                                        0.0s
 => [stage-0 5/8] COPY . /gcc/                                                                                                                                                                                                                                                                                        21.8s
 => [stage-0 6/8] RUN cd modules && rm -rf ppocr && git clone https://github.com/wallix/ppocr.git ppocr                                                                                                                                                                                                               19.3s
 => ERROR [stage-0 7/8] RUN bjam linkflags=-static-libstdc++ variant=release -q --toolset=gcc cxxflags='-DREDEMPTION_DISABLE_NO_BOOST_PREPROCESSOR_WARNING' rdpproxy                                                                                                                                                5062.8s
------
 > [stage-0 7/8] RUN bjam linkflags=-static-libstdc++ variant=release -q --toolset=gcc cxxflags='-DREDEMPTION_DISABLE_NO_BOOST_PREPROCESSOR_WARNING' rdpproxy:
#12 1.992 ...patience...
#12 2.447 ...found 2253 targets...
#12 2.447 ...updating 222 targets...
#12 4.076 gcc.compile.c++ bin/gcc-9/release/app_path_exe.o
#12 4.303 gcc.compile.c++ bin/gcc-9/release/log.o
#12 4.915 gcc.compile.c++ bin/gcc-9/release/ppocr_box_char_box.o
#12 5.588 gcc.compile.c++ bin/gcc-9/release/ppocr_box_char_make_box_character.o
#12 6.202 gcc.compile.c++ bin/gcc-9/release/ppocr_image_coordinate.o
#12 7.161 gcc.compile.c++ bin/gcc-9/release/ppocr_image_image.o
#12 7.635 gcc.compile.c++ bin/gcc-9/release/src/main/main.o
#12 8.711 gcc.compile.c++ bin/gcc-9/release/ppocr_image_image_from_file.o
#12 9.044 gcc.compile.c++ bin/gcc-9/release/ppocr_loader2_glyphs_loader.o
#12 9.594 gcc.compile.c++ bin/gcc-9/release/ppocr_loader2_image_io.o
#12 10.80 gcc.compile.c++ bin/gcc-9/release/ppocr_ocr2_data_indexes_by_words.o
#12 12.48 gcc.compile.c++ bin/gcc-9/release/ppocr_ocr2_disambiguous_with_dict.o
#12 12.63 gcc.compile.c++ bin/gcc-9/release/ppocr_ocr2_filter_by_font.o
#12 16.13 gcc.compile.c++ bin/gcc-9/release/ppocr_ocr2_glyphs.o
#12 16.52 gcc.compile.c++ bin/gcc-9/release/ppocr_ocr2_filter_by_lines.o
#12 17.57 gcc.compile.c++ bin/gcc-9/release/ppocr_ocr2_replacement.o
#12 17.73 gcc.compile.c++ bin/gcc-9/release/ppocr_ocr2_word_lines.o
#12 18.95 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_agravity.o
#12 20.22 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_alternation.o
#12 20.38 gcc.compile.c++ bin/gcc-9/release/ppocr_spell_dictionary.o
#12 21.61 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_compass.o
#12 21.78 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_dcompass.o
#12 22.31 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_density.o
#12 22.74 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_direction.o
#12 23.01 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_dvdirection.o
#12 23.46 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_dvdirection2.o
#12 23.71 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_dvgravity.o
#12 24.20 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_dvgravity2.o
#12 24.77 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_dzdensity.o
#12 25.54 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_gravity.o
#12 25.99 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_gravity2.o
#12 26.55 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_hbar.o
#12 26.65 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_hdirection.o
#12 27.25 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_hdirection2.o
#12 27.37 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_hgravity.o
#12 28.01 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_hgravity2.o
#12 28.10 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_proportionality.o
#12 30.08 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_zone.o
#12 30.44 gcc.compile.c++ bin/gcc-9/release/ppocr_strategies_proportionality_zone.o
#12 31.14 gcc.compile.c++ bin/gcc-9/release/ppocr_utils_image_compare.o
#12 38.58 gcc.compile.c++ bin/gcc-9/release/src/RAIL/client_execute.o
#12 41.41 gcc.compile.c++ bin/gcc-9/release/src/acl/acl_serializer.o
#12 41.85 gcc.compile.c++ bin/gcc-9/release/projects/redemption_configs/redemption_src/configs/config.o
#12 42.84 gcc.compile.c++ bin/gcc-9/release/src/acl/kv_list_from_strings.o
#12 50.14 gcc.compile.c++ bin/gcc-9/release/src/acl/module_manager/create_module_rail.o
#12 79.50 gcc.compile.c++ bin/gcc-9/release/src/acl/module_manager/create_module_vnc.o
#12 80.57 gcc.compile.c++ bin/gcc-9/release/src/acl/session_inactivity.o
#12 101.8 gcc.compile.c++ bin/gcc-9/release/src/acl/session_logfile.o
#12 2607.5 gcc.compile.c++ bin/gcc-9/release/src/acl/module_manager/create_module_rdp.o
#12 2607.5 g++: fatal error: Killed signal terminated program cc1plus
#12 2607.5 compilation terminated.
#12 2608.3
#12 2608.3     "g++"   -fPIC -O3 -finline-functions -Wno-inline -Wall -DREDEMPTION_DISABLE_NO_BOOST_PREPROCESSOR_WARNING -Waligned-new -Wall -Walloc-zero -Walloca -Warray-bounds=2 -Wcast-align -Wcast-qual -Wclass-memaccess -Wconditionally-supported -Wdisabled-optimization -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Werror=literal-suffix -Werror=narrowing -Werror=write-strings -Wextra -Wfloat-conversion -Wfloat-equal -Wformat-overflow=2 -Wformat-security -Wformat-signedness -Wformat=2 -Winvalid-pch -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wno-conversion -Wno-shadow -Wno-sign-compare -Wno-sign-conversion -Wnon-virtual-dtor -Wnull-dereference -Wold-style-cast -Woverloaded-virtual -Wpacked -Wpointer-arith -Wredundant-decls -Wstrict-null-sentinel -Wsuggest-attribute=noreturn -Wsuggest-override -Wswitch-enum -Wtrampolines -Wundef -Wunused-macros -Wuseless-cast -Wvector-operation-performance -Wzero-as-null-pointer-constant -fdiagnostics-color=always -fno-rtti -msse3 -pedantic -pipe -std=c++17 -DNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE  -I"include" -I"modules/includes" -I"modules/ppocr/includes/mln" -I"modules/ppocr/src" -I"projects/ocr1/include" -I"projects/redemption_configs/autogen/include" -I"projects/redemption_configs/redemption_src" -I"src" -I"src/system/linux" -c -o "bin/gcc-9/release/src/acl/module_manager/create_module_rdp.o" "src/acl/module_manager/create_module_rdp.cpp"
#12 2608.3
#12 2608.3 ...failed gcc.compile.c++ bin/gcc-9/release/src/acl/module_manager/create_module_rdp.o...
#12 2608.3 ...removing bin/gcc-9/release/src/acl/module_manager/create_module_rdp.o
#12 2608.3 gcc.compile.c++ bin/gcc-9/release/src/capture/agent_data_extractor.o
#12 2612.8 gcc.compile.c++ bin/gcc-9/release/src/capture/fdx_capture.o
#12 2614.1 gcc.compile.c++ bin/gcc-9/release/src/capture/rail_screen_computation.o
#12 2617.5 gcc.compile.c++ bin/gcc-9/release/src/capture/video_capture.o
#12 2620.8 gcc.compile.c++ bin/gcc-9/release/src/core/RDP/rlgr.o
#12 2622.1 gcc.compile.c++ bin/gcc-9/release/src/core/RDP/mppc.o
#12 2623.6 gcc.compile.c++ bin/gcc-9/release/src/core/error.o
#12 2628.9 gcc.compile.c++ bin/gcc-9/release/src/gdi/protected_graphics.o
#12 2631.3 gcc.compile.c++ bin/gcc-9/release/src/keyboard/keymap.o
#12 2634.5 gcc.compile.c++ bin/gcc-9/release/src/mod/internal/bouncer2_mod.o
#12 2639.8 ...on 100th target...
#12 2639.8 gcc.compile.c++ bin/gcc-9/release/src/mod/internal/interactive_target_mod.o
#12 2646.7 gcc.compile.c++ bin/gcc-9/release/src/mod/internal/replay_mod.o
#12 2651.4 gcc.compile.c++ bin/gcc-9/release/src/mod/internal/wait_mod.o
#12 2655.4 gcc.compile.c++ bin/gcc-9/release/src/mod/internal/widget/dialog.o
#12 2660.4 gcc.compile.c++ bin/gcc-9/release/src/mod/internal/widget/grid.o
#12 2665.6 gcc.compile.c++ bin/gcc-9/release/src/mod/internal/widget/label.o
#12 2683.2 gcc.compile.c++ bin/gcc-9/release/src/mod/internal/widget/module_host.o
#12 2686.9 gcc.compile.c++ bin/gcc-9/release/src/mod/internal/widget/screen.o
#12 2695.7 gcc.compile.c++ bin/gcc-9/release/src/mod/internal/widget/vertical_scroll_text.o
#12 2701.5 gcc.compile.c++ bin/gcc-9/release/src/mod/internal/widget_test_mod.o
#12 2711.1 gcc.compile.c++ bin/gcc-9/release/src/mod/rdp/channels/sespro_channel_params.o
#12 2719.7 gcc.compile.c++ bin/gcc-9/release/src/mod/vnc/encoder/copyrect.o
#12 2728.8 gcc.compile.c++ bin/gcc-9/release/src/mod/vnc/encoder/rre.o
#12 2749.3 gcc.compile.c++ bin/gcc-9/release/src/system/linux/system/tls_check_certificate.o
#12 2885.8 gcc.compile.c++ bin/gcc-9/release/src/transport/in_multi_crypto_transport.o
#12 5043.0 gcc.compile.c++ bin/gcc-9/release/src/core/session.o
#12 5043.0 {standard input}: Assembler messages:
#12 5043.0 {standard input}:116350: Warning: end of file not at end of a line; newline inserted
#12 5043.0 {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
#12 5043.0 g++: fatal error: Killed signal terminated program cc1plus
#12 5043.0 compilation terminated.
#12 5045.7
#12 5045.7     "g++"   -fPIC -O3 -finline-functions -Wno-inline -Wall -DREDEMPTION_DISABLE_NO_BOOST_PREPROCESSOR_WARNING -Waligned-new -Wall -Walloc-zero -Walloca -Warray-bounds=2 -Wcast-align -Wcast-qual -Wclass-memaccess -Wconditionally-supported -Wdisabled-optimization -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Werror=literal-suffix -Werror=narrowing -Werror=write-strings -Wextra -Wfloat-conversion -Wfloat-equal -Wformat-overflow=2 -Wformat-security -Wformat-signedness -Wformat=2 -Winvalid-pch -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wno-conversion -Wno-shadow -Wno-sign-compare -Wno-sign-conversion -Wnon-virtual-dtor -Wnull-dereference -Wold-style-cast -Woverloaded-virtual -Wpacked -Wpointer-arith -Wredundant-decls -Wstrict-null-sentinel -Wsuggest-attribute=noreturn -Wsuggest-override -Wswitch-enum -Wtrampolines -Wundef -Wunused-macros -Wuseless-cast -Wvector-operation-performance -Wzero-as-null-pointer-constant -fdiagnostics-color=always -fno-rtti -msse3 -pedantic -pipe -std=c++17 -DNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE  -I"include" -I"modules/includes" -I"modules/ppocr/includes/mln" -I"modules/ppocr/src" -I"projects/ocr1/include" -I"projects/redemption_configs/autogen/include" -I"projects/redemption_configs/redemption_src" -I"src" -I"src/system/linux" -c -o "bin/gcc-9/release/src/core/session.o" "src/core/session.cpp"
#12 5045.7
#12 5045.7 ...failed gcc.compile.c++ bin/gcc-9/release/src/core/session.o...
#12 5045.7 gcc.compile.c++ bin/gcc-9/release/src/transport/out_meta_sequence_transport.o
#12 5049.3 gcc.compile.c++ bin/gcc-9/release/src/utils/base64.o
#12 5050.6 gcc.compile.c++ bin/gcc-9/release/src/utils/cfgloader.o
#12 5056.2 gcc.compile.c++ bin/gcc-9/release/src/utils/fileutils.o
#12 5057.8 gcc.compile.c++ bin/gcc-9/release/src/utils/load_theme.o
#12 5058.9 gcc.compile.c++ bin/gcc-9/release/src/utils/primitives/primitives_sse2.o
#12 5061.4 gcc.compile.c++ bin/gcc-9/release/src/utils/parse_primary_drawing_orders.o
#12 5061.6 gcc.compile.c++ bin/gcc-9/release/src/utils/strutils.o
#12 5062.6 ...failed updating 2 targets...
#12 5062.6 ...updated 120 targets...
------
executor failed running [/bin/sh -c bjam linkflags=-static-libstdc++ variant=release -q --toolset=gcc cxxflags='-DREDEMPTION_DISABLE_NO_BOOST_PREPROCESSOR_WARNING' rdpproxy]: exit code: 1
jonathanpoelen commented 3 years ago

According to https://stackoverflow.com/a/25584112, it looks like this might be an out of memory during the build?

Augustin-FL commented 2 years ago

Indeed, this is a memory issue.

Since you are on a Mac, the memory can be managed in the docker app preferences

image