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

c++: internal compiler error #336

Closed
111pontes opened this issue Dec 16, 2016 · 2 comments
Closed

c++: internal compiler error #336

111pontes opened this issue Dec 16, 2016 · 2 comments
Labels

Comments

@111pontes
Copy link
Collaborator

Compiling cisco-ios-xr model bundle exhausts computer memory and ultimately results in error message:

$ make
[  0%] Building CXX object CMakeFiles/ydk_cisco_ios_xr.dir/ydk/models/generated_entity_lookup.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
CMakeFiles/ydk_cisco_ios_xr.dir/build.make:62: recipe for target 'CMakeFiles/ydk_cisco_ios_xr.dir/ydk/models/generated_entity_lookup.cpp.o' failed
make[2]: *** [CMakeFiles/ydk_cisco_ios_xr.dir/ydk/models/generated_entity_lookup.cpp.o] Error 4
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ydk_cisco_ios_xr.dir/all' failed
make[1]: *** [CMakeFiles/ydk_cisco_ios_xr.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
$

Core, openconfig and ietf packages compile just fine. System is using:

$ c++ --version
c++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ uname -a
Linux ohlone 4.4.0-51-generic #72-Ubuntu SMP Thu Nov 24 18:29:54 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ 
@111pontes 111pontes added the C++ label Dec 16, 2016
@ghost
Copy link

ghost commented Dec 19, 2016

Update:

I increased swap size on ubuntu VM to 16G using this guide: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

So far the compilation is going ok. I used the below make command which runs the build in 5 parallel jobs:

$ make -j5

@111pontes
Copy link
Collaborator Author

Compiling cisco-ios-xr bundle may require significant memory. The problem is avoided by fragmenting source (hpp and cpp) files. The current fragmentation prototype doesn't guarantee backward compatibility for apps if there's a change in the model. Initially, fragmented source files will be used to build the libydk library, but only combined files (one per model) will be posted in ydk-cpp. Fragmented header files can be made available to users (separate branch?) if they run into very high memory requirements caused by including a very large number of models.

@ghost ghost mentioned this issue Feb 21, 2017
@ghost ghost closed this as completed Feb 21, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant