Anonymous | Login | 2021-03-09 03:19 UTC | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0001051 | OMNeT++ | simulation kernel | public | 2018-09-18 09:03 | 2018-09-19 09:23 | ||||||||
Reporter | andras | ||||||||||||
Assigned To | andras | ||||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||||
Status | new | Resolution | open | ||||||||||
Platform | Linux | OS | Ubuntu | OS Version | 16.04 | ||||||||
Product Version | 5.4.1 | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0001051: Module class not found due to soft links in the NED folder's path | ||||||||||||
Description | It is possible to get the "Class X not found" error for a module class when there is a soft link in the path. This occurs when: - the class is in a C++ namespace - @namespace is declared in a package.ned in an ancestor directory - the path to the NED folder contains a soft link - the NED path (-n option) is specified with an absolute path. The reason is that the package.ned is not found when looking up the namespace for the class; and the reason for that is that getcwd() resolves soft links leading to an alternative pathname for the package.ned, which causes it not to be found in a map indexed by path name. | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files | |||||||||||||
![]() |
|
(0001370) andras (administrator) 2018-09-18 09:14 |
Steps to reproduce. Create the following files: ==> x/package.ned <== @namespace(ns); ==> x/omnetpp.ini <== [General] network=inet.Foo ==> x/inet/Foo.ned <== package inet; simple Foo { @class(Foo); @isNetwork(true); } ==> x/inet/Foo.cc <== #include <omnetpp.h> namespace ns { class Foo : public omnetpp::cSimpleModule {}; Register_Class(Foo); } Build an executable simulation and try it: cd x opp_makemake --deep make ./x # works fine Then create a softlink to x, and run the simulation: cd .. ln -s x x-softlinked cd x-softlinked pwd # /home/you/.../x-softlinked (abs path w/ softlink) ./x -n $(pwd) # error: class not found |
(0001371) andras (administrator) 2018-09-18 09:18 |
Suggested workaround: resolve symlinks before passing the path to the -n (NED path) option, e.g. using realpath. The following will fix the above example: ./x -n $(realpath $(pwd)) |
(0001372) andras (administrator) 2018-09-18 09:24 |
related bug: 0000813 Recursive folder symlink in Ned search path generates infinite loop setting up simulation |
(0001377) attila (developer) 2018-09-19 09:23 |
Also see the investigation in: https://github.com/riebl/artery/issues/28 [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2018-09-18 09:03 | andras | New Issue | |
2018-09-18 09:14 | andras | Note Added: 0001370 | |
2018-09-18 09:18 | andras | Note Added: 0001371 | |
2018-09-18 09:19 | andras | Assigned To | => andras |
2018-09-18 09:19 | andras | Status | new => confirmed |
2018-09-18 09:20 | andras | Status | confirmed => new |
2018-09-18 09:24 | andras | Note Added: 0001372 | |
2018-09-19 09:23 | attila | Note Added: 0001377 |
Copyright © 2000 - 2021 MantisBT Team |