Skip to content
New issue

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

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

Already on GitHub? # to your account

Installation Issues with dce-linux-dev #106

Open
realanda opened this issue Jun 29, 2020 · 6 comments
Open

Installation Issues with dce-linux-dev #106

realanda opened this issue Jun 29, 2020 · 6 comments

Comments

@realanda
Copy link

  • ns3 version (cat $NS3FOLDER/VERSION or the commit hash):
ns-3-dce: commit 1d88fea936a5ff84cb9e975bdc79ba5dd0ae5c8f
ns-3-dev: commit f15a942835134ac730a091dd4d3c62b348ea7a4
  • DCE version (git log|head -n1):
    commit 40c877996e416e271251061d881113a80548b04e

  • Operating system/version (lsb_release -a):

Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.6 LTS
Release:	16.04
Codename:	xenial
  • Libc version (ldd -v):
    ldd (Ubuntu GLIBC 2.23-0ubuntu11) 2.23

  • compiler version (gcc -v/g++ -v/clang -v/clang++ -v):

gcc (Ubuntu 5.5.0-12ubuntu1~16.04) 5.5.0 20171010
g++ (Ubuntu 5.5.0-12ubuntu1~16.04) 5.5.0 20171010

Description of the problem & Steps to reproduce

I am new to DCE. I am trying the following the steps in the Quick Start guide in order to build DCE (with Linux Kernel).

git clone https://gitlab.com/nsnam/bake.git
cd bake
export PATH=$PATH:`pwd`/build/bin:`pwd`/build/bin_dce
export PYTHONPATH=$PYTHONPATH:`pwd`/build/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/build/lib
python3 bake.py configure -e dce-linux-dev
python3 bake.py check
python3 bake.py show
python3 bake.py download
python3 bake.py build -vvv

all steps before the last command succeed with OK messages (i.e. check, show, download are successful). However, when I run the last command (i.e. python3 bake.py build -vvv)
I get the following messages:

 >> Built ns-3-dev - OK
 >> Building dce-linux-dev - Setting top to                           : /home/realanda/dcei/bake/source/ns-3-dce 
Setting out to                           : /home/realanda/dcei/bake/source/ns-3-dce/build 
Checking for 'gcc' (C compiler)          : /usr/bin/gcc 
Checking for cc version                  : 5.5.0 
Checking for 'g++' (C++ compiler)        : /usr/bin/g++ 
Checking for program 'pkg-config'        : /usr/bin/pkg-config 
Checking for pkg-config version >= '0.0.0' : yes 
Checking for -Wl,--soname=foo              : yes 
Checking for libns3-dev-core-debug (mandatory) : yes 
Checking for libns3-dev-network-debug (mandatory) : yes 
Checking for libns3-dev-internet-debug (mandatory) : yes 
Checking for libns3-dev-point-to-point-debug (optional) : yes 
Checking for libns3-dev-tap-bridge-debug (optional)     : yes 
Checking for libns3-dev-netanim-debug (optional)        : yes 
Checking for libns3-dev-wifi-debug (optional)           : yes 
Checking for libns3-dev-csma-debug (optional)           : yes 
Checking for libns3-dev-mobility-debug (optional)       : yes 
Checking for libns3-dev-point-to-point-layout-debug (optional) : yes 
Checking for libns3-dev-mpi-debug (optional)                   : not found 
Checking for libns3-dev-lte-debug (optional)                   : yes 
Checking for libns3-dev-visualizer-debug (optional)            : not found 
Checking for libns3-dev-applications-debug (optional)          : yes 
Checking for libns3-dev-fd-net-device-debug (optional)         : yes 
Checking for header stdint.h                                   : yes 
Checking for header inttypes.h                                 : yes 
Checking for header sys/inttypes.h                             : not found 
Checking for header sys/types.h                                : yes 
Checking for header sys/stat.h                                 : yes 
Checking for header dirent.h                                   : yes 
Checking for library dl                                        : yes 
Checking for glibc get_cpu_features                            : yes 
Checking for glibc secure_getenv                               : yes 
Checking for glibc explicit_bzero                              : no 
Checking for header valgrind/valgrind.h                        : yes 
Checking for header valgrind/memcheck.h                        : yes 
Checking for header sim.h                                      : yes 
Checking for libns3-dev-flow-monitor-debug (mandatory)         : yes 
Checking for 'gcc' (C compiler)                                : /usr/bin/gcc 
Checking for 'g++' (C++ compiler)                              : /usr/bin/g++ 
Checking for libns3-dev-mpi-debug (mandatory)                  : not found 
The configuration failed
(complete log in /home/realanda/dcei/bake/source/ns-3-dce/build/config.log)
 /usr/bin/python3 /home/realanda/dcei/bake/source/ns-3-dce/waf configure --prefix=/home/realanda/dcei/bake/build --with-ns3=/home/realanda/dcei/bake/build --with-elf-loader=/home/realanda/dcei/bake/build/lib --with-libaspect=/home/realanda/dcei/bake/build --enable-kernel-stack=/home/realanda/dcei/bake/source/ns-3-dce/../net-next-nuse-4.4.0/arch dir=/home/realanda/dcei/bake/source/ns-3-dce

 >> Building dce-linux-dev - Problem
   > Subprocess failed with error 1: ['/usr/bin/python3', '/home/realanda/dcei/bake/source/ns-3-dce/waf', 'configure', '--prefix=/home/realanda/dcei/bake/build', '--with-ns3=/home/realanda/dcei/bake/build', '--with-elf-loader=/home/realanda/dcei/bake/build/lib', '--with-libaspect=/home/realanda/dcei/bake/build', '--enable-kernel-stack=/home/realanda/dcei/bake/source/ns-3-dce/../net-next-nuse-4.4.0/arch']
 > Error:  Critical dependency, module "dce-linux-dev" failed 
   For more information call Bake with --debug and/or -v, -vvv, for full verbose mode (bake --help)

It appears there is some issue with libns3-dev-mpi-debug.

Further, when I grep in the bake folder for libns3-dev-mpi-debug, I see the following output, which may be useful:

 root@potato:/home/realanda/dcei/bake# grep -nr libns3-dev-mpi-debug .
./build_log.txt:7443:Checking for libns3-dev-mpi-debug (optional)                   : not found
./build_log.txt:7464:Checking for libns3-dev-mpi-debug (mandatory)                  : not found
./source/ns-3-dce/build/config.log:607:Checking for libns3-dev-mpi-debug (optional)
./source/ns-3-dce/build/config.log:608:['/usr/bin/pkg-config', '--cflags', '--libs', 'libns3-dev-mpi-debug']
./source/ns-3-dce/build/config.log:609:err: Package libns3-dev-mpi-debug was not found in the pkg-config search path.
./source/ns-3-dce/build/config.log:610:Perhaps you should add the directory containing `libns3-dev-mpi-debug.pc'
./source/ns-3-dce/build/config.log:612:No package 'libns3-dev-mpi-debug' found
./source/ns-3-dce/build/config.log:1416:Checking for libns3-dev-mpi-debug (mandatory)
./source/ns-3-dce/build/config.log:1417:['/usr/bin/pkg-config', '--cflags', '--libs', 'libns3-dev-mpi-debug']
./source/ns-3-dce/build/config.log:1418:err: Package libns3-dev-mpi-debug was not found in the pkg-config search path.
./source/ns-3-dce/build/config.log:1419:Perhaps you should add the directory containing `libns3-dev-mpi-debug.pc'
./source/ns-3-dce/build/config.log:1421:No package 'libns3-dev-mpi-debug' found

Note: I guess there are duplicate log messages because I attempted this installation multiple times.

=======================================

I would be grateful for any solution or advice regarding this issue.

@teto
Copy link
Member

teto commented Jun 29, 2020

you should enable MPI in your ns3-installation most likely (e.g., add it to the list of modules to compile, see ns-3 doc).

@realanda
Copy link
Author

Are you saying to build dce using waf? I tried to modify bakeconf.xml to add the --enable-mpi flag at appropriate places, but it still doesn't enable mpi.

Note that my use case doesn't require mpi.

@mervin0502
Copy link

@realanda I have the same problem.

@teto
Copy link
Member

teto commented Jul 2, 2020

I am saying you should build ns3 with mpi support since DCE cna't find the library (or build DCE without the library).
Double check that the library is present and that it''s not a PKG_CONFIG issue.
I don't use bake (and can't use it on my distrib either) and I am not sure how up to date it is.
btw I can't find the dce commit 40c877996e416e271251061d881113a80548b04e

@realanda
Copy link
Author

Hi, I'm still struggling with this issue. I was unable to set up MPI via bake, but then I tried manually with the -enable-mpi flag and I still got the same error. I am currently trying to dig into bake and see why libns3-dev-mpi-debug is not being generated.

@0100est
Copy link

0100est commented Aug 15, 2020

Hi. This is probably not the best way to do it (i.e. disable MPI in DCE), but it is easy to do it. Just remove the directory myscripts/dce-mpi-udp from the DCE distribution. Or rename it to mysqcripts/.dce-mpi-udp - it works just the same. And then I was able to build the DCE using waf (although initially I used "bake" for downloading everything and building everything, but it got stuck in building DCE because of the MPI error you mention above). The waf configure command I used is the one used by bake, namely:
./waf configure --prefix=/home/forest/Projects/ns-3-dce/python3-virtualenv-ns-3-dce/bake/build --with-ns3=/home/forest/Projects/ns-3-dce/python3-virtualenv-ns-3-dce/bake/build --enable-kernel-stack=/home/forest/Projects/ns-3-dce/python3-virtualenv-ns-3-dce/bake/source/ns-3-dce/../net-next-nuse-4.4.0/arch

After fixing the MPI error, I still had to add this where "cmpfunc" is defined in bindings/python/ns3_module_dce.cpp in order to avoid the compilation error "error: invalid conversion from ‘cmpfunc {aka void*}’ to ‘PyAsyncMethods*’ [-fpermissive]":
#if PY_VERSION_HEX >= 0x03000000
#if PY_VERSION_HEX >= 0x03050000
typedef PyAsyncMethods* cmpfunc;
#else
typedef void* cmpfunc;
#endif

I have approximately the same OS/library configuration as yours: Ubuntu 16.04.2 LTS, python3.5, gcc/g++ 5.4.0, used ns-3-dev, ns-3-dce.

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

No branches or pull requests

4 participants