3.43 deprecation warnings.

76 views
Skip to first unread message

Timothy Miller

unread,
Oct 16, 2024, 9:05:17 AM10/16/24
to ns-3-users
3.43 deprecated several names (ns3::LrWpanNetDevice and ns3::BasicEnergySource in particular).   I'm certainly not using the LrWpan model in these scripts so I'm not entirely certain why it's being pulled in (I'll have to dig through the inheritance/collab at some point), but in the meantime I tried `NS_WARNING_SILENCE_DEPRECATED` in `main()` and it has no effect.  What am I missing?

Tommaso Pecorella

unread,
Oct 16, 2024, 9:51:17 AM10/16/24
to ns-3-users
These should be "just" warnings, so they should not block your compilation.
About the deprecations, it's because these classes have been moved to the respective namespaces, hence, the deprecation (in the parent namespace).

The problem is where these warnings come from, and on this I don't have any clue. We should see the script and the logs.

NS_WARNING_SILENCE_DEPRECATED (and the corresponding NS_WARNING_POP), have to be used just before the lines using the deprecated classes.
If in the main file you don't use the deprecated classes, then they'll not do anything.

Tom Henderson

unread,
Oct 16, 2024, 9:53:45 AM10/16/24
to ns-3-...@googlegroups.com, Timothy Miller
If you are using NetAnim's AnimationInterface in your scripts, it will emit the deprecation warnings due to the use of deprecated strings for TypeIds.  This was recently fixed in a recent commit:  https://gitlab.com/nsnam/ns-3-dev/-/commit/49deb677cef21c15ce312bf1fc7f166b7cc9dac6

You can try to apply that patch, and if it doesn't resolve for you, I suggest to search your code for any lingering usages of 'ns3::LrWpanNetDevice' string, such as:
find . -name '*.cc' | xargs grep 'ns3::LrWpanNetDevice'

- Tom

 On 10/16/24 06:05, Timothy Miller wrote:
3.43 deprecated several names (ns3::LrWpanNetDevice and ns3::BasicEnergySource in particular).   I'm certainly not using the LrWpan model in these scripts so I'm not entirely certain why it's being pulled in (I'll have to dig through the inheritance/collab at some point), but in the meantime I tried `NS_WARNING_SILENCE_DEPRECATED` in `main()` and it has no effect.  What am I missing? --
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/a55a2963-b688-4e8f-a154-f185f101ea31n%40googlegroups.com.


Timothy Miller

unread,
Oct 16, 2024, 10:57:19 AM10/16/24
to ns-3-users
Tracking; it's just annoying to clutter up stderr. 
Message has been deleted

Timothy Miller

unread,
Oct 18, 2024, 10:53:31 AM10/18/24
to ns-3-users
NetAnim would be it, my colleague added that recently (for reasons that remain unclear to me, but that's a different story).

Appreciate the pointer to the commit, I'll apply it locally for now and catch up at next release.

Reply all
Reply to author
Forward
0 new messages