FROM dlang2/ldc-ubuntu:1.23.0 as ldc
RUN apt-get update \
&& apt-get install -y clang-9 libclang-9-dev git cmake uncrustify g++ libcurl4-openssl-dev
RUN ln -s /usr/bin/clang-9 /usr/bin/clang
RUN cd /tmp \
&& git clone https://github.com/kubernetes-client/c.git \
&& cd c/kubernetes \
&& mkdir build && cd build \
&& cmake .. \
&& make && make install
An error is thrown:
Step 4/4 : RUN cd /tmp && git clone https://github.com/kubernetes-client/c.git && cd c/kubernetes && mkdir build && cd build && cmake .. && make && make install
---> Running in 05849b54c95c
Cloning into 'c'...
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1")
-- OPENSSL found
-- Using OpenSSL 1.1.1
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found suitable version "7.58.0", minimum required is "7.58.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/c/kubernetes/build
Scanning dependencies of target kubernetes
[ 0%] Building C object CMakeFiles/kubernetes.dir/config/kube_config_model.c.o
[ 0%] Building C object CMakeFiles/kubernetes.dir/config/kube_config_yaml.c.o
/tmp/c/kubernetes/config/kube_config_yaml.c:1:10: fatal error: yaml.h: No such file or directory
I try to build this library using this dockerfile
An error is thrown:
Step 4/4 : RUN cd /tmp && git clone https://github.com/kubernetes-client/c.git && cd c/kubernetes && mkdir build && cd build && cmake .. && make && make install ---> Running in 05849b54c95c Cloning into 'c'... -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1") -- OPENSSL found -- Using OpenSSL 1.1.1 -- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found suitable version "7.58.0", minimum required is "7.58.0") -- Configuring done -- Generating done -- Build files have been written to: /tmp/c/kubernetes/build Scanning dependencies of target kubernetes [ 0%] Building C object CMakeFiles/kubernetes.dir/config/kube_config_model.c.o [ 0%] Building C object CMakeFiles/kubernetes.dir/config/kube_config_yaml.c.o /tmp/c/kubernetes/config/kube_config_yaml.c:1:10: fatal error: yaml.h: No such file or directory
include
compilation terminated. make[2]: [CMakeFiles/kubernetes.dir/config/kube_config_yaml.c.o] Error 1 CMakeFiles/kubernetes.dir/build.make:86: recipe for target 'CMakeFiles/kubernetes.dir/config/kube_config_yaml.c.o' failed make[1]: [CMakeFiles/kubernetes.dir/all] Error 2 make: *** [all] Error 2 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/kubernetes.dir/all' failed Makefile:129: recipe for target 'all' failed