Closed wrighton closed 9 months ago
I have switched to use cmake build, works out fine with this PR
Hi, I've noticed that 'out-of-box' a download of 2.3.4, ./configure does not work.
It reports:
configure: creating ./config.status config.status: creating Makefile config.status: error: cannot find input file: `src/Makefile.in'
For me, at least. Could this be fixed? (Maybe along with Mac ARM build support :-)
I think as workaround, you can use the bootsrapping script again (until a clean fix of course)
$ config/bootstrap
I find 2 problems trying to build 2.3.4.
1) After Git clone of repo - I do not find 'configure' file. 2) Extracting from the tar or zip archives from Accellera website - I do find a 'configure' file. But configure fails as posted already by 'merkaG' on this thread ( cannot find '/src/Makefile.in' )
Is Cmake a workaround? Could someone (like chenruii333) post the steps to build using Cmake or using the bootstrap script?
I find 2 problems trying to build 2.3.4.
1. After Git clone of repo - I do not find 'configure' file.
The Git repo is not suppose to have the
configure
script generated. As documented here: https://github.com/accellera-official/systemc/blob/master/INSTALL.md?plain=1#L3432. Extracting from the tar or zip archives from Accellera website - I do find a 'configure' file. But configure fails as posted already by 'merkaG' on this thread ( cannot find '/src/Makefile.in' )
My guess is that the zip archive might have been packaged incorrectly.
Is Cmake a workaround? Could someone (like chenruii333) post the steps to build using Cmake or using the bootstrap script?
CMake build is not a workaround, but would recommend it over autotools going forward as it makes it easier to integrate with other C++ libraries.
Here is a snippet on how to build the library using cmake:
git clone https://github.com/accellera-official/systemc
cd systemc
mkdir build
cd build
# Configure build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="<Path to where you want to install the library>" ..
# Build the core library
make -j`nproc`
# Run tests to make sure the build is working
make check -j`nproc`
# Install the library at your prescribed path
make install
For more detailed configuration I would recommend reading the documentation here: https://github.com/accellera-official/systemc/blob/master/cmake/INSTALL_USING_CMAKE
I find 2 problems trying to build 2.3.4.
1. After Git clone of repo - I do not find 'configure' file.
The Git repo is not suppose to have the
configure
script generated. As documented here: https://github.com/accellera-official/systemc/blob/master/INSTALL.md?plain=1#L343
Yes, I executed the /config/bootstrap script. And now have the missing file 'src/Makefile.in' But I cannot build using a 'build' or 'objdir' directory. However, I can build using 'configure' in the top level or root of my local Git repo.
- Extracting from the tar or zip archives from Accellera website - I do find a 'configure' file. But configure fails as posted already by 'merkaG' on this thread ( cannot find '/src/Makefile.in' )
My guess is that the zip archive might have been packaged incorrectly.
Is Cmake a workaround? Could someone (like chenruii333) post the steps to build using Cmake or using the bootstrap script?
CMake build is not a workaround, but would recommend it over autotools going forward as it makes it easier to integrate with other C++ libraries.
Here is a snippet on how to build the library using cmake:
git clone https://github.com/accellera-official/systemc
BTW, did not work for me. But this did work.
git clone https://github.com/accellera-official/systemc.git
No big deal - I recommend just copy the link in Github and clone.
cd systemc mkdir build cd build
Configure build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="
" ..
Did not work. But building in the top level of the local Git repo did work.
Build the core library
make -j
nproc
Run tests to make sure the build is working
make check -j
nproc
Install the library at your prescribed path
make install
**The above 'make' commands work after configuration. I can build using either Cmake or 'configure'. But not build into a local/temp folder. I tested my build with some of my code - it worked fine.** For more detailed configuration I would recommend reading the documentation here: https://github.com/accellera-official/systemc/blob/master/cmake/INSTALL_USING_CMAKE
Hmm strange on what system are you trying to configure and build the system library on? Can you share the following version details: OS, GCC, Make, CMake, etc.?
Yes - here are some requested details
Tuxedo Pulse15 gen1 with 64GB RAM.
dave@Pulse15:~ $ uname -a
Linux Pulse15 6.2.0-10005-tuxedo #5 SMP PREEMPT_DYNAMIC Wed Mar 22 12:42:40 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
dave@Pulse15:~ $ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
dave@Pulse15:~ $ make --version
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
dave@Pulse15:~ $ gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
dave@Pulse15:~ $ cmake --version
cmake version 3.25.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
I don't see any issue as your system seems quite up-to-date. I am currently using Fedora 37 and Ubuntu 20.04/22.04 versions without any issues with systemc libraries built out of tree(dedicated build directories). I am not really sure if any of these tools/system libraries are broken for some reason in your environment.
Closed due to missing feedback from original poster.
Hi, I've noticed that 'out-of-box' a download of 2.3.4, ./configure does not work.
It reports:
For me, at least. Could this be fixed? (Maybe along with Mac ARM build support :-)