gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Gem5 linker error due to undefined reference to `gem5::Cache_ControllerParams::create() const'

AD
Anhdung Duong Ngo
Mon, Oct 14, 2024 7:09 PM

Hello,

I am trying to use shared_ptr for the Packet class.  I changed  "typedef Packet *PacketPtr" to "typedef std::shared_ptr<Packet> PacketPtr" and made all the needed associated changes.  My code compiled fine, but I now have this linker error:

build/ARM/python/m5/param_Cache_Controller.cc:77: undefined reference to gem5::Cache_ControllerParams::create() const' build/ARM/python/_m5/param_Memory_Controller.do: In function gem5::module_init(pybind11::module&)'

There are also similar errors for Memory_Controller, MiscNode_Controller, and TrafficGenerator_Controller.

Does anybody know how to fix this issue?  Per a comment in build_tools/sim_object_param_struct_cc.py, "gem5::Cache_ControllerParams::create() const" is auto generated via some magic template trick that I don't understand.
Also, has anybody done something similar to this before and has pointers to share?

Thank you

Hello, I am trying to use shared_ptr for the Packet class. I changed "typedef Packet *PacketPtr" to "typedef std::shared_ptr<Packet> PacketPtr" and made all the needed associated changes. My code compiled fine, but I now have this linker error: build/ARM/python/_m5/param_Cache_Controller.cc:77: undefined reference to `gem5::Cache_ControllerParams::create() const' build/ARM/python/_m5/param_Memory_Controller.do: In function `gem5::module_init(pybind11::module_&)' There are also similar errors for Memory_Controller, MiscNode_Controller, and TrafficGenerator_Controller. Does anybody know how to fix this issue? Per a comment in build_tools/sim_object_param_struct_cc.py, "gem5::Cache_ControllerParams::create() const" is auto generated via some magic template trick that I don't understand. Also, has anybody done something similar to this before and has pointers to share? Thank you
PM
Poremba, Matthew
Mon, Oct 14, 2024 9:16 PM

[Public]

Hello,

Is this on develop? I made some recent Ruby changes. If you create a github issue I can track this better

-Matt

-----Original Message-----
From: Anhdung Duong Ngo via gem5-dev gem5-dev@gem5.org
Sent: Monday, October 14, 2024 12:10 PM
To: The gem5 Developer List gem5-dev@gem5.org; gem5-users gem5-users@gem5.org
Cc: Ngo, Anhdung anh.ngo1@samsung.com
Subject: [gem5-dev] Gem5 linker error due to undefined reference to `gem5::Cache_ControllerParams::create() const'

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.

Hello,

I am trying to use shared_ptr for the Packet class.  I changed  "typedef Packet *PacketPtr" to "typedef std::shared_ptr<Packet> PacketPtr" and made all the needed associated changes.  My code compiled fine, but I now have this linker error:

build/ARM/python/m5/param_Cache_Controller.cc:77: undefined reference to gem5::Cache_ControllerParams::create() const' build/ARM/python/_m5/param_Memory_Controller.do: In function gem5::module_init(pybind11::module&)'

There are also similar errors for Memory_Controller, MiscNode_Controller, and TrafficGenerator_Controller.

Does anybody know how to fix this issue?  Per a comment in build_tools/sim_object_param_struct_cc.py, "gem5::Cache_ControllerParams::create() const" is auto generated via some magic template trick that I don't understand.
Also, has anybody done something similar to this before and has pointers to share?

Thank you


gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-leave@gem5.org

[Public] Hello, Is this on develop? I made some recent Ruby changes. If you create a github issue I can track this better -Matt -----Original Message----- From: Anhdung Duong Ngo via gem5-dev <gem5-dev@gem5.org> Sent: Monday, October 14, 2024 12:10 PM To: The gem5 Developer List <gem5-dev@gem5.org>; gem5-users <gem5-users@gem5.org> Cc: Ngo, Anhdung <anh.ngo1@samsung.com> Subject: [gem5-dev] Gem5 linker error due to undefined reference to `gem5::Cache_ControllerParams::create() const' Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. Hello, I am trying to use shared_ptr for the Packet class. I changed "typedef Packet *PacketPtr" to "typedef std::shared_ptr<Packet> PacketPtr" and made all the needed associated changes. My code compiled fine, but I now have this linker error: build/ARM/python/_m5/param_Cache_Controller.cc:77: undefined reference to `gem5::Cache_ControllerParams::create() const' build/ARM/python/_m5/param_Memory_Controller.do: In function `gem5::module_init(pybind11::module_&)' There are also similar errors for Memory_Controller, MiscNode_Controller, and TrafficGenerator_Controller. Does anybody know how to fix this issue? Per a comment in build_tools/sim_object_param_struct_cc.py, "gem5::Cache_ControllerParams::create() const" is auto generated via some magic template trick that I don't understand. Also, has anybody done something similar to this before and has pointers to share? Thank you _______________________________________________ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-leave@gem5.org