PDB-REDO/dssp

DSSP does not detect libcifpp

Closed this issue · 5 comments

I have the following dockerfile

FROM centos:latest
ENV PATH=/opt/rh/gcc-toolset-9/root/usr/bin:$PATH

# Install compile dependencies
RUN yum -y update && yum groupinstall -y 'Development Tools' &&  dnf -y install boost-devel  gcc-toolset-9-gcc gcc-toolset-9-gcc-c++ && yum clean all

# Install Boost
RUN curl -Lo boost_1_75_0.tar.gz https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.gz && tar xvf boost_1_75_0.tar.gz && cd boost_1_75_0/ && ./bootstrap.sh && ./b2 install --prefix=/usr/local

WORKDIR /tmp/doss/

# Install mrc
RUN git clone https://github.com/mhekkel/mrc.git && cd mrc && ./configure && make && make install

# Install libcifpp
RUN git clone https://github.com/PDB-REDO/libcifpp.git && \
    cd libcifpp && ./configure  && make && make install

# Install dssp
RUN cd /tmp/doss/ && git clone https://github.com/PDB-REDO/dssp && cd dssp && ./configure && make && make install

I get the below error at dssp configure.

checking for CIFPP... no
configure: error: the required package libcifpp is not installed

Is there any output from the installation of libcifpp?

Hi Otieno,

Thanks very much for reporting this problem. There were some problems in the configure script for DSSP due to recent changes in libcifpp. I've checked in a few fixes.

regards, -maarten

Still seeing the error (cloning from master):

Step 9/10 : RUN git clone https://github.com/PDB-REDO/libcifpp.git &&     cd libcifpp && ./configure --prefix=/usr/local && make && make install
 ---> Running in 4fe2f4ee645f
Cloning into 'libcifpp'...
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ supports C++17 features with -std=c++17... yes
checking whether C++ compiler accepts -fstandalone-debug... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /usr/bin/sed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc is Clang... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking how to run the C++ preprocessor... g++ -std=c++17 -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking filesystem usability... yes
checking filesystem presence... yes
checking for filesystem... yes
checking if linking to stdc++fs is required... no
checking for a BSD-compatible install... /usr/bin/install -c
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -std=c++17 -E
checking for ld used by g++ -std=c++17... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ -std=c++17 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ -std=c++17 option to produce PIC... -fPIC -DPIC
checking if g++ -std=c++17 PIC flag -fPIC -DPIC works... yes
checking if g++ -std=c++17 static flag -static works... no
checking if g++ -std=c++17 supports -c -o file.o... yes
checking if g++ -std=c++17 supports -c -o file.o... (cached) yes
checking whether the g++ -std=c++17 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for floor... yes
checking for pow... yes
checking for rint... yes
checking for sqrt... yes
checking for strchr... yes
checking for strerror... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for stdbool.h that conforms to C99... no
checking for _Bool... no
checking for ptrdiff_t... yes
checking whether make sets $(MAKE)... yes
checking for boostlib >= 1.71 (107100)... yes
checking whether the Boost::IOStreams library is available... yes
checking for exit in -lboost_iostreams... yes
checking whether the Boost::Date_Time library is available... yes
checking for exit in -lboost_date_time... yes
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex... yes
checking for atomic_flag_clear in -latomic... no
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating libcifpp.pc
config.status: creating src/Config.hpp
config.status: executing libtool commands
mkdir -p obj
>> src/AtomType.cpp
>> src/Cif2PDB.cpp
>> src/Cif++.cpp
>> src/CifParser.cpp
>> src/CifUtils.cpp
>> src/CifValidator.cpp
>> src/Compound.cpp
>> src/PDB2Cif.cpp
>> src/PDB2CifRemark3.cpp
>> src/Point.cpp
>> src/Secondary.cpp
>> src/Structure.cpp
>> src/Symmetry.cpp
>> src/TlsParser.cpp
/bin/sh /tmp/doss/libcifpp/libtool --silent --tag=CXX --mode=link g++ -std=c++17 -g -O2 -I/usr/include -pthread -Wall -Wno-multichar -I include -O2 -DCACHE_DIR='"/var/cache/libcifpp"' -DDATA_DIR='"/usr/local/share/libcifpp"' -DUSE_RSRC=1 -DNDEBUG -L/usr/lib64 -version-info 1:1:1 -o libcifpp.la -rpath /usr/local/lib obj/AtomType.lo obj/Cif2PDB.lo obj/Cif++.lo obj/CifParser.lo obj/CifUtils.lo obj/CifValidator.lo obj/Compound.lo obj/PDB2Cif.lo obj/PDB2CifRemark3.lo obj/Point.lo obj/Secondary.lo obj/Structure.lo obj/Symmetry.lo obj/TlsParser.lo -lboost_iostreams -lboost_date_time -lboost_regex
install -d /usr/local/lib
/bin/sh /tmp/doss/libcifpp/libtool --mode=install install libcifpp.la /usr/local/lib
libtool: install: install .libs/libcifpp.lai /usr/local/lib/libcifpp.la
libtool: install: install .libs/libcifpp.a /usr/local/lib/libcifpp.a
libtool: install: chmod 644 /usr/local/lib/libcifpp.a
libtool: install: ranlib /usr/local/lib/libcifpp.a
libtool: finish: PATH="/opt/rh/gcc-toolset-9/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
install -d /usr/local/share/libcifpp
install -m644 rsrc/isomers.txt /usr/local/share/libcifpp;
gzip -f /usr/local/share/libcifpp/isomers.txt
for d in mmcif_ddl.dic mmcif_pdbx_v50.dic; do \
	install -m644 rsrc/dictionaries/$d /usr/local/share/libcifpp; \
	gzip -f /usr/local/share/libcifpp/$d; \
done
install -d /etc/cron.weekly
install -m755 tools/update-dictionary-script /etc/cron.weekly/libcifpp
install -d /usr/local/include/cif++
for f in AtomType.hpp CifParser.hpp Compound.hpp PDB2CifRemark3.hpp Structure.hpp Cif2PDB.hpp CifUtils.hpp Point.hpp Symmetry.hpp Cif++.hpp CifValidator.hpp PDB2Cif.hpp Secondary.hpp TlsParser.hpp; do install include/cif++/$f /usr/local/include/cif++/$f; done
install -d /usr/local/lib/pkgconfig
install -m 644 libcifpp.pc /usr/local/lib/pkgconfig/libcifpp.pc
Removing intermediate container 4fe2f4ee645f
 ---> f32d827109fb
Step 10/10 : RUN export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH &&     cd /tmp/doss/ && git clone https://github.com/PDB-REDO/dssp && cd dssp && ./configure --prefix=/usr/local && make && make install
 ---> Running in a49fa6922219
Cloning into 'dssp'...
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ supports C++17 features with -std=c++17... yes
checking whether C++ compiler accepts -fstandalone-debug... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for pkg-config... (cached) /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for mrc... /usr/local/bin/mrc
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /usr/bin/sed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc is Clang... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking how to run the C++ preprocessor... g++ -std=c++17 -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking filesystem usability... yes
checking filesystem presence... yes
checking for filesystem... yes
checking for boostlib >= 1.65.1 (106501)... yes
checking whether the Boost::IOStreams library is available... yes
checking for exit in -lboost_iostreams... yes
checking whether the Boost::Program_Options library is available... yes
checking for exit in -lboost_program_options... yes
checking whether the Boost::Date_Time library is available... yes
checking for exit in -lboost_date_time... yes
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex... yes
checking for CIFPP... no
configure: error: the required package libcifpp is not installed
The command '/bin/sh -c export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH &&     cd /tmp/doss/ && git clone https://github.com/PDB-REDO/dssp && cd dssp && ./configure --prefix=/usr/local && make && make install' returned a non-zero code: 1

Your dockerfile is not going to work. There are several problems:

  • You're installing boost-devel AND building boost from source, that's never a good idea since you will have mixed versions of boost and that will lead to link problems at best.
  • libcifpp is installed in /usr/local but that means that the pkg-config file for libcifpp also is located in /usr/local/lib/pkgconfig and that's not a default location where pkg-config will look. Therefore you have this config error.

Here's a Dockerfile I just created by updating your dockerfile, I tested and it works. What I did is install a static version of boost in a separate directory (not /usr/local) and use that location as a parameter to the following configure scripts. Then I added the PKG_CONFIG_PATH and there are some other changes as well.

BTW, thing would have been way easier if you had taken an ubuntu repository instead of centos.

FROM centos:latest
ENV PATH=/opt/rh/gcc-toolset-9/root/usr/bin:$PATH

# Install compile dependencies
RUN yum -y update && yum groupinstall -y 'Development Tools' &&  dnf -y install gcc-toolset-9-gcc gcc-toolset-9-gcc-c++ zlib-devel bzip2-devel && yum clean all

# Install Boost
RUN curl -Lo boost_1_75_0.tar.gz https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.gz && tar xvf boost_1_75_0.tar.gz && cd boost_1_75_0/ && ./bootstrap.sh && ./b2 link=static install --prefix=/opt/boost-1.75

WORKDIR /tmp/doss/

# Install mrc
RUN git clone https://github.com/mhekkel/mrc.git && cd mrc && ./configure --with-boost=/opt/boost-1.75 && make && make install

# Install libcifpp
RUN git clone https://github.com/PDB-REDO/libcifpp.git && \
    cd libcifpp && ./configure --with-boost=/opt/boost-1.75 && make && make install

# Install dssp
RUN cd /tmp/doss/ && git clone https://github.com/PDB-REDO/dssp && cd dssp && PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --enable-resources --with-boost=/opt/boost-1.75 && make && make install