cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1714
Views
6
Helpful
7
Replies

I have problems while building cisco-ios-xr and cisco-ios-xe release 0.7.1

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?

7 Replies 7

abhirame
Cisco Employee
Cisco Employee

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.

Thanks, I'll try that.

I'm using VirtualBox with Centos7.

compiler: cc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)

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)

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.

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

Thank you.

The XE RPM is also now available at: https://devhub.cisco.com/artifactory/rpm-ydk/0.7.2/

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: