Jump to content
katang

A SystemC installl problem on Ubuntu

Recommended Posts

I made a new installation on Ubuntu 18.04, and followed instructions in

https://howto.tech.blog/2016/11/27/installing-systemc-2-3-1/

Apparently it worked fine, but at the last step it gave the error message

$ g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME/lib-linux64 -Wl,-rpath=$SYSTEMC_HOME/lib-linux64 -o hello Hello.cpp -lsystemc -lm
In file included from Hello.cpp:1:0:
/usr/local/systemc-2.3.1//include/systemc.h:120:16: error: ‘std::gets’ has not been declared
     using std::gets;
                ^~~~

Is there an error in my install? (SystemC install seemed to run without error message)

 

Share this post


Link to post
Share on other sites

This issue has been fixed in the SystemC 2.3.2 release available from the Accellera website. The function std::gets was definitely removed in the C'11 standard and deprecated in the C++'11 standard so that recent compilers do not provide it anymore as its semantics constitutes a security risk due to buffer overflows.

Share this post


Link to post
Share on other sites

If it is necessary for you to stick with SystemC 2.3.1, you can simply comment out the offending line in systemc.h. The function is nowhere used inside the proof-of-concept implementation of SystemC.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×