Summary: | net-misc/openvswitch-2.6.0 : SyntaxError: invalid syntax | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Matthew Thode ( prometheanfire ) <prometheanfire> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alpha_one_x86, ckonstanski, dev-zero, hyedad, mgorny, nelo, sasha.devel, tobias.pal, virtualization, yaroslav.isakov |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 620200 | ||
Attachments: |
config.log
emerge-history.txt environment net-misc:openvswitch-2.6.0:20161005-012335.log emerge --info '=net-misc/openvswitch-2.6.0::gentoo' environment emerge-info.txt config.log.tbz2 emerge-history.txt environment etc.portage.tbz2 net-misc:openvswitch-2.7.0:20170305-081224.log temp.tbz2 |
Description
Toralf Förster
![]() Created attachment 449194 [details]
config.log
Created attachment 449196 [details]
emerge-history.txt
Created attachment 449198 [details]
environment
Created attachment 449200 [details]
net-misc:openvswitch-2.6.0:20161005-012335.log
gcc 6.2? Created attachment 449658 [details]
emerge --info '=net-misc/openvswitch-2.6.0::gentoo'
Hitting the same issue with GCC 5.2. The line producing the error (?) says something about python. Could this be related to #596172?
Created attachment 449660 [details]
environment
Ya, given some of the updates that went into this I'd ask that you give me the md5sum of the ebuild so I know it's the newer (fixed) one. Broken builds get fixed in place. Ebuild that failed, synced portage some minutes ago: 276f5489d7bb33f2a1fe67f9876bbf1e /usr/portage/net-misc/openvswitch/openvswitch-2.6.0.ebuild gcc 5.4.0 (the version you last tested with) is marked unstable for at least amd64. Can you test with the stable version (4.9.3)? I don't think the issue is with the python updates. Did previous versions build with newer GCC versions? After emerging and selecting gcc-4.9.3, openvswitch now fails with: configure: error: C compiler cannot create executables So I guess I will have to do more than that, but I am afraid this would screw my system... I can setup a test box with stable gcc but I can not manage to do this today. Oh, and yes, openvswitch-2.5.0 built fine with gcc-5.4. net-misc/openvswitch-2.6.0 built fine here at 2 older tinderbox images (around 1st of October) with gcc-6.2.0 : amd64-13.0-no-multilib-unstable_20160928-214001/var/log/emerge.log Sat Oct 1 09:33:40 2016 >>> net-misc/openvswitch-2.6.0 openvswitch: Sat Oct 1 09 amd64-13.0-systemd-unstable_20160928-214401/var/log/emerge.log Sat Oct 1 10:05:15 2016 >>> net-misc/openvswitch-2.6.0 openvswitch: Sat Oct 1 09:59:31 2016: 5 minutes, 44 seconds openvswitch: 1 times Ya, I'm not sure what I can do with this, I'm thinking there's an unstable lib in use or something. Here the version 2.6.0 fail with gcc version 4.9.3. Internet say it due to python due, confirmed by where it bug Why after all python flag disable it continue to call?: PYTHONPATH=./python":"$PYTHONPATH PYTHONDONTWRITEBYTECODE=yes /bin/sh /var/tmp/portage/net-misc/openvswitch-2.6.0/work/openvswitch-2.6.0/build-aux/missing python ./ovsdb/ovsdb-idlc.in annotate ./vtep/vtep.ovsschema ./vtep/vtep-idl.ann > vtep/vtep-idl.ovsidl.tmp && \ mv vtep/vtep-idl.ovsidl.tmp vtep/vtep-idl.ovsidl Well, there is a lot of bugs here. First error 'SyntaxError: invalid syntax' raised from that the configure script is unable to find python2.x. And that is because of line use monitor || export ovs_cv_python="no" in the src_configure() function of the ebuild. So, when we do not enable 'monitor' use flag, we tell the configure script that python is 'not found' (see config.log): > configure:14044: checking for Python 2.x for x >= 7 > configure:14077: result: no > configure:14097: checking for Python 3.x for x >= 4 > configure:14130: result: /usr/bin/python3 Again, this is a fragment of mine build.log: > checking for Python 2.x for x >= 7... (cached) no > checking for Python 3.x for x >= 4... /usr/bin/python3 It could be easily reproduced by out-of-portage build: tar xf openvswitch-2.6.0.tar.gz cd openvswitch-2.6.0 env ovs_cv_python="no" ./configure make But the build system still tries to run some code-generating scripts using default python (python3), which are not adapted for 3.x version. I tried to fix them locally by running: 2to3 -w build-aux/extract-ofp-actions 2to3 -w build-aux/extract-ofp-errors 2to3 -w build-aux/extract-ofp-msgs 2to3 -w build-aux/xml2nroff 2to3 -w ovsdb/ovsdb-doc 2to3 -w ovsdb/ovsdb-idlc.in ... and the 'SyntaxError: ...' gone. Unfortunally, this is NOT a solution now because 'disabled' python2 leads to disabling the build of several scripts under utilities/ directory. See Makefile.in: @HAVE_PYTHON_TRUE@am__append_30 = \ @HAVE_PYTHON_TRUE@ utilities/ovs-dpctl-top \ @HAVE_PYTHON_TRUE@ utilities/ovs-l3ping \ @HAVE_PYTHON_TRUE@ utilities/ovs-parse-backtrace \ @HAVE_PYTHON_TRUE@ utilities/ovs-pcap \ @HAVE_PYTHON_TRUE@ utilities/ovs-tcpdump \ @HAVE_PYTHON_TRUE@ utilities/ovs-tcpundump \ @HAVE_PYTHON_TRUE@ utilities/ovs-test \ @HAVE_PYTHON_TRUE@ utilities/ovs-vlan-test And emerge fails at the install phase because it can't find these files. So the only solution I can see is to remove the line use monitor || export ovs_cv_python="no" from the ebuild. Without it openvswitch-2.6.0 builds successfully, but fails to install with the following error: * The file has incompatible shebang: * file: /usr/lib/python-exec/python3.4/ovs-pcap * current shebang: #! /usr/bin/env /usr/bin/python2.7 * requested impl: python3.4 * ERROR: net-misc/openvswitch-2.6.0-r1::x-portage failed (install phase): * python_fix_shebang: conversion of incompatible shebang requested * Here I give up because my knowledge of portage/python ecosystem is very small. Ya, as a workaround we can statically enable monitor, I'll leave this bug open for now to track it. Will be worked around in r1 *** Bug 602936 has been marked as a duplicate of this bug. *** could this be retested with 2.7.0? same issue at an unstable amd64 chroot image (named plasma-abi32+64_20170228-094845) Created attachment 466036 [details]
emerge-info.txt
Created attachment 466038 [details]
config.log.tbz2
Created attachment 466040 [details]
emerge-history.txt
Created attachment 466042 [details]
environment
Created attachment 466044 [details]
etc.portage.tbz2
Created attachment 466046 [details]
net-misc:openvswitch-2.7.0:20170305-081224.log
Created attachment 466048 [details]
temp.tbz2
*** Bug 611834 has been marked as a duplicate of this bug. *** I imagine it's still the same in 2.8.1? The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9810e0f55cb9c8da7bdcf6bdcae630e61fcf3594 commit 9810e0f55cb9c8da7bdcf6bdcae630e61fcf3594 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-07-02 12:31:46 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-07-02 12:35:08 +0000 net-misc/openvswitch: add 2.17.2 Bug: https://bugs.gentoo.org/766135 Closes: https://bugs.gentoo.org/596206 Closes: https://bugs.gentoo.org/633516 Closes: https://bugs.gentoo.org/671776 Closes: https://bugs.gentoo.org/672870 Closes: https://bugs.gentoo.org/794535 Closes: https://bugs.gentoo.org/854663 Signed-off-by: Sam James <sam@gentoo.org> net-misc/openvswitch/Manifest | 1 + net-misc/openvswitch/openvswitch-2.17.2.ebuild | 152 +++++++++++++++++++++++++ 2 files changed, 153 insertions(+) |