netskink Posted April 18, 2022 Report Share Posted April 18, 2022 Hello I am trying to use this repo https://github.com/amiq-consulting/fc4sc and build its example code. The code uses the systemc.h header. I am on linux and I don't have access to systemc.h so I found your repo: https://github.com/accellera-official/systemc I was able to build the code despite the error in the INSTALLmd. https://github.com/accellera-official/systemc/issues/29 However, after running the final step of the install `gmake check and gmake install` I did not get any errors. I was expecting during the `gmake install` to at least get an error about not having permissions to modify a system directory. A quick check with `updatedb` and `locate systemc.h` shows that its still in the original source dirs. So, I am not real sure what install actually did. Looking at the Makefile I see a lot of install-x targets and they all seem to be documentation related. install-man, install-html, etc. Is this library intended to be used as is? ie. for user code, you simply point the include path at repo/include/systemc.h? or rep/src/systemc.h? Neither of these are located in the repo/objdir directory. John Quote Link to comment Share on other sites More sharing options...
David Black Posted April 18, 2022 Report Share Posted April 18, 2022 There's a lot more you need to learn I suspect. Hopefully, you are a strong C++ coder and good with templates. I can provide a few pointers and a general comment or two. 1. Prefer <systemc> over "systemc.h". The latter contains some questionable C++ coding practices w.r.t. header files, but remains in the standard for legacy code. 2. The installation should have pointed you to an installation directory, where you will find an include/ and lib/ directory. You should at the include/ directory's path to your compilation switches, and add the library directory (usually lib/ or lib-linux/) to your linker options. 3. Make sure you compile everything with the same compiler and C++ standard version. 4. During the install process you should find some instructions to specify where to install. Personally, I usually choose $HOME/.local/apps/systemc (creating the intermediates as needed). That way I won't need root privileges to install. Personally, I find using the cmake build approach smoother than autotools. Want to learn more? We have some free tutorials and other resources under https://doulos.com/knowhow/systemc/ (Full disclosure: I work for Doulos as an instructor.) Quote Link to comment Share on other sites More sharing options...
netskink Posted April 20, 2022 Author Report Share Posted April 20, 2022 Ahh, I got a reply on the github issue tracker. I had cloned the git repo but did not checkout a particular tag or branch. Later I got it to build. David, in regards to your response. Many thanks. I'll save these comments to my notes as I learn systemc enough to do my job. Many thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.