After Tom's invaluable help, this problem is solved.
Tom pointed out that the solution is to issue the following commands:
(as per the 'workaround' in the first comment of
https://github.com/iovisor/bcc/issues/492 )
sudo apt-get install -y llvm-3.8-dev libclang-3.8-dev
sudo mkdir -p /usr/lib/llvm-3.8/share/llvm
sudo ln -s /usr/share/llvm-3.8/cmake /usr/lib/llvm-3.8/share/llvm/cmake
sudo sed -i -e '/get_filename_component(LLVM_INSTALL_PREFIX/ {s|^|#|}' -e '/^# Compute the installation prefix/i set(LLVM_INSTALL_PREFIX "/usr/lib/llvm-3.8")' /usr/lib/llvm-3.8/share/llvm/cmake/LLVMConfig.cmake
sudo sed -i '/_IMPORT_CHECK_TARGETS Polly/ {s|^|#|}' /usr/lib/llvm-3.8/share/llvm/cmake/LLVMExports-relwithdebinfo.cmake
sudo sed -i '/_IMPORT_CHECK_TARGETS sancov/ {s|^|#|}' /usr/lib/llvm-3.8/share/llvm/cmake/LLVMExports-relwithdebinfo.cmake
sudo ln -s /usr/lib/x86_64-linux-gnu/libLLVM-3.8.so.1 /usr/lib/llvm-3.8/lib/
After this, I reinstalled NS3.27 using bake.py (following the instructions of the manual)
https://www.nsnam.org/docs/manual/html/python.html#working-with-python-bindingsWhen running ./bake.py build, make sure to check that CastXml was built "OK".
Then run ./waf configure
IMPORTANT: make sure that waf finds the castxml that you've built. In other words, you may have an old version of castxml in your /usr/bin/ directory. I.e., you should see something like
Checking for program 'castxml' : ~/ns-allinone-3.27/build/bin/castxml
To make sure waf finds the castxml that you just built, do the following: go to the build/bin directory and issue the following commands:
cd ~/ns-allinone-3.27/bake/build/bin
export PATH=`pwd`:$PATH
then run ./waf configure again.
After that, I was able to run
./waf --apiscan=lr-wpan --no32bit-scan
and the python bindings were generated.
Thanks again to Tom's help.
B Fonseca