Skip to content

Fixed install script for macOS #66

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

Closed
wants to merge 2 commits into from
Closed

Fixed install script for macOS #66

wants to merge 2 commits into from

Conversation

myzinsky
Copy link

Hello,

please consider this as a "work-in-progress PR", since we have for sure to discuss these steps. The goal is to port systems-compiler to macOS. The install script has some issues with respect to mkdir or wget, since these shell commands work differently on macOS compared to linux. A script for macOS is included in this pull request.

Unfortunately, beside these small cosmetics, there seems to be a more difficult issue that I was not able to solve so far. The step Build and install ISCC is failing because som c-headers could not be found. I think they belong to the standard library, however we don't build this library here, we just build the compiler and not a libc etc... ISCC is also compiled using the previously build compiler:

Consolidate compiler generated dependencies of target SysCRTTI
[ 66%] Generating SystemC precompiled header /Users/myzinsky/Zeugs/sc_tools/icsc/build_icsc_rel/systemc/systemc.h.pch
/Users/myzinsky/Zeugs/sc_tools/bin/clang++ -Xclang -emit-pch -x c++-header /Users/myzinsky/Zeugs/sc_tools/icsc/systemc/src/systemc.h -o /Users/myzinsky/Zeugs/sc_tools/icsc/build_icsc_rel/systemc/systemc.h.pch -D__SC_TOOL__ -D__SC_TOOL_ANALYZE__ -DNDEBUG -std=c++17 -I/Users/myzinsky/Zeugs/sc_tools/icsc/systemc/src
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f sc_tool/CMakeFiles/SysCRTTI.dir/build.make sc_tool/CMakeFiles/SysCRTTI.dir/build
/Users/myzinsky/Zeugs/sc_tools/icsc/systemc/src/systemc.h:43:10: fatal error: 'cassert' file not found
#include <cassert>
         ^~~~~~~~~
make[2]: Nothing to be done for `sc_tool/CMakeFiles/SysCRTTI.dir/build'.
[ 68%] Built target SysCRTTI
1 error generated.
make[2]: *** [systemc/systemc.h.pch] Error 1
make[1]: *** [CMakeFiles/systemcPCH.dir/all] Error 2
make: *** [all] Error 2

Any thoughts?

@mikhailmoiseev
Copy link
Contributor

Hi,

I already met this issue ('cassert' file not found). Let me refresh that in mind and return in a few days.

-Mikhail.

@myzinsky
Copy link
Author

Okay that would be great. Would love to use this tool on macOS natively :-)

@mikhailmoiseev
Copy link
Contributor

Only one thing I could suggest to try is to modify CMakeList.txt in icsc folder: move pre-compiled headers target right after add_subdirectory(systemc)
CMakeLists.txt

@myzinsky
Copy link
Author

myzinsky commented Nov 16, 2023

I did what you suggested, see 54b0383 ... was this what you intended? Unfortunately we still run into this problem:

[ 68%] Built target SysCRTTI
/Users/myzinsky/Zeugs/sc_tools/icsc/systemc/src/systemc.h:43:10: fatal error: 'cassert' file not found
#include <cassert>
         ^~~~~~~~~
1 error generated.
make[2]: *** [systemc/systemc.h.pch] Error 1
make[1]: *** [CMakeFiles/systemcPCH.dir/all] Error 2
make: *** [all] Error 2
[ 63%] Built target systemc
[ 65%] Built target sc_elab_proto
[ 67%] Built target SysCRTTI
[ 68%] Generating SystemC precompiled header /Users/myzinsky/Zeugs/sc_tools/icsc/build_icsc_rel/systemc/systemc.h.pch
/Users/myzinsky/Zeugs/sc_tools/icsc/systemc/src/systemc.h:43:10: fatal error: 'cassert' file not found
#include <cassert>
         ^~~~~~~~~
1 error generated.
make[2]: *** [systemc/systemc.h.pch] Error 1
make[1]: *** [CMakeFiles/systemcPCH.dir/all] Error 2
make: *** [all] Error 2
CMake Warning (dev) at CMakeLists.txt:13 (find_package):
  Ignoring EXACT since no version is requested.
This warning is for project developers.  Use -Wno-dev to suppress it.

@mikhailmoiseev
Copy link
Contributor

mikhailmoiseev commented Nov 17, 2023

cassert located at compiler(gcc) include folder. You could try to find it at your system and add the folder into PATH.
Are you able to build SystemC itself?

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

Successfully merging this pull request may close these issues.

2 participants