Jump to content

Lasse Urban

Members
  • Posts

    2
  • Joined

  • Last visited

Lasse Urban's Achievements

Member

Member (1/2)

0

Reputation

  1. Hi Ori, The following two lines of your provided output are wrong: -- CMAKE_SYSTEM_PROCESSOR = x86_64 -- QT_ARCH = x86_64 You don't have x86 architecture. Your processor is arm64 and the qt_arch should be aarch64. It should be detected automatically, I don't know why it is not set correctly in your case. Please check your cmake installation and env variables, and go through the CMakeLists.txt for further debugging. A quick attempt can be to set (CMAKE_SYSTEM_PROCESSOR arm64) set (QT_ARCH aarch64) in CMakeLists.txt. You might need to comment out the other logic setting the QT_ARCH variable. Please have a deeper look into the CMakeLists.txt and understand better what's going on there. Best, Lasse
  2. Hi all, Thanks for opening this discussion and all the helpful hints. I managed to build SystemC on Apple M2 silicon using the cmake approach. @William Lock and @Philipp A Hartmann already mentioned that you have to change the CMAKE_CXX_STANDARD in the CmakeLists.txt, but as some people seem to still have trouble, I’d like to share what I did. git clone git@github.com:accellera-official/systemc.git systemc-2.3.4 cd systemc-2.3.4 open the CMakeLists.txt and replace: set (CMAKE_CXX_STANDARD 98 CACHE STRING "C++ standard to build all targets. Supported values are 98, 11, 14, and 17.") set (CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "The with CMAKE_CXX_STANDARD selected C++ standard is a requirement.") mark_as_advanced (CMAKE_CXX_STANDARD_REQUIRED) with: set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_STANDARD_REQUIRED ON) mkdir BUILD && mkdir INSTALL && cd BUILD cmake -DCMAKE_INSTALL_PREFIX="../INSTALL" .. make make install cd ../.. g++ -std=c++17 -I systemc-2.3.4/INSTALL/include -Lsystemc-2.3.4/INSTALL/lib -lsystemc -o systemc_helloworld systemc_helloworld.cpp Add SystemC to default include path (to be able to use #include <systemc.h> in systemc_helloworld.cpp): sudo cp -r systemc-2.3.4/INSTALL/include/* /usr/local/include/ sudo cp systemc-2.3.4/INSTALL/lib/libsystemc.dylib /usr/local/lib g++ -std=c++17 -lsystemc -o systemc_helloworld systemc_helloworld.cpp Greetings from Munich, Lasse
×
×
  • Create New...