06-19-2018 09:02 AM
Recently I started building ydk-cpp release 0.7.1.
I met a few errors while building cisco-ios-xr and building of cisco-ios-xe just takes a lot of time and memory.
One group of errors in cisco-ios-xr code is like this one below(there are several errors like this in different files related to the fact that there are counter and member with one name "count"):
ydk-cpp/ydk-cpp-0.7.1/cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_asr9k_asic_errors_oper.cpp: In member function ‘virtual std::map<std::basic_string<char>, std::shared_ptr<ydk::Entity> > cisco_ios_xr::Cisco_IOS_XR_asr9k_asic_errors_oper::AsicErrorStats::Racks::Rack::Nodes::Node::Counts::get_children() const’:
ydk-cpp/ydk-cpp-0.7.1/cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_asr9k_asic_errors_oper.cpp:570:27: error: ‘begin’ was not declared in this scope
for (auto const & c : count)
The second group of errors in cisco-ios-xr is related to namespace ambiguity. Like in ydk-cpp/ydk-cpp-0.7.1/cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_invmgr_cfg.cpp:
std::map<std::string, std::shared_ptr<Entity>> InventoryConfigurations::Entity::get_children() const
{
std::map<std::string, std::shared_ptr<Entity>> children{};
char count=0;
return children;
}
There were a few possibilities for std::shared_ptr<Entity> which were needed to be resolved manually.
As for cisco-ios-xe, building of ydk/models/cisco_ios_xe/fragmented/Cisco_IOS_XE_native_0.cpp.o took 21.45 Gb of memory and 47.85 min of time. I know I have a pretty weak virtual box machine for this, I even increased swap. But is there any way to make the process at least faster?
06-21-2018 08:33 AM
Glad you were able to fix the errors. For the memory issue, which compiler and OS are you using?
In the past, I have been able to successfully build using clang compiler on Ubuntu with around 10 GB memory.
cd /build rm -rf * cmake --DCMAKE_C_COMPILER=/usr/bin/clang --DCMAKE_CXX_COMPILER=/usr/bin/clang++ .. make install
You may have to repeat the above steps for the ydk "core" package and any other bundle you are building.
06-21-2018 10:10 AM
Thanks, I'll try that.
I'm using VirtualBox with Centos7.
compiler: cc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
06-27-2018 01:00 PM
Yes, with clang compiler 10 Gb seems to be ok. But it's still taking a lot of time. Are you planning to share rpms as you did with release 0.6.3? (https://devhub.cisco.com/artifactory/webapp/#/artifacts/browse/tree/General/rpm-ydk/0.6.3)
07-05-2018 09:59 AM
Yes. We will build the RPMs for 0.7.2. It takes a few days to generate. Please expect these to be available by early next week.
07-11-2018 11:37 AM
Please find the RPMs below. XE should be coming up soon:
https://devhub.cisco.com/artifactory/rpm-ydk/0.7.2/
With these RPMs installed on Centos7, I am able to compile & run the samples
git clone https://github.com/CiscoDevNet/ydk-cpp.git mkdir ydk-cpp/core/samples/build cd ydk-cpp/core/samples/build cmake3 .. make ./bgp_read -h
07-11-2018 02:39 PM
Thank you.
07-12-2018 10:02 AM
The XE RPM is also now available at: https://devhub.cisco.com/artifactory/rpm-ydk/0.7.2/
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide