Running NS-3-DCE on Debian Trixie

41 views
Skip to first unread message

Anders Martinsson

unread,
Sep 24, 2025, 7:49:41 PMSep 24
to ns-developers
Hi all,

I have a series of patches that make NS-3-DCE run on Debian Trixie without a custom glibc.

I have prepared patches for NS-3.35 and DCE 1.12 because I think that is a good start.

Does anyone have time to look at these patches? The patches work for everything I need (running programs written in C and Rust).

Best regards Anders Martinsson

Tom Henderson

unread,
Sep 24, 2025, 7:58:46 PMSep 24
to Anders Martinsson, ns-developers

Yes, are you able to open a pull request on DCE's github site and we can discuss them there?

- Tom

--
You received this message because you are subscribed to the Google Groups "ns-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-developer...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ns-developers/f773036b-e846-4189-9738-74850ef88580n%40googlegroups.com.

Anders Martinsson

unread,
Sep 25, 2025, 9:37:34 AMSep 25
to ns-developers
torsdag 25 september 2025 kl. 01:58:46 UTC+2 skrev tomh...@gmail.com:

Yes, are you able to open a pull request on DCE's github site and we can discuss them there?

Yes, that should work fine for me. Expect the patches early next week (v40).

Anders Martinsson

unread,
Oct 7, 2025, 8:30:47 AMOct 7
to ns-developers
torsdag 25 september 2025 kl. 15:37:34 UTC+2 skrev Anders Martinsson:
torsdag 25 september 2025 kl. 01:58:46 UTC+2 skrev tomh...@gmail.com:

Yes, are you able to open a pull request on DCE's github site and we can discuss them there?

Yes, that should work fine for me. Expect the patches early next week (v40).

Sorry for missing my own dead-line with one week.

Anders Martinsson

unread,
Oct 10, 2025, 7:39:54 AMOct 10
to ns-developers
tisdag 7 oktober 2025 kl. 14:30:47 UTC+2 skrev Anders Martinsson:
torsdag 25 september 2025 kl. 15:37:34 UTC+2 skrev Anders Martinsson:
torsdag 25 september 2025 kl. 01:58:46 UTC+2 skrev tomh...@gmail.com:

Yes, are you able to open a pull request on DCE's github site and we can discuss them there?

Yes, that should work fine for me. Expect the patches early next week (v40).

Sorry for missing my own dead-line with one week.


I have prepared a DCE version that build on Debian Trixie.

It require removal of final for GetInstanceTypeId in NS-3 (src/core/model/object.h).

I can create a pull request whenever it's suitable.

Anders Martinsson

unread,
Nov 26, 2025, 10:40:08 AM (3 days ago) Nov 26
to ns-developers
Hi again,

I got some help and now DCE builds on Debian Trixie with the latest NS-3 realease (3.46).
https://github.com/direct-code-execution/ns-3-dce/pull/147

I get runtime problems related to TypeId in DceManagerHelper::DceManagerHelper () that use ConstructSelf.

There is a good error message that explain what should be done, I haven't been able to follow the advice.

I'm not all that good at C++ so it could be something simple I'm missing.

The assert I trigger is:

    NS_ABORT_MSG_IF(TypeId::LookupByNameFailSafe("ns3::Object", &objectTid) && tid == objectTid,
                    "ObjectBase::ConstructSelf() has been called on an object of a class derived "
                    "from the Object class, but the TypeId is still set to ns3::Object.\n"
                    "This is known to happen in two cases:\n"
                    "- ObjectBase::ConstructSelf() is called in the class constructor; in this "
                    "case, override ObjectBase::NotifyConstructionCompleted() to access the "
                    "initial values of the object attributes as soon as object construction is "
                    "completed (see issue #1249)\n"
                    "- the class deriving from Object does not define a static GetTypeId() method");
                   
The class derived from Object (DceManagerHelper) has a static GetTypeId() method.
I have read the information in issue #1249 but still can't figure it out.

Any help would be appreciated.

Best regards Anders

Gabriel Ferreira

unread,
Nov 26, 2025, 11:00:26 AM (3 days ago) Nov 26
to ns-developers
Hi Anders,

The problem is in ConstructSelf being called at object constructor.

DceManagerHelper::DceManagerHelper ()
{
  ConstructSelf (AttributeConstructionList ());
  m_taskManagerFactory.SetTypeId ("ns3::TaskManager");
  m_schedulerFactory.SetTypeId ("ns3::RrTaskScheduler");
  m_managerFactory.SetTypeId ("ns3::DceManager");
  m_networkStackFactory.SetTypeId ("ns3::Ns3SocketFdFactory");
  m_delayFactory.SetTypeId ("ns3::RandomProcessDelayModel");
  m_virtualPath = "";
}

This also generated issues and was changed recently. https://gitlab.com/nsnam/ns-3-dev/-/issues/1249
Touching attributes can only be done after the object is fully constructed.
You just need

TypeId
DceManagerHelper::GetTypeId (void)
{
  static TypeId tid = TypeId ("ns3::DceManagerHelper")
    .SetParent<Object> ()
    .AddAttribute ("LoaderFactory",
                   "The kind of loader factory created when Install is called",
                   StringValue ("ns3::CoojaLoaderFactory[]"),
                   MakeObjectFactoryAccessor (&DceManagerHelper::m_loaderFactory),
                   MakeObjectFactoryChecker ())
  ;
  return tid;
}

DceManagerHelper::DceManagerHelper ()
{
}

void
DceManagerHelper::NotifyConstructionCompleted()
{
  Object::NotifyConstructionCompleted();
  m_taskManagerFactory.SetTypeId ("ns3::TaskManager");
  m_schedulerFactory.SetTypeId ("ns3::RrTaskScheduler");
  m_managerFactory.SetTypeId ("ns3::DceManager");
  m_networkStackFactory.SetTypeId ("ns3::Ns3SocketFdFactory");
  m_delayFactory.SetTypeId ("ns3::RandomProcessDelayModel");
  m_virtualPath = "";
Reply all
Reply to author
Forward
0 new messages