Debian packages for SystemPerl and SystemC 2.3.0
Added by Iztok Jeras 4 months ago
Hi,
I am trying to package SystemPerl for Debian with the new SystemC 2.3.0 package I created for Debian.
I have problems with the next "make test" error: $ ./ex_main ./ex_main: error while loading shared libraries: libsystemc-2.3.0.so: cannot open shared object file: No such file or directory
but it works if I do: $ export LD_LIBRARY_PATH=/usr/lib-linux/:$LD_LIBRARY_PATH
I compiled the tool with the next environmental variables: $ printenv |grep SYS SYSTEMC=/usr/include/sysc SYSTEMC_LIBDIR=/usr/lib-linux SYSTEMC_INCLUDE=/usr/include/sysc
I checked the execution trace, and there were no attempts for path /usr/lib-linux
Another question is, since compile time SystemC paths are compiled into Verilator, is this also true for this library (this might be a stupid question, I am not sure this package has any executables, I do not know exactly what I am doing, but I will learn something doing it).
And a more generic question. If I decide to install SystemC libraries into the Debian standard /usr/lib I should be able to use all VeriPool tools by defining SYSTEMC_LIBDIR=/usr/lib. I expect issues installing and during 'make test' for TLM and UVM. TLM will be included in the final SystemC 2.3.0 release. Do you see any other issues with using the /usr/lib library path?
Regards, Iztok Jeras
Replies (6)
RE: Debian packages for SystemPerl and SystemC 2.3.0 - Added by Wilson Snyder 4 months ago
I think you must have built the systemc library (libsystemc.a) as a dynamic library stub, otherwise it would not need the shared library. While that should work, I don't generally recommend it, because the extra function call overhead in each shared library call causes measurable performance degradations in large simulations.
It probably would make sense for verilator to add the SYSTEMC_LIB_PATH to LD_LIBRARY_PATH; this would fix the test, but wouldn't work in general as the generated test executable isn't run under verilator itself, so there's no where to do the setenv.
So, I think you should install systemc as a default package you should put the systemc library somewhere that is in /etc/ld.so.conf, as you mentioned. lib-linux is something that systemc creates with the assumption that you're not installing it in a system library directory but instead in a user/project directory.
RE: Debian packages for SystemPerl and SystemC 2.3.0 - Added by Iztok Jeras 4 months ago
Hi,
SystemC provides both a static and dynamic libraries:
$ ls -la /usr/lib-linux
total 4184
drwxr-xr-x 2 root root 4096 2012-01-28 16:10 .
drwxr-xr-x 12 root root 4096 2012-01-28 16:10 ..
rw-r--r- 1 root root 1281008 2012-01-20 19:02 libsystemc-2.3.0.so
rw-r--r- 1 root root 2987740 2012-01-20 19:02 libsystemc.a
rw-r--r- 1 root root 967 2012-01-20 19:02 libsystemc.la
lrwxrwxrwx 1 root root 19 2012-01-20 19:02 libsystemc.so -> libsystemc-2.3.0.so
So I tried to add the option "-statis" to example/Makefile_obj, and it works. Seems the dynamic library is picked by default.
Now I plan to move SystemC libraries from /usr/lib-linux to /usr/lib and consequently modify packages depending on them. Hopefully I will be able to announce the availability of this packages on OpenCores.org next week. TLM and UVM will take some more time.
Regards, Iztok Jeras
RE: Debian packages for SystemPerl and SystemC 2.3.0 - Added by Iztok Jeras 4 months ago
Hi,
I have an installation issue, the 'src' directory is not being installed by 'make install'. I now copy it manually to '/usr/include/sysp'. Is there another preferred path, could Makefile be modified to install 'src'?
Could you please give a quick look at the list of installed files for my SystemPerl and Verilog-Perl packages, if anything is missing? For the package contents please search for the second instance of "chroot-autobuild/build/buildd/lib" in the next build logs: https://launchpadlibrarian.net/91382144/buildlog_ubuntu-oneiric-amd64.libsystemperl_1.340-1~ppa5_BUILDING.txt.gz https://launchpadlibrarian.net/90718488/buildlog_ubuntu-oneiric-amd64.libverilog-perl_3.313-1_BUILDING.txt.gz
Regards, Iztok Jeras
RE: Debian packages for SystemPerl and SystemC 2.3.0 - Added by Wilson Snyder 4 months ago
Logfiles look ok. The makefile doesn't install src because there was no standard perl Makefile variable across all versions that indicates where to install such files. But. if you have a idea about how this is best done, I'll fix it.
RE: Debian packages for SystemPerl and SystemC 2.3.0 - Added by Iztok Jeras 4 months ago
Hi,
I have almost no Perl knowledge, I wrote my first few Perl code lines two days ago.
For now default installation instructions could be updated to suggest a manual copy, also the resulting values for environmental variables could be added. SYSTEMPERL=/usr/bin SYSTEMPERL_INCLUDE=/usr/include/sysp When I was trying to set them properly all I was able to find were suggestions in the form /path/to/systemperl. I used the path /usr/include/sysp, since the default SystemC path is /usr/include/sysc, do you think something more descriptive like /usr/include/systemperl would be better?
Regards, Iztok Jeras
RE: Debian packages for SystemPerl and SystemC 2.3.0 - Added by Wilson Snyder 4 months ago
Hmm, yes I think /usr/include/systemperl is better. I'll add some prints to the installation process as you suggest.
(1-6/6)
![[logo]](/img/veripool_small.png)