accellera-official / systemc

SystemC Reference Implementation
https://systemc.org/overview/systemc/
Apache License 2.0
445 stars 141 forks source link

Various fixes for macOS hosts #62

Closed mhaeuser closed 6 months ago

mhaeuser commented 7 months ago

There currently are various issues with building on macOS:

Unrelated to macOS, but tested only there:

All fixes were tested on macOS Sonoma on an M1 Pro machine, all tests executed by "make check" via automake and CMake pass.

markfoodyburton commented 7 months ago

Hi Marvin, thanks for this PR. Right now, there is a large update in preparation for SystemC 3.0 which will include fixes for MacOSX. Hopefully that will resolve this issue. In the meantime, let's leave this PR open, and if there are still problems we can re-visit?

mhaeuser commented 7 months ago

Sure, thanks for the update!

maehne commented 7 months ago

I think that this PR can be successfully closed, as https://github.com/OSCI-WG/systemc/pull/551 got merged.

mhaeuser commented 7 months ago

I don’t have access to that repository, so unfortunately I cannot comment. But thanks for update!

lmailletcontoz commented 6 months ago

Fixed in SystemC 3.0.0 release. Feel free to reopen in case of regression.

mhaeuser commented 6 months ago

Thanks! I briefly inspected the changes:

I find this upstream commit a bit odd, though: https://github.com/accellera-official/systemc/commit/594a1aab19a2af3c4928ce7eabb7b58967d860bd Why is this flag not passed to the supported compilers by configure.ac? CMake works out-of-the-box on Apple silicon, while the autotools route requires manually setting CXXFLAGS.

Thank you for your effort!

maehne commented 6 months ago

Thanks for the feedback @mhaeuser!

@lmailletcontoz: Could you please reopen this PR, so that the two not yet applied improvements can be evaluated?

pah commented 6 months ago

I only see warnings when running config/bootstrap with autoconf 2.71 on my side. Migrating the configure.ac to require a newer version of autoconf would require looking at the available versions on "old" operating systems like e.g. RedHat 7.

Users are generally assumed to run off the release branch, which includes pre-generated Automake files.

Yes, pre-C++17 code will be dropped from the code base incrementally. Building for pre-C++17 is already rejected via sc_cmnhdr.h.

mhaeuser commented 6 months ago

Thanks for your insight, @pah!

I only see warnings when running config/bootstrap with autoconf 2.71 on my side. Migrating the configure.ac to require a newer version of autoconf would require looking at the available versions on "old" operating systems like e.g. RedHat 7.

Right. I'm not sure what minimum version the changes would upgrade it to, but the documentation indicates those constructs have co-existed for a while.

Users are generally assumed to run off the release branch, which includes pre-generated Automake files.

Ah, I hit the issues when I had to modify the autoconf files for https://github.com/accellera-official/systemc/commit/7751ffc85272183afa14c8503f3dc636babe2683, so I just re-tried the same process. The pre-generated files indeed work-as is. Thank you!

Yes, pre-C++17 code will be dropped from the code base incrementally. Building for pre-C++17 is already rejected via sc_cmnhdr.h.

Good, then I think that commit can be dropped.

As both GNU make and CMake work OOTB now, I'll close the PR again. The update to the autoconf files is mostly a matter of preference in this case.