Bug 2989 - waf compatibility with Python 3.7
waf compatibility with Python 3.7
Status: CONFIRMED
Product: ns-3
Classification: Unclassified
Component: build system
ns-3.29
All All
: P3 normal
Assigned To: Tom Henderson
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-09-06 00:30 EDT by Tom Henderson
Modified: 2018-09-06 14:09 EDT (History)
2 users (show)

See Also:


Attachments
output of waf configure (13.42 KB, text/plain)
2018-09-06 00:30 EDT, Tom Henderson
Details
output of waf -v (153.38 KB, text/plain)
2018-09-06 06:31 EDT, Stefano Avallone
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2018-09-06 00:30:08 EDT
Created attachment 3180 [details]
output of waf configure

I still see some issues with our Waf installation (ns-3.29) and Python 3.7 (error trace attached).  From a Fedora 28 machine with a Python 3.7 venv:

./bake.py configure -e ns-allinone-3.29
./bake.py download
./bake.py build
export PYTHONPATH=$PYTHONPATH:`pwd`/build/lib
export PATH=$PATH:`pwd`/build/bin
cd source/ns-3.29/
./waf configure
Comment 1 Stefano Avallone 2018-09-06 06:31:15 EDT
Created attachment 3181 [details]
output of waf -v

Tom,

the castxml error is likely due to a bug [1] which has been recently fixed. I think it should be enough to upgrade castxml.

Attached is the log I get with python 3.7 and everything up-to-date (castxml, pygccxml, pybindgen). Configure is fine (except for deprecation warning), but the build fails quite early.

[1] https://github.com/CastXML/CastXML/issues/102
Comment 2 Tom Henderson 2018-09-06 12:20:24 EDT
(In reply to Stefano Avallone from comment #1)
> Created attachment 3181 [details]
> output of waf -v
> 
> Tom,
> 
> the castxml error is likely due to a bug [1] which has been recently fixed.
> I think it should be enough to upgrade castxml.
> 
> Attached is the log I get with python 3.7 and everything up-to-date
> (castxml, pygccxml, pybindgen). Configure is fine (except for deprecation
> warning), but the build fails quite early.
> 
> [1] https://github.com/CastXML/CastXML/issues/102

The issue that you reference seems not to be fixed even with my use of the tip of castxml repository.

./bake.py con(venv) [buildslave@slave-fedora-28-64 bake]$ ./bake.py configure -e castxml
(venv) [buildslave@slave-fedora-28-64 bake]$ ./bake.py download
 >> Searching for system dependency llvm-dev - OK
 >> Searching for system dependency clang-dev - OK
 >> Searching for system dependency cmake - OK
 >> Downloading castxml - OK
(venv) [buildslave@slave-fedora-28-64 bake]$ ./bake.py build
 >> Building castxml - OK
(venv) [buildslave@slave-fedora-28-64 bake]$ cd build/bin/
(venv) [buildslave@slave-fedora-28-64 bin]$ ./castxml --help
: CommandLine Error: Option 'help-list' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Comment 3 Stefano Avallone 2018-09-06 12:39:31 EDT
(In reply to Tom Henderson from comment #2)
> The issue that you reference seems not to be fixed even with my use of the
> tip of castxml repository.

Looks like an updated clang/llvm is also necessary. I have clang/llvm 6.0.1 and it works fine. Previous versions should be affected instead.
Comment 4 Tom Henderson 2018-09-06 13:03:09 EDT
(In reply to Stefano Avallone from comment #3)
> (In reply to Tom Henderson from comment #2)
> > The issue that you reference seems not to be fixed even with my use of the
> > tip of castxml repository.
> 
> Looks like an updated clang/llvm is also necessary. I have clang/llvm 6.0.1
> and it works fine. Previous versions should be affected instead.

Unfortunately, Fedora 28 packages are also numbered 6.0.1 and are the latest:

[buildslave@slave-fedora-28-64 ~]$ dnf list installed | grep llvm
llvm.x86_64                                 6.0.1-6.fc28                @updates
llvm-devel.x86_64                           6.0.1-6.fc28                @updates
llvm-libs.x86_64                            6.0.1-6.fc28                @updates
llvm-static.x86_64                          6.0.1-6.fc28                @updates
[buildslave@slave-fedora-28-64 ~]$ dnf list installed | grep clang
clang.x86_64                                6.0.1-1.fc28                @updates
clang-devel.x86_64                          6.0.1-1.fc28                @updates
clang-libs.x86_64                           6.0.1-1.fc28                @updates
clang-tools-extra.x86_64                    6.0.1-1.fc28                @updates

What system are you on?

It seems like we might have some fixable (deprecation warnings) and some upstream/system issues for Fedora 28 with the Waf configuration via bake installation.

Plus, compilation issues that you are reporting.
Comment 5 Stefano Avallone 2018-09-06 13:21:16 EDT
(In reply to Tom Henderson from comment #4)
> What system are you on?

I am on ArchLinux.

Looking again at the CastXML bug I mentioned before, I noticed that this bug is still open (I was fooled by the fact that a commit fixing another issue referencing this one was merged).

The patch needed to fix this issue is reported in this comment:

https://github.com/CastXML/CastXML/issues/102#issuecomment-396061989

In fact, this patch has been applied through the ArchLinux PKGBUILD:

https://aur.archlinux.org/packages/castxml-git (loh commented on 2018-03-28 11:09)

sed -i "s|\${llvm_libs}|LLVM|g" src/CMakeLists.txt
Comment 6 Tom Henderson 2018-09-06 14:09:46 EDT
> In fact, this patch has been applied through the ArchLinux PKGBUILD:
> 
> https://aur.archlinux.org/packages/castxml-git (loh commented on 2018-03-28
> 11:09)
> 
> sed -i "s|\${llvm_libs}|LLVM|g" src/CMakeLists.txt


We should be able to apply this also with bake; thanks for digging it out.