cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2682
Views
5
Helpful
5
Replies

CMake Error at cmake_install.cmake:228 (file)

shreyash
Cisco Employee
Cisco Employee

Hi,

 

I am trying to install ydk-0.8.5

 

Steps:
1)Installed dependencies and sourced virtual env 

2)export C_INCLUDE_PATH=/usr/local/include:/auto/cafy/ydk_085_trial_build/ydk_env/include/site/python3.6

3)export CPLUS_INCLUDE_PATH=/usr/local/include:/auto/cafy/ydk_085_trial_build/ydk_env/include/site/python3.6

4)pip install pip==9.0.3

5) cd ydk-gen

6) pip install -r requirements.txt

7)./generate.py --cpp --core

```

./generate.py -is --core --cpp
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- 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
CMake System: CentOS
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.1")
Set libyang plugin installation directory to: lib/libyang
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.5") found components: doxygen missing components: dot
-- Configuring done
-- Generating done
-- Build files have been written to: /auto/cafy/ydk_085_trial_build/ydk-gen/gen-api/cpp/ydk/build

Successfully generated cpp code for ydk


Compiling cpp package ...

 

 

 

 

[ 96%] Generating project_libyang/objs/xpath.c.o
[ 97%] Linking CXX static library libydk.a
[ 97%] Built target ydk
Scanning dependencies of target netconf
[ 98%] Building CXX object samples/CMakeFiles/netconf.dir/netconf.cpp.o
[ 99%] Linking CXX executable netconf
[ 99%] Built target netconf
Scanning dependencies of target bgp
[ 99%] Building CXX object samples/CMakeFiles/bgp.dir/bgp.cpp.o
[100%] Linking CXX executable bgp
[100%] Built target bgp

Installing cpp package ...

Built target project_libnetconf
Built target project_libyang
Built target ydk
Built target netconf
Built target bgp
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /usr/local/include/libnetconf/callbacks.h
-- Up-to-date: /usr/local/include/libnetconf/callbacks_ssh.h
-- Up-to-date: /usr/local/include/libnetconf/callhome.h
-- Installing: /usr/local/include/libnetconf/config.h
-- Up-to-date: /usr/local/include/libnetconf/config.h.in
-- Up-to-date: /usr/local/include/libnetconf/datastore.h
-- Up-to-date: /usr/local/include/libnetconf/datastore_xml.h
-- Up-to-date: /usr/local/include/libnetconf/error.h
-- Up-to-date: /usr/local/include/libnetconf/libnetconf.h
-- Up-to-date: /usr/local/include/libnetconf/libnetconf_ssh.h
-- Up-to-date: /usr/local/include/libnetconf/libnetconf_tls.h
-- Up-to-date: /usr/local/include/libnetconf/libnetconf_xml.h
-- Up-to-date: /usr/local/include/libnetconf/messages.h
-- Up-to-date: /usr/local/include/libnetconf/messages_internal.h
-- Up-to-date: /usr/local/include/libnetconf/messages_xml.h
-- Up-to-date: /usr/local/include/libnetconf/nacm.h
-- Up-to-date: /usr/local/include/libnetconf/netconf.h
-- Up-to-date: /usr/local/include/libnetconf/netconf_internal.h
-- Up-to-date: /usr/local/include/libnetconf/notifications.h
-- Up-to-date: /usr/local/include/libnetconf/notifications_xml.h
-- Up-to-date: /usr/local/include/libnetconf/session.h
-- Up-to-date: /usr/local/include/libnetconf/ssh.h
-- Up-to-date: /usr/local/include/libnetconf/tls.h
-- Up-to-date: /usr/local/include/libnetconf/transapi.h
-- Up-to-date: /usr/local/include/libnetconf/transport.h
-- Up-to-date: /usr/local/include/libnetconf/url.h
-- Up-to-date: /usr/local/include/libnetconf/url_internal.h
-- Up-to-date: /usr/local/include/libnetconf/with_defaults.h
-- Up-to-date: /usr/local/include/libnetconf/datastore_internal.h
-- Up-to-date: /usr/local/include/libnetconf/edit_config.h
-- Up-to-date: /usr/local/include/libnetconf/datastore_custom.h
-- Up-to-date: /usr/local/include/libnetconf/datastore_custom_private.h
-- Up-to-date: /usr/local/include/libnetconf/datastore_empty.h
-- Up-to-date: /usr/local/include/libnetconf/datastore_file.h
-- Up-to-date: /usr/local/include/libyang/common.h
-- Up-to-date: /usr/local/include/libyang/context.h
-- Up-to-date: /usr/local/include/libyang/dict.h
-- Up-to-date: /usr/local/include/libyang/dict_private.h
-- Up-to-date: /usr/local/include/libyang/extensions.h
-- Installing: /usr/local/include/libyang/extensions_config.h
-- Installing: /usr/local/include/libyang/libyang.h
-- Up-to-date: /usr/local/include/libyang/parser.h
-- Up-to-date: /usr/local/include/libyang/parser_yang.h
-- Up-to-date: /usr/local/include/libyang/parser_yang_bis.h
-- Up-to-date: /usr/local/include/libyang/parser_yang_lex.h
-- Up-to-date: /usr/local/include/libyang/printer.h
-- Up-to-date: /usr/local/include/libyang/resolve.h
-- Up-to-date: /usr/local/include/libyang/tree_data.h
-- Up-to-date: /usr/local/include/libyang/tree_internal.h
-- Up-to-date: /usr/local/include/libyang/tree_schema.h
-- Up-to-date: /usr/local/include/libyang/validation.h
-- Up-to-date: /usr/local/include/libyang/xml.h
-- Up-to-date: /usr/local/include/libyang/xml_internal.h
-- Up-to-date: /usr/local/include/libyang/xpath.h
-- Installing: /usr/local/lib/libydk.a
-- Up-to-date: /usr/local/include/ydk/netconf_model_provider.hpp
-- Up-to-date: /usr/local/include/ydk/capabilities_parser.hpp
-- Installing: /usr/local/include/ydk/codec_provider.hpp
-- Up-to-date: /usr/local/include/ydk/codec_service.hpp
-- Up-to-date: /usr/local/include/ydk/common_utilities.hpp
-- Up-to-date: /usr/local/include/ydk/crud_service.hpp
-- Up-to-date: /usr/local/include/ydk/entity_data_node_walker.hpp
-- Up-to-date: /usr/local/include/ydk/entity_lookup.hpp
-- Up-to-date: /usr/local/include/ydk/entity_util.hpp
-- Up-to-date: /usr/local/include/ydk/errors.hpp
-- Up-to-date: /usr/local/include/ydk/executor_service.hpp
-- Up-to-date: /usr/local/include/ydk/filters.hpp
-- Up-to-date: /usr/local/include/ydk/ietf_parser.hpp
-- Up-to-date: /usr/local/include/ydk/json.hpp
-- Up-to-date: /usr/local/include/ydk/logger.hpp
-- Up-to-date: /usr/local/include/ydk/logging_callback.hpp
-- Up-to-date: /usr/local/include/ydk/netconf_client.hpp
-- Up-to-date: /usr/local/include/ydk/netconf_provider.hpp
-- Up-to-date: /usr/local/include/ydk/netconf_service.hpp
-- Up-to-date: /usr/local/include/ydk/network_topology.hpp
-- Up-to-date: /usr/local/include/ydk/opendaylight_parser.hpp
-- Up-to-date: /usr/local/include/ydk/opendaylight_provider.hpp
-- Installing: /usr/local/include/ydk/path_api.hpp
-- Up-to-date: /usr/local/include/ydk/restconf_client.hpp
-- Up-to-date: /usr/local/include/ydk/restconf_provider.hpp
-- Up-to-date: /usr/local/include/ydk/service_provider.hpp
-- Up-to-date: /usr/local/include/ydk/types.hpp
-- Up-to-date: /usr/local/include/ydk/json_subtree_codec.hpp
-- Up-to-date: /usr/local/include/ydk/xml_subtree_codec.hpp
-- Up-to-date: /usr/local/include/ydk/xml_util.hpp
-- Up-to-date: /usr/local/include/ydk/validation_service.hpp
-- Installing: /usr/local/include/ydk/ydk.h
-- Up-to-date: /usr/local/include/spdlog/async_logger.h
-- Up-to-date: /usr/local/include/spdlog/common.h
-- Up-to-date: /usr/local/include/spdlog/formatter.h
-- Up-to-date: /usr/local/include/spdlog/logger.h
-- Up-to-date: /usr/local/include/spdlog/spdlog.h
-- Up-to-date: /usr/local/include/spdlog/tweakme.h
-- Up-to-date: /usr/local/include/spdlog/details/async_log_helper.h
-- Up-to-date: /usr/local/include/spdlog/details/async_logger_impl.h
-- Up-to-date: /usr/local/include/spdlog/details/file_helper.h
-- Up-to-date: /usr/local/include/spdlog/details/log_msg.h
-- Up-to-date: /usr/local/include/spdlog/details/logger_impl.h
-- Up-to-date: /usr/local/include/spdlog/details/mpmc_bounded_q.h
-- Up-to-date: /usr/local/include/spdlog/details/null_mutex.h
-- Up-to-date: /usr/local/include/spdlog/details/os.h
-- Up-to-date: /usr/local/include/spdlog/details/pattern_formatter_impl.h
-- Up-to-date: /usr/local/include/spdlog/details/registry.h
-- Up-to-date: /usr/local/include/spdlog/details/spdlog_impl.h
-- Up-to-date: /usr/local/include/spdlog/fmt/fmt.h
-- Up-to-date: /usr/local/include/spdlog/fmt/ostr.h
-- Up-to-date: /usr/local/include/spdlog/fmt/bundled/format.cc
-- Up-to-date: /usr/local/include/spdlog/fmt/bundled/format.h
-- Up-to-date: /usr/local/include/spdlog/fmt/bundled/ostream.cc
-- Up-to-date: /usr/local/include/spdlog/fmt/bundled/ostream.h
-- Up-to-date: /usr/local/include/spdlog/fmt/bundled/printf.h
-- Up-to-date: /usr/local/include/spdlog/sinks/android_sink.h
-- Up-to-date: /usr/local/include/spdlog/sinks/ansicolor_sink.h
-- Up-to-date: /usr/local/include/spdlog/sinks/base_sink.h
-- Up-to-date: /usr/local/include/spdlog/sinks/dist_sink.h
-- Up-to-date: /usr/local/include/spdlog/sinks/file_sinks.h
-- Up-to-date: /usr/local/include/spdlog/sinks/msvc_sink.h
-- Up-to-date: /usr/local/include/spdlog/sinks/null_sink.h
-- Up-to-date: /usr/local/include/spdlog/sinks/ostream_sink.h
-- Up-to-date: /usr/local/include/spdlog/sinks/sink.h
-- Up-to-date: /usr/local/include/spdlog/sinks/stdout_sinks.h
-- Up-to-date: /usr/local/include/spdlog/sinks/syslog_sink.h
-- Up-to-date: /usr/local/include/spdlog/sinks/wincolor_sink.h
-- Installing: /usr/local/lib/libyang/libyang_ext_test.so
-- Installing: /usr/local/lib/libyang/metadata.so
-- Installing: /usr/local/lib/libyang/nacm.so
CMake Error at cmake_install.cmake:228 (file):
file failed to open for writing (Permission denied):

/auto/cafy/ydk_085_trial_build/ydk-gen/gen-api/cpp/ydk/build/install_manifest.txt

 

make: *** [install] Error 1

Installation failed!!

Total time taken: 4 minutes 14 seconds


```

 

 

1 Accepted Solution

Accepted Solutions

I needed to be as root and then run the below cmds:

./generate.py -is --core --cpp
./generate.py -is --core --cpp

 

The issue is fixed after that.

 

View solution in original post

5 Replies 5

shreyash
Cisco Employee
Cisco Employee

The folder permissions  of "/auto/cafy/ydk_085_trial_build/ydk-gen/gen-api/cpp/ydk/build" are under the same userid that is running the cmd "./generate.py --cpp --core" and the same user has gir cloned the ydk-gen repo

 

@ygorelik : Any idea here?

 

I needed to be as root and then run the below cmds:

./generate.py -is --core --cpp
./generate.py -is --core --cpp

 

The issue is fixed after that.

 

Hi Shreyash

Just a clarification for the solution, which is correct. You don't need necessarily to be root, but need to have sudo access in order for the YDK C++ core libraries and header to be written under '/usr/local'. This requirement has been documented here.

Yan Gorelik
YDK Solutions

Sure, thanks @yangorelik. Somehow, I overlooked that requirement and realized it later.


I sincerely appreciate your intent to help this community.