Article View: linux.debian.bugs.dist
Article #4843Bug#1154237: systemc: Can you rebuild/re-upload the libsystemc for testing
From: Tarik Graba
Date: Tue, 17 Nov 2026 12:40
Date: Tue, 17 Nov 2026 12:40
102 lines
5853 bytes
5853 bytes
Package: systemc
Severity: normal
Dear Maintainer,
libsystemc.so actually provided in testing (forky) and unstable is built
using the C++17 standard which is the default for g++ in stable (trixie).
It seems that the default for g++ in testing is now C++20 which leads to
linkage errors when using g++ defaults (without specifying std=c++17 in
CXXFLAGS).
TL;DR could you please re-upload the libsystemc-dev package for testing
after a rebuilt with default g++ options.
----
Simple test:
```
echo -e '#include<systemc>\nint sc_main(int,char**){return 0;}' | g++ -x
c++ -lsystemc -
```
works on stable (trixie) but fails on testing (forky) with the following:
```
/usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccOZens0.o: in function
`__static_initialization_and_destruction_0()':
<stdin>:(.text+0x2b): undefined reference to
`sc_core::sc_api_version_3_0_2_cxx202002L::sc_api_version_3_0_2_cxx202002L(sc_core::sc_writer_policy,
bool)'
collect2: error: ld returned 1 exit status
```
Forcing the C++ version solve the issue. i.e. :
```
echo -e '#include<systemc>\nint sc_main(int,char**){return 0;}' | g++
--std=c++17 -x c++ -lsystemc -
```
This is due to the fact that systemc creates the sc_api object to be
sure that the same options have been used to build the library and the
final executable. The name of this object is constructed using the
__cplusplus g++ predefined macro.
The default value can be found, for example, with the following command:
```
echo __cplusplus | g++ -E -x c++ - | grep 20
```
Which gives in stable (trixie) `201703L` (default C++17) while in
testing (forky) we get `202002L` (default C++20).
This macro is used to initialize SC_CPLUSPLUS macro in systemc headers
and to construct the sc_api object.
---
Regarding systemc and the IEEE Std. 1666-2023 standard...
The standard mandates "C++17 as the baseline for SystemC" as indicated here:
https://github.com/accellera-official/systemc/blob/main/RELEASENOTES.md#6-c17-support
But, more recent versions of C++ are also supported. The documentation
says "Compiling this implementation for newer C++ standards is generally
possible and tested at a best effort basis."
And C++20 (and even 23) is already recognized by the build system as
indicated here:
https://github.com/accellera-official/systemc/blob/main/docs/INSTALL_USING_AUTOTOOLS.md#preprocessor-switches
---
I personally think that, for the Debian package, using g++ defaults is
the best option, as it allows to use the library without additional
compilation options. If somebody needs full IEEE conformance it will be
easy for him to rebuild the library with different options.
Finally, I have rebuilt the Debian package from source on testing, with
g++ defaults (checked that C++20 is used) without changing anything to
the package sources, and run all regression tests without issue.
If needed:
```
# before rebuild
objdump -TC /usr/lib/x86_64-linux-gnu/libsystemc-3.0.2.so | grep sc_api
00000000000d24c0 g DF .text 00000000000000af Base
sc_core::sc_api_version_3_0_2_cxx201703L::sc_api_version_3_0_2_cxx201703L(sc_core::sc_writer_policy,
bool)
# after rebuild
objdump -TC /usr/lib/x86_64-linux-gnu/libsystemc-3.0.2.so | grep sc_api
00000000000dac10 g DF .text 00000000000000b0 Base
sc_core::sc_api_version_3_0_2_cxx202002L::sc_api_version_3_0_2_cxx202002L(sc_core::sc_writer_policy,
bool)
Tarik
Technical Details
Message-ID:
<O0qDD-cseT-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!fu-berlin.de!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!fu-berlin.de!bofh.it!news.nic.it!robomod From: Tarik Graba <tarik.graba@telecom-paris.fr> Newsgroups: linux.debian.bugs.dist Subject: Bug#1154237: systemc: Can you rebuild/re-upload the libsystemc for testing Date: Tue, 17 Nov 2026 13:40:01 +0100 Message-ID: <O0qDD-cseT-1@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Tue Nov 17 12:33:08 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.751 Reply-To: Tarik Graba <tarik.graba@telecom-paris.fr>, 1154237@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: pkg-electronics-devel@alioth-lists.debian.net X-Debian-Pr-Message: report 1154237 X-Debian-Pr-Package: systemc X-Debian-Pr-Source: systemc Dkim-Filter: OpenDKIM Filter v2.10.3 zproxy2.enst.fr B4223809EB MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US Autocrypt: addr=tarik.graba@telecom-paris.fr; keydata= xjMEXXJQvxYJKwYBBAHaRw8BAQdAftNuB9pf1yFSReeSZzp+KIqyLT4eGroqoEkwZ5wjR1XN KlRhcmlrIEdyYWJhIDx0YXJpay5ncmFiYUB0ZWxlY29tLXBhcmlzLmZyPsKTBBMWCAA7AhsD BQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAFiEE47tlYF4wVFc2pbvLTbu7b6Opq1EFAl1yUTMC GQEACgkQTbu7b6Opq1EmIwEAxtRsFx1OvxGYtr0cny9hEd0feNWKHhzkRsdpK1GpdUQA/2aq K9MLGHrIUB+YfjvVm/iVCWsL/d1Pj6D6NuhTbuwPzjgEXXJQvxIKKwYBBAGXVQEFAQEHQJIW HE199mD2aEn/kmAi0BjPdJAB4J9FStn/CNaXAggBAwEIB8J4BBgWCAAgFiEE47tlYF4wVFc2 pbvLTbu7b6Opq1EFAl1yUL8CGwwACgkQTbu7b6Opq1HAlwD9EZwDkSccNnX+9e3W6qVx1P8q ek1HmV8Vczwo0IpaKeYBAM/2Hzk4+x4IeAql7N8CCr/0MsqbCk6V9OjVu9hn3oYI Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: delayed 506 seconds by postgrey-1.37 at buxtehude; Tue, 17 Nov 2026 12:31:09 UTC X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2003139 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 102 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Tue, 17 Nov 2026 13:22:31 +0100 X-Original-Message-ID: <5378775b-b979-41cf-a77e-c9bd432c7f84@telecom-paris.fr>