Undefined symbols in gem5 library

Description

When building the latest gem5 library version for TLM coupling

a lot of symbols are undefined:

U FPCDParams::create() const
U IGbEParams::create() const
U TAGEParams::create() const
U VGicParams::create() const
U A9SCUParams::create() const
U BIPRPParams::create() const
U CacheParams::create() const
U CPackParams::create() const
U FALRUParams::create() const
U GicV2Params::create() const
U Gicv3Params::create() const
U HDLcdParams::create() const
U LFURPParams::create() const
U LRURPParams::create() const
U LTAGEParams::create() const
U MRURPParams::create() const
U Pl011Params::create() const
U PL031Params::create() const
U Pl050Params::create() const
U Pl111Params::create() const
U SinicParams::create() const
U Sp804Params::create() const
U Sp805Params::create() const
U ArmISAParams::create() const
U ArmMMUParams::create() const
U ArmPMUParams::create() const
U ArmPPIParams::create() const
U ArmSPIParams::create() const
U ArmTLBParams::create() const
U BridgeParams::create() const
U FIFORPParams::create() const
U FUDescParams::create() const
U FUPoolParams::create() const
U Gicv2mParams::create() const
U I2CBusParams::create() const
U NSGigEParams::create() const
U OpDescParams::create() const
U SMMUv3Params::create() const
U SwitchParams::create() const
U SystemParams::create() const
U BRRIPRPParams::create() const
U DisplayParams::create() const
U IdeDiskParams::create() const
U IsaFakeParams::create() const
...

This problem does not occur in older versions of the develop branch or on the stable branch.

Environment

Ubuntu 20.04 LTS
gcc 9.3.0
Python 3.8.5
SCons 3.1.2

Activity

Show:
Jason Lowe-Power
March 11, 2021, 11:47 PM

Thanks for fixing this, Gabe! We appreciate your effort!

Jason Lowe-Power
March 9, 2021, 3:48 PM

This relation chain needs to be moved to staging so it will be included in the release. We can’t have a release which breaks an important use case.

Gabe Black
March 9, 2021, 6:37 AM
Gabe Black
March 9, 2021, 4:23 AM

The weak symbols are probably not helping and are fairly easy to get rid of, but after digging around I found that the problem is actually the --without-python and --with-cxx-config which leaves out my default create() creating stuff. Without the default and without an explicit definition, then there’s a problem. I’ll both remove the weak symbols (which are often problematic) and add in the default create() stuff for the cxx-config.

Gabe Black
March 9, 2021, 1:34 AM

This isn’t something that can easily just be rolled back. I suspect the problem are the weak symbols that are used to allow you to define a create() method even when you have a standard constructor, since the gnu dynamic linker (and probably others) has non-ideal behavior related to weak symbols. That capability isn’t used very much, and wouldn’t be that big of a deal to do without. It could be something else though, I’ll have to play with it to see.

Done

Assignee

Gabe Black

Reporter

Lukas Steiner

Priority

Highest

Affects versions

Fix versions

Components

Labels