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

[wip] ns3 update + Dce (direct code execution init) #41264

Closed
wants to merge 11 commits into from
Closed

Conversation

teto
Copy link
Member

@teto teto commented May 30, 2018

Motivation for this change

It's a bit messy at the moment but I share because I have some trouble generating the python bindings, castxml can't find standard headers such as stddef.h. I've read a few issues about it and tried a few things to no avail.

./waf --apiscan=all --no32bit-scan -v
Waf: Entering directory `/home/teto/scratch/source/build'
Modules to scan:  ['antenna', 'applications', 'bridge', 'buildings', 'config-store', 'core', 'csma', 'energy', 'fd-net-device', 'internet', 'lr-wpan', 'lte', 'mobility', 'mpi', 'network', 'point-to-point', 'point-to-point-layout', 'propagation', 'spectrum', 'stats', 'traffic-control', 'uan', 'virtual-net-device', 'wave', 'wifi', 'wimax']
api-scan-gcc_LP64
api-scan-gcc_LP64
api-scan-gcc_LP64
api-scan-gcc_LP64
<ns3modulegen_core_customizations.SmartPointerTransformation object at 0x7f92fba03dd0>
<ns3modulegen_core_customizations.SmartPointerTransformation object at 0x7f5c4c9b5dd0>
<ns3modulegen_core_customizations.SmartPointerTransformation object at 0x7fe54ff56dd0>
INFO Parsing source file "/home/teto/scratch/source/build/ns3/antenna-module.h" ... 
INFO Parsing source file "/home/teto/scratch/source/build/ns3/buildings-module.h" ... 
INFO Parsing source file "/home/teto/scratch/source/build/ns3/bridge-module.h" ... 
warning: argument unused during compilation: '-nostdlibinc' [-Wunused-command-line-argument]
<ns3modulegen_core_customizations.SmartPointerTransformation object at 0x7f2470e35dd0>
warning: argument unused during compilation: '-nostdlibinc' [-Wunused-command-line-argument]
warning: argument unused during compilation: '-nostdlibinc' [-Wunused-command-line-argument]
In file included from /home/teto/scratch/source/build/ns3/bridge-module.h:10:
In file included from /home/teto/scratch/source/build/ns3/bridge-channel.h:21:
In file included from /home/teto/scratch/source/build/ns3/net-device.h:25:
In file included from /home/teto/scratch/source/build/ns3/callback.h:24:
In file included from /home/teto/scratch/source/build/ns3/ptr.h:24:
In file included from /nix/store/ng5kbr6kmh979qaachifbsbblydrcmqc-gcc-7.3.0/include/c++/7.3.0/iostream:39:
In file included from /nix/store/ng5kbr6kmh979qaachifbsbblydrcmqc-gcc-7.3.0/include/c++/7.3.0/ostream:38:
In file included from /nix/store/ng5kbr6kmh979qaachifbsbblydrcmqc-gcc-7.3.0/include/c++/7.3.0/ios:38:
In file included from /nix/store/ng5kbr6kmh979qaachifbsbblydrcmqc-gcc-7.3.0/include/c++/7.3.0/iosfwd:40:
In file included from /nix/store/ng5kbr6kmh979qaachifbsbblydrcmqc-gcc-7.3.0/include/c++/7.3.0/bits/postypes.h:40:
In file included from /nix/store/ng5kbr6kmh979qaachifbsbblydrcmqc-gcc-7.3.0/include/c++/7.3.0/cwchar:44:
/nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include/wchar.h:35:10: fatal error: 
      'stddef.h' file not found
#include <stddef.h>
         ^~~~~~~~~~

To reproduce the problem:

nix-shell -E 'with (import <nixpkgs> {}); ns3clang.override { pythonSupport=true; }
$ unpackPhase
$ cd source
$ configurePhase
$ buildPhase
$ ./waf --apiscan=all --no32bit-scan -v
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Modules to scan:  ['antenna', 'applications', 'bridge', 'buildings', 'config-store', 'core', 'csma', 'energy', 'fd-net-device', 'internet', 'lr-wpan', 'lte', 'mobility', 'mpi', 'network', 'point-to-point', 'point-to-point-layout', 'propagation', 'spectrum', 'stats', 'traffic-control', 'uan', 'virtual-net-device', 'wave', 'wifi', 'wimax']
api-scan-gcc_ILP32
api-scan-gcc_ILP32
api-scan-gcc_ILP32
api-scan-gcc_ILP32
Traceback (most recent call last):
  File "/home/teto/scratch/source/bindings/python/ns3modulescan-modular.py", line 7, in <module>
    from pybindgen.castxmlparser import ModuleParser, PygenClassifier, PygenSection, WrapperWarning, find_declaration_from_name
  File "/nix/store/asc432y7qzm5b76d2by2w71g2lp5lrx0-python-2.7.14-env/lib/python2.7/site-packages/pybindgen/castxmlparser.py", line 56, in <module>
    from cxxfilt import demangle
  File "/nix/store/asc432y7qzm5b76d2by2w71g2lp5lrx0-python-2.7.14-env/lib/python2.7/site-packages/cxxfilt/__init__.py", line 42, in <module>
    libcxx = ctypes.CDLL(find_any_library('c++', 'stdc++'))
  File "/nix/store/asc432y7qzm5b76d2by2w71g2lp5lrx0-python-2.7.14-env/lib/python2.7/ctypes/__init__.py", line 366, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libstdc++.so.6: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/home/teto/scratch/source/bindings/python/ns3modulescan-modular.py", line 7, in <module>
    from pybindgen.castxmlparser import ModuleParser, PygenClassifier, PygenSection, WrapperWarning, find_declaration_from_name
  File "/nix/store/asc432y7qzm5b76d2by2w71g2lp5lrx0-python-2.7.14-env/lib/python2.7/site-packages/pybindgen/castxmlparser.py", line 56, in <module>
    from cxxfilt import demangle
  File "/nix/store/asc432y7qzm5b76d2by2w71g2lp5lrx0-python-2.7.14-env/lib/python2.7/site-packages/cxxfilt/__init__.py", line 42, in <module>
    libcxx = ctypes.CDLL(find_any_library('c++', 'stdc++'))
  File "/nix/store/asc432y7qzm5b76d2by2w71g2lp5lrx0-python-2.7.14-env/lib/python2.7/ctypes/__init__.py", line 366, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libstdc++.so.6: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/home/teto/scratch/source/bindings/python/ns3modulescan-modular.py", line 7, in <module>
@bobvanderlinden
Copy link
Member

This still in progress?

@teto
Copy link
Member Author

teto commented Apr 14, 2019

@bobvanderlinden yes. I plan to split it into different PRs for easier reviewing in ~2 weeks.

@teto
Copy link
Member Author

teto commented Sep 20, 2019

this has become a bit of a mess. Check #67240 for the ns-3 update. I will work on the dce update.

@teto teto closed this Sep 20, 2019
@teto teto deleted the dce branch December 31, 2023 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants