Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: yaml.h: No such file or directory #33

Closed
andre2007 opened this issue Oct 21, 2020 · 1 comment
Closed

fatal error: yaml.h: No such file or directory #33

andre2007 opened this issue Oct 21, 2020 · 1 comment

Comments

@andre2007
Copy link

I try to build this library using this dockerfile

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
#include <yaml.h>
^~~~~~~~
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

@andre2007
Copy link
Author

Actually, issue can be solved by installing libyaml-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant