Jump to content

Compile error during uvm-systemc library beta 3 install


Recommended Posts

Hi. 

I am using CentOS7, gcc-5.2.0. 

When I am trying to make -j8, I got many errors related to "enable_if". A example is shown below. 

../../../src/uvmsc/macros/uvm_object_defines.h:69:19: error: ‘enable_if’ in namespace ‘std’ does not name a template type
     typename std::enable_if<IsSequenceItem<__PSI_TYPE>::result,bool>::type uvm_report_enabled(

Do you have any idea how to solve this. 

Thanks. 

Link to comment
Share on other sites

GCC 5.2.0 is an old compiler that still defaults to C++'98 even though it contains experimental support for C++'11. "std::enable_if" was introduced in C++'11. Therefore, it may work if you recompile all your SystemC-related libraries and applications with explicitly turned on support for C++'11 by adding "-std=gnu++11" as command line argument to the compiler calls. Most reliable is probably by setting the CXX environment variable.

Link to comment
Share on other sites

Hi maehne,

Thank you for the reply. In order to turn on the C++11 support what I did is; 

After config, I have modified the make file as follows for both systemc and uvm-systemc installation;

- CXXFLAGS = -std=c++11

- CPPFLAGS = -std=c++11

However, the result is I got the same error about std::enable_if. 

Do I something wrong? I do not know how I turn on the c++11 support duing installation of systemc and uvm-systemc. 

Link to comment
Share on other sites

Directly editing the Makefiles generated by the GNU autotools is not recommended. You have to set it prior before doing "configure" to ensure the sources are correctly set up.  As C++'11 support is marked as experimental for g++ 5.2.0, it is well possible that its C++ standard library implementation is not complete. I recommend you to try with a more recent C++ compiler, which defaults to C++'11 or later. The accompanying README and INSTALL documents of the libraries list on which platforms the libraries were tested including compiler versions.

Link to comment
Share on other sites

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.

Guest
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...