Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waf searches for wrong ns-3 libs #13

Open
fam4r opened this issue Aug 22, 2020 · 3 comments
Open

waf searches for wrong ns-3 libs #13

fam4r opened this issue Aug 22, 2020 · 3 comments

Comments

@fam4r
Copy link

fam4r commented Aug 22, 2020

Hello,

using this scenario template with ndnSIM 2.8 (ns-3.30.1) and running waf configure I ran into an error.

$ ./waf configure
Setting top to                           : /home/ndn/simulation
Setting out to                           : /home/ndn/simulation/build
Checking for 'gcc' (C compiler)          : /usr/bin/gcc
Checking for 'g++' (C++ compiler)        : /usr/bin/g++
Checking C++ compiler version            : 9.3.0
Checking supported CXXFLAGS              : -std=c++14
Checking supported LINKFLAGS             : -fuse-ld=gold
Checking for program 'pkg-config'        : /usr/bin/pkg-config
Checking for pkg-config version >= '0.0.0' : yes
Checking for ns3-core                      : not found
NS-3 or one of the required NS-3 modules not found
NS-3 needs to be compiled and installed somewhere.  You may need also to set PKG_CONFIG_PATH variable in order for configure find installed NS-3.
For example:
    PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH ./waf configure

(complete log in /home/ndn/simulation/build/config.log)

Then I inspected config.log:

$ cat build/config.log
[...]
Checking for ns3-core
['/usr/bin/pkg-config', '--cflags', '--libs', 'libns3-dev-core-optimized']
err: Package libns3-dev-core-optimized was not found in the pkg-config search path.
Perhaps you should add the directory containing `libns3-dev-core-optimized.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libns3-dev-core-optimized' found

not found
from /home/ndn/simulation: The configuration failed

Using PKG_CONFIG_PATH variable option didn't help.

I investigated more and observed that filenames are different!
Since ndnSIM 2.8 (ns-3.30.1) the compiled files have the following prefix

libns3.30.1-

But in the older versions (like ndnSIM 2.7 which is based on ns-3.29) the compiled files were following the prefix searched by waf:

libns3-dev-

I also tried to run a simulation example directly into the ns-3 folder and it works, so I guess this is the problem.

If needed, I can post here build logs, you tell me.

I installed ndnSIM as described into ndnsim.net.

Debug info:

  • OS: Ubuntu 20.04
  • ndnSIM version: 2.8
  • ns-3 version 3.30.1
@cawka
Copy link
Member

cawka commented Aug 22, 2020

As a quick hack, you can modify .waf-tools/ns3.py to reference libns3.30.1- prefix. I will try to make a bit more general version of it / fix base NS3 to revert back to the old convention.

@cawka
Copy link
Member

cawka commented Aug 22, 2020

Just in case, you can pull changes from base NS-3 and it should fix the issue

@babapgc
Copy link

babapgc commented Dec 26, 2022

As a quick hack, you can modify .waf-tools/ns3.py to reference libns3.30.1- prefix. I will try to make a bit more general version of it / fix base NS3 to revert back to the old convention.

as fam4r diagnose the problem correctly. With libns3.30.1- prefix it doesn't work for me. I have to do libns3.35.- in .waf-tools/ns3.py file. I think latest ns3 update the library and this prefix no longer work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants