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

Inconsistent build setting between autoconf and cmake builds #24

Open
eyck opened this issue Oct 28, 2021 · 3 comments
Open

Inconsistent build setting between autoconf and cmake builds #24

eyck opened this issue Oct 28, 2021 · 3 comments

Comments

@eyck
Copy link

eyck commented Oct 28, 2021

  1. SystemC version: 2.3.3 / 2.3.4_pub_rev
    
  2. platform, compiler, flags: all
    
  3. description of the problem:
    

When building SystemC using autoconf/configure the experiental phase callback feature is by default off. Whne building using cmake the option ENABLE_PHASE_CALLBACKS_TRACING is set to ON (https://github.com/accellera-official/systemc/blob/master/CMakeLists.txt#L310). This leads to inconsitency e.g. when building libraries providing their own trace file implementations.
Aside of this inconsistency there os no way to check at model build time what setting has been used used in thsi regard.

@maehne
Copy link
Contributor

maehne commented Nov 11, 2021

I agree, default settings should be consistent across the supported build systems.

@celegen
Copy link

celegen commented Jul 1, 2022

I've just bumped into an issue where building with CMake with the option ENABLE_PHASE_CALLBACKS_TRACING set to ON sc_trace() causes a segmentation fault if you try to sc_trace AC-datatype -signals. When the option is set to OFF and SC is rebuilt the issue is solved.

This happened on Ubuntu LTS 20.04 running on WSL2, SystemC v2.3.3, GCC v9.4.0.

@dcblack
Copy link
Contributor

dcblack commented May 11, 2023

A method should be provided to display all of the settings at runtime. This could be used either at the beginning or end of the simulation. Perhaps a new public method with the signature:

const char* ::sc_core::sc_build_config();

Then the user can add a call such as:

SC_REPORT_INFO_VERB( "/Accellera", ::sc_core::sc_build_configuraton(), ::sc_core::SC_NONE );

Information could/should contain:

  • Git hash, if possible
  • Build method (i.e., cmake or autoconf)
  • OS name and version, if possible
  • C++ compiler and version
  • C++ standard level
  • Date/time of build
  • List of compile-time options (e.g., SC_INCLUDE_FX, etc.)
  • Verbosity level (e.g., SC_MEDIUM)

This would be very useful when analyzing user reports.

If added to the standard, it would be an implementation-dependent option requiring certain of the above information.

I have written things like this in the past.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants