Skip to content

Ubuntu 20.04 support #110

Description

@ParthPratim
  • ns3 version : ns-3.32
  • DCE version : commit 38b6242
  • Operating system/version : Ubuntu 20.04.1 LTS
  • Libc version : ldd (Ubuntu GLIBC 2.31-0ubuntu9) 2.31
  • compiler version : gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

Description of the problem

Branch to reproduce error: ubuntu-20.04-changes
On running the dce-iperf script on Ubuntu-20.04:

./waf --run dce-iperf

It throws the following error with Glibc:

Waf: Entering directory `/home/kiit/ltest3/bake/source/ns-3-dce/build'
Building library netlink
Building library dce
Building library dce-test
Building library dce-test-netlink
[302/322] Creating build/lib/pkgconfig/libns3-dev-netlink-debug.pc
[303/322] Creating build/lib/pkgconfig/libns3-dev-dce-debug.pc
Waf: Leaving directory `/home/kiit/ltest3/bake/source/ns-3-dce/build'
Build commands will be stored in build/compile_commands.json
'build' finished successfully (1.470s)
Don't know how to configure dynamic library path for the platform 'linux'; assuming it's LD_LIBRARY_PATH.
Fatal error: glibc detected an invalid stdio handle
Command ['/home/kiit/ltest3/bake/source/ns-3-dce/build/bin/dce-iperf'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").

output of ./waf configure

Setting top to                           : /home/kiit/ltest3/bake/source/ns-3-dce 
Setting out to                           : /home/kiit/ltest3/bake/source/ns-3-dce/build 
Checking for 'gcc' (C compiler)          : /usr/bin/gcc 
Checking for cc version                  : 9.3.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 
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
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          : yes 
Checking for header valgrind/valgrind.h    : not found 
Checking for header valgrind/memcheck.h    : not found 
Checking for 'gcc' (C compiler)            : /usr/bin/gcc 
Checking for 'g++' (C++ compiler)          : /usr/bin/g++ 
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Could not find lib*-core-debug
Checking for 'gcc' (C compiler)            : /usr/bin/gcc 
Checking for 'g++' (C++ compiler)          : /usr/bin/g++ 
Could not find lib*-core-debug
Could not find lib*-core-debug
Checking for header hook-manager.h         : not found 
Checking for program 'valgrind'            : not found 
Checking for program 'doxygen'             : /usr/bin/doxygen 
Checking for header netinet/sctp.h         : not found 
Checking for 'gcc' (C compiler)            : /usr/bin/gcc 
Checking for 'g++' (C++ compiler)          : /usr/bin/g++ 
Checking for program 'python'              : /usr/bin/python3 
Checking for python version >= 2.3         : 3.8.5 
python-config                              : /usr/bin/python3-config 
Asking python-config for pyembed '--cflags --libs --ldflags --embed' flags : yes 
Testing pyembed configuration                                              : yes 
Asking python-config for pyext '--cflags --libs --ldflags' flags           : yes 
Testing pyext configuration                                                : yes 
Checking for pybindgen location                                            : ../pybindgen (guessed) 
Checking for python module 'pybindgen'                                     : 0.21.0.post8+g3a8e313 
Checking for pybindgen version                                             : 0.21.0.post8+g3a8e313 
PyBindGen                                                                  : ok 
Checking for code snippet                                                  : yes 
Checking for types uint64_t and unsigned long equivalence                  : no 
Checking for code snippet                                                  : no 
Checking for types uint64_t and unsigned long long equivalence             : yes 
Checking for the apidefs that can be used for Python bindings              : gcc-LP64 
Checking for internal GCC cxxabi                                           : complete 
Checking for python module 'pygccxml'                                      : not found 
---- Summary of optional NS-3 features:
Static build                  : not enabled (option --enable-static not selected)
Logging                       : enabled
Assert checks                 : enabled
Code coverage                 : not enabled (option --enable-gcov not selected)
Example programs              : enabled
Test programs                 : enabled
Debug Symbols                 : enabled
ELF magic loader              : not enabled (elf-loader not found)
Aspect-based tracing          : not enabled (libaspect not found)
sctp-tools-dev                : not enabled (sctp-tools (netinet/sctp.h) not found)
Python Bindings               : enabled
Python API Scanning Support   : not enabled (Missing 'pygccxml' Python module)
'configure' finished successfully (2.696s)

Steps to reproduce

I have managed to build DCE on an Ubuntu-20.04 machine and have also mentioned the Github branch below to reproduce the same.

Things I did to get the DCE code to build :

  • Cloned into ns-3.32-alignment branch
  • Aligned a myscripts/mt3/dce-mt3.cc to the ns-3.32 API
  • I identified that the libio.h and _G_config.h header files were missing from Ubuntu-20.04 systems which implemented the _IO_getc and _IO_putc functions as required in libc-ns3.h. Bug Report
  • I had to commend out the lines DCE(_IO_getc) and DCE(_IO_putc) from libc-ns3.h.
  • I had to include the header file cstdarg.h to replace _G_va_list with __gnuc_va_list.
  • Included the header file linux/sockios.h to enable support for SIOCGSTAMP in test/test-socket.c.
  • The issue with bake.py show showing libc6-dbg requirement not satisfied was thrown because it isn't looking for ld-2.31.so and can be resolved by applying the following patch. Just download this patch and run git apply bake.patch
  • After applying the patch run bake.py configure -e dce-linux-dev

After building DCE when I ran the dce-iperf example it throws the following error
Fatal error: glibc detected an invalid stdio handle

I'm trying to work on this issue and would highly appreciate support from the DCE community.

Similar Issue : #57

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions