Jump to content

error when compiling with clang

Recommended Posts


compiling systemc-ams-2.1  with clang version 7.0.0

using systemc-2.3.3 

yields the following error :

make[5]: Entering directory '/home/tools/src/sysc/build/src/scams/impl/core'
  CXX      sca_globals.lo
  CXX      sca_interface.lo
  CXX      sca_implementation_info.lo
  CXX      sca_max_time.lo
  CXX      sca_module.lo
In file included from ../../../../../systemc-ams-2.1/src/scams/impl/core/sca_module.cpp:40:
In file included from ../../../../../systemc-ams-2.1/src/systemc-ams:180:
../../../../../systemc-ams-2.1/src/scams/predefined_moc/tdf/sca_tdf_sc_out.h:549:27: error: 'pobj' is a private member of 'sca_tdf::sca_implementation::sca_port_attributes'
                 str << "for port: " << pobj->sca_name();
../../../../../systemc-ams-2.1/src/scams/impl/predefined_moc/tdf/sca_tdf_port_attributes.h:154:47: note: declared private here
        sca_core::sca_implementation::sca_port_base* pobj;
1 error generated.
make[5]: *** [Makefile:496: sca_module.lo] Error 1
make[5]: Leaving directory '/home/tools/src/sysc/build/src/scams/impl/core'
make[4]: *** [Makefile:400: all-recursive] Error 1
make[4]: Leaving directory '/home/tools/src/sysc/build/src/scams/impl'
make[3]: *** [Makefile:597: all-recursive] Error 1
make[3]: Leaving directory '/home/tools/src/sysc/build/src/scams'
make[2]: *** [Makefile:423: all-recursive] Error 1
make[2]: Leaving directory '/home/tools/src/sysc/build/src'
make[1]: *** [Makefile:361: all] Error 2
make[1]: Leaving directory '/home/tools/src/sysc/build/src'
make: *** [Makefile:430: all-recursive] Error 1



   sca_core::sca_implementation::sca_port_base* pobj; 

in the file


from private to protected fixes the issue.

Any ideas ? Is this a compiler issue ? Not really that confident about changing from private to protected.

(I tried gcc just as a sanity check and it doesn't give this error or warning).

apart from that, the fix for memcpy() and memset() and a few warnings  about

warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]

it compiles fine.

Thanks in advance and thanks for the code !

Best Regards


Link to comment
Share on other sites

Thanks for reporting these compilation issues! These will need to get addressed by the COSEDA Technologies GmbH with a new SystemC AMS release. In the meantime, you can fix the compilation issue by replacing:




The calls to memcpy() and memset() need to get prefixed with the std:: namespace prefix. The "register" storage class specifiers can be safely removed. If I see it correctly, they are only remaining in file scams/impl/analysis/ac/sca_ac_domain_entity.cpp.

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...