Error during docker install

Issue #159 invalid
Andrian Gajigan created an issue

Hi,

I’m trying to install Metabat2 using docker and I’m getting this error:

$ docker build --tag metabat .

[+] Building 123.1s (11/12)                                                                 

=> [internal] load build definition from Dockerfile                                   0.0s

=> => transferring dockerfile: 37B                                                    0.0s

=> [internal] load .dockerignore                                                      0.0s

=> => transferring context: 35B                                                       0.0s

=> [internal] load metadata for docker.io/library/ubuntu:22.04                        3.7s

=> [run-env 1/3] FROM docker.io/library/ubuntu:22.04@sha256:9a0bdde4188b896a372804be  0.0s

=> [internal] load build context                                                      0.0s

=> => transferring context: 4.77kB                                                    0.0s

=> CACHED [run-env 2/3] WORKDIR /root                                                 0.0s

=> CACHED [run-env 3/3] RUN apt-get update  &&     apt-get install -y libgomp1 &&     0.0s

=> CACHED [stage-2 1/2] WORKDIR /root                                                 0.0s

=> CACHED [builder 1/3] RUN apt-get update &&     apt-get install -y build-essential  0.0s

=> CACHED [builder 2/3] COPY . metabat                                                0.0s

=> ERROR [builder 3/3] RUN cd metabat &&     mkdir build &&     cd build &&     cm  119.3s

------                                                                                      

[builder 3/3] RUN cd metabat &&     mkdir build &&     cd build &&     cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. &&     make -j8 &&     make install &&     cd .. &&     rm -rf build:                                                                                          

#11 0.584 -- The C compiler identification is GNU 11.3.0                                    

#11 0.709 -- The CXX compiler identification is GNU 11.3.0                                  

#11 0.725 -- Detecting C compiler ABI info

#11 0.797 -- Detecting C compiler ABI info - done

#11 0.804 -- Check for working C compiler: /usr/bin/cc - skipped

#11 0.805 -- Detecting C compile features

#11 0.807 -- Detecting C compile features - done

#11 0.812 -- Detecting CXX compiler ABI info

#11 0.888 -- Detecting CXX compiler ABI info - done

#11 0.896 -- Check for working CXX compiler: /usr/bin/c++ - skipped

#11 0.896 -- Detecting CXX compile features

#11 0.897 -- Detecting CXX compile features - done

#11 0.898 Installing Release MetaBAT into /usr/local

#11 0.965 -- Found Boost: /usr/include (found suitable version "1.74.0", minimum required is "1.55.0") found components: program_options filesystem system graph serialization iostreams regex 

#11 1.181 -- Found OpenMP_C: -fopenmp (found version "4.5") 

#11 1.250 -- Found OpenMP_CXX: -fopenmp (found version "4.5") 

#11 1.251 -- Found OpenMP: TRUE (found version "4.5")  

#11 1.252 Using OpenMP

#11 1.252 Boost cmake dir: 

#11 1.252 Boost include: /usr/include

#11 1.252 Boost libraries:/usr/lib/x86_64-linux-gnu/libboost_program_options.a/usr/lib/x86_64-linux-gnu/libboost_filesystem.a/usr/lib/x86_64-linux-gnu/libboost_system.a/usr/lib/x86_64-linux-gnu/libboost_graph.a/usr/lib/x86_64-linux-gnu/libboost_serialization.a/usr/lib/x86_64-linux-gnu/libboost_iostreams.a/usr/lib/x86_64-linux-gnu/libboost_regex.a

#11 1.252 Boost lib ver:1_74

#11 1.252 Boost lib dir:/usr/lib/x86_64-linux-gnu

#11 1.257 -- Configuring done

#11 1.267 -- Generating done

#11 1.269 -- Build files have been written to: /root/metabat/build

#11 1.299 [  4%] Creating directories for 'zlib'

#11 1.299 [  8%] Checking the git repository for changes...

#11 1.335 Creating new /root/metabat/metabat_version.h with true 

#11 1.343 [  8%] Built target check_git_repository

#11 1.353 [ 12%] Performing download step (git clone) for 'zlib'

#11 8.535 -- zlib download command succeeded.  See also /root/metabat/build/contrib/zlib-prefix/src/zlib-stamp/zlib-download-*.log

#11 8.548 [ 16%] No update step for 'zlib'

#11 8.566 [ 20%] No patch step for 'zlib'

#11 8.584 [ 24%] Performing configure step for 'zlib'

#11 8.604 Checking for gcc...

#11 8.649 Building static library libz.a version 1.2.11 with gcc.

#11 8.679 Checking for size_t... Yes.

#11 8.690 Checking for off64_t... Yes.

#11 8.692 Checking for fseeko... Yes.

#11 8.733 Checking for strerror... Yes.

#11 8.761 Checking for unistd.h... Yes.

#11 8.777 Checking for stdarg.h... Yes.

#11 8.806 Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().

#11 8.846 Checking for vsnprintf() in stdio.h... Yes.

#11 8.865 Checking for return value of vsnprintf()... Yes.

#11 8.877 Checking for attribute(visibility) support... Yes.

#11 8.897 [ 28%] Performing build step for 'zlib'

#11 10.19 [ 32%] Performing install step for 'zlib'

#11 10.22 -- zlib install command succeeded.  See also /root/metabat/build/contrib/zlib-prefix/src/zlib-stamp/zlib-install-*.log

#11 10.23 [ 36%] Completed 'zlib'

#11 10.25 [ 36%] Built target zlib

#11 10.27 [ 40%] Creating directories for 'htslib'

#11 10.31 [ 44%] Performing download step (git clone) for 'htslib'

#11 20.22 -- htslib download command succeeded.  See also /root/metabat/build/contrib/htslib-prefix/src/htslib-stamp/htslib-download-*.log

#11 20.24 [ 48%] No update step for 'htslib'

#11 20.25 [ 52%] No patch step for 'htslib'

#11 20.27 [ 56%] Performing configure step for 'htslib'

#11 22.51 checking for gcc... gcc

#11 22.53 checking whether the C compiler works... yes

#11 22.56 checking for C compiler default output file name... a.out

#11 22.56 checking for suffix of executables... 

#11 22.59 checking whether we are cross compiling... no

#11 22.61 checking for suffix of object files... o

#11 22.63 checking whether the compiler supports GNU C... yes

#11 22.64 checking whether gcc accepts -g... yes

#11 22.66 checking for gcc option to enable C11 features... none needed

#11 22.70 checking for ranlib... ranlib

#11 22.70 checking for grep that handles long lines and -e... /usr/bin/grep

#11 22.70 checking for C compiler warning flags... -Wall

#11 22.72 checking for pkg-config... no

#11 22.72 checking for special C compiler options needed for large files... no

#11 22.72 checking for _FILE_OFFSET_BITS value needed for large files... no

#11 22.74 checking shared library type for unknown-Linux... plain .so

#11 22.74 checking whether the compiler accepts -fvisibility=hidden... yes

#11 22.77 checking build system type... x86_64-pc-linux-gnu

#11 22.82 checking host system type... x86_64-pc-linux-gnu

#11 22.82 checking for stdio.h... yes

#11 22.84 checking for stdlib.h... yes

#11 22.86 checking for string.h... yes

#11 22.88 checking for inttypes.h... yes

#11 22.91 checking for stdint.h... yes

#11 22.93 checking for strings.h... yes

#11 22.96 checking for sys/stat.h... yes

#11 22.98 checking for sys/types.h... yes

#11 23.00 checking for unistd.h... yes

#11 23.03 checking for sys/param.h... yes

#11 23.07 checking for getpagesize... yes

#11 23.10 checking for working mmap... yes

#11 23.16 checking for gmtime_r... yes

#11 23.19 checking for fsync... yes

#11 23.22 checking for drand48... yes

#11 23.26 checking for srand48_deterministic... no

#11 23.29 checking for gcc options needed to detect all undeclared functions... none needed

#11 23.32 checking whether fdatasync is declared... yes

#11 23.35 checking for fdatasync... yes

#11 23.39 checking for library containing log... -lm

#11 23.45 checking for zlib.h... yes

#11 23.47 checking for inflate in -lz... yes

#11 23.51 checking for library containing recv... none required

#11 23.54 checking whether htscodecs files are present... yes

#11 23.54 checking for libdeflate.h... no

#11 23.55 checking for libdeflate_deflate_compress in -ldeflate... no

#11 23.58 configure: WARNING: GCS support not enabled: requires libcurl support

#11 23.58 configure: WARNING: S3 support not enabled: requires libcurl support

#11 23.58 checking for library containing regcomp... none required

#11 23.61 checking whether PTHREAD_MUTEX_RECURSIVE is declared... yes

#11 23.65 configure: creating ./config.status

#11 23.73 config.status: creating config.mk

#11 23.74 config.status: creating htslib.pc.tmp

#11 23.75 config.status: creating config.h

#11 23.76 config.status: linking htscodecs_bundled.mk to htscodecs.mk

#11 23.80 [ 60%] Performing build step for 'htslib'

#11 24.29 Updating htscodecs/htscodecs/version.h : #define HTSCODECS_VERSION_TEXT "1.2.2"

#11 35.60 [ 64%] Performing install step for 'htslib'

#11 47.96 [ 68%] Completed 'htslib'

#11 47.98 [ 68%] Built target htslib

#11 48.00 [ 72%] Building CXX object src/CMakeFiles/metabat1.dir/metabat1.cpp.o

#11 48.00 [ 76%] Building CXX object src/CMakeFiles/metabat2.dir/metabat2.cpp.o

#11 48.01 [ 80%] Building CXX object src/CMakeFiles/jgi_summarize_bam_contig_depths.dir/jgi_summarize_bam_contig_depths.cpp.o

#11 48.01 [ 84%] Building CXX object src/CMakeFiles/contigOverlaps.dir/contigOverlaps.cpp.o

#11 52.27 In file included from /root/metabat/src/jgi_summarize_bam_contig_depths.h:35,

#11 52.27                  from /root/metabat/src/jgi_summarize_bam_contig_depths.cpp:5:

#11 52.27 /root/metabat/src/BamUtils.h: In member function 'bam1_t* BamCache::getBam(const bam1_t*)':

#11 52.27 /root/metabat/src/BamUtils.h:98:34: warning: ignoring return value of 'bam1_t* bam_copy1(bam1_t*, const bam1_t*)' declared with attribute 'warn_unused_result' [-Wunused-result]

#11 52.27    98 |                         bam_copy1(bam, copy);

#11 52.27       |                         ~^~~

#11 52.28 In file included from /root/metabat/src/jgi_summarize_bam_contig_depths.h:35,

#11 52.28                  from /root/metabat/src/jgi_summarize_bam_contig_depths.cpp:5:

#11 52.28 /root/metabat/src/BamUtils.h: In member function 'NameBamMap::iterator NameBamMap::insert(std::string, const bam1_t*, bool)':

#11 52.28 /root/metabat/src/BamUtils.h:271:42: warning: ignoring return value of 'bam1_t* bam_copy1(bam1_t*, const bam1_t*)' declared with attribute 'warn_unused_result' [-Wunused-result]

#11 52.28   271 |                                 bam_copy1(existing->second, bam);

#11 52.28       |                                 ~^~~

#11 52.29 In file included from /root/metabat/src/jgi_summarize_bam_contig_depths.h:35,

#11 52.29                  from /root/metabat/src/jgi_summarize_bam_contig_depths.cpp:5:

#11 52.29 /root/metabat/src/BamUtils.h: In static member function 'static int BamUtils::_findPairInFile(const bam1_t*, void*)':

#11 52.29 /root/metabat/src/BamUtils.h:582:34: warning: ignoring return value of 'bam1_t* bam_copy1(bam1_t*, const bam1_t*)' declared with attribute 'warn_unused_result' [-Wunused-result]

#11 52.29   582 |                         bam_copy1(data->mate, orphan);

#11 52.29       |                         ~^~~~

#11 108.2 c++: fatal error: Killed signal terminated program cc1plus

#11 108.2 compilation terminated.

#11 108.2 make[2]: *** [src/CMakeFiles/metabat2.dir/build.make:76: src/CMakeFiles/metabat2.dir/metabat2.cpp.o] Error 1

#11 108.2 make[1]: *** [CMakeFiles/Makefile2:236: src/CMakeFiles/metabat2.dir/all] Error 2

#11 108.2 make[1]: *** Waiting for unfinished jobs....

#11 109.8 [ 88%] Linking CXX executable contigOverlaps

#11 110.1 [ 88%] Built target contigOverlaps

#11 113.0 [ 92%] Linking CXX executable jgi_summarize_bam_contig_depths

#11 113.1 [ 92%] Built target jgi_summarize_bam_contig_depths

#11 119.2 [ 96%] Linking CXX executable metabat1

#11 119.3 [ 96%] Built target metabat1

#11 119.3 make: *** [Makefile:146: all] Error 2

executor failed running [/bin/sh -c cd metabat &&     mkdir build &&     cd build &&     cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. &&     make -j8 &&     make install &&     cd .. &&     rm -rf build]: exit code: 2

Comments (6)

  1. Rob Egan

    I think that the problem is here:

    108.2 c++: fatal error: Killed signal terminated program cc1plus
    

    just guessing here, but I think you cancelled it or ran out of memory.

  2. Andrian Gajigan reporter

    Hi Rob.

    I tried the homebrew and then compile installation, and Im still getting an error

    Prerequisties for MacOS X (10.14 Mojave) : ( using Homebrew http://brew.sh/ )

    First install Xcode from the App Store (version 10.2)

    Second install Homebrew

    Third install llvm with openmpi and boost and cmake

    brew tap homebrew/versions
    brew install llvm libomp boost cmake
    brew link libomp

    use the latest llvm compiler and flags

    export CPPFLAGS="-I/usr/local/opt/llvm/include"
    export LDFLAGS="-L/usr/local/opt/llvm/lib"
    export CC=/usr/local/opt/llvm/bin/clang
    export CXX=/usr/local/opt/llvm/bin/clang++

    mkdir build ; cd build && cmake -DCMAKE_INSTALL_PREFIX=$HOME/metabat .. && make && make install

    Here’s the error:

    [ 72%] Building CXX object src/CMakeFiles/metabat1.dir/metabat1.cpp.o
    In file included from /Users/andriangajigan/Desktop/Bioinfo_software/metabat/src/metabat1.cpp:1:
    In file included from /Users/andriangajigan/Desktop/Bioinfo_software/metabat/src/metabat1.h:40:
    In file included from /usr/local/include/boost/math/distributions.hpp:15:
    In file included from /usr/local/include/boost/math/distributions/arcsine.hpp:35:
    In file included from /usr/local/include/boost/math/distributions/detail/common_error_handling.hpp:12:
    In file included from /usr/local/include/boost/math/policies/error_handling.hpp:11:
    /usr/local/include/boost/math/tools/config.hpp:23:6: warning: "The minimum language standard to use Boost.Math will be C++14 starting in July 2023 (Boost 1.82 release)" [-W#warnings]

    warning "The minimum language standard to use Boost.Math will be C++14 starting in July 2023 (Boost 1.82 release)"

    /Users/andriangajigan/Desktop/Bioinfo_software/metabat/src/metabat1.cpp:1463:64: warning: 'bind1st<pair_equal_to<int, double>, int>' is deprecated [-Wdeprecated-declarations]
    medoid_vals[i] = std::find_if(rABD.begin(), rABD.end(), std::bind1st(pair_equal_to<int,double>(),medoid_ids[i]))->second;
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__functional/binder1st.h:45:1: note: 'bind1st<pair_equal_to<int, double>, int>' has been explicitly marked deprecated here
    _LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__config:1054:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'

    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED

    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__config:1043:48: note: expanded from macro '_LIBCPP_DEPRECATED'

    define _LIBCPP_DEPRECATED attribute ((deprecated))

    2 warnings generated.
    [ 76%] Linking CXX executable metabat1
    "_omp_get_max_threads", referenced from:
    _main in metabat1.cpp.o
    "_omp_get_thread_num", referenced from:
    _.omp_outlined..337 in metabat1.cpp.o
    _.omp_outlined..340 in metabat1.cpp.o
    _.omp_outlined..350 in metabat1.cpp.o
    _.omp_outlined..358 in metabat1.cpp.o
    _.omp_outlined..404 in metabat1.cpp.o
    "_omp_set_num_threads", referenced from:
    _main in metabat1.cpp.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [src/metabat1] Error 1
    make[1]: *** [src/CMakeFiles/metabat1.dir/all] Error 2
    make: *** [all] Error 2

  3. Rob Egan

    That’s the same error I get if I ignore the instructions in INSTALL.md

    Please try in a clean build directory with the following:

    brew tap homebrew/versions
    brew install llvm libomp boost cmake
    brew link libomp
    
    # use the latest llvm compiler and flags
    export CPPFLAGS="-I/usr/local/opt/llvm/include"
    export LDFLAGS="-L/usr/local/opt/llvm/lib"
    export CC=/usr/local/opt/llvm/bin/clang
    export CXX=/usr/local/opt/llvm/bin/clang++
    
    mkdir build ; cd build && cmake -DCMAKE_INSTALL_PREFIX=$HOME/metabat .. && make && make install
    

    The clean build directory is important, because if you tried it first without those environmental variables, the error occurs again.

  4. Log in to comment