Bug 1709787
| Summary: | ImportError: cannot import name '_gi' from 'gi' | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Lumír Balhar <lbalhar> | ||||
| Component: | pygobject3 | Assignee: | Miro Hrončok <mhroncok> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | urgent | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | rawhide | CC: | besser82, icq, jkonecny, john.j5live, karsten, mhroncok, mkolman, nphilipp, sbueno, walters | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2019-05-22 15:07:23 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1686977, 1710754 | ||||||
| Attachments: |
|
||||||
This looks like broken gobject introspection. Switching components. Switching components again, as python3-gobject3 is EPEL7, only. fedmod:
+ /usr/bin/python3 -c 'import sys; sys.argv[0] = '\''fedmod'\''; from _fedmod import cli; cli.run()'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/builddir/build/BUILD/fedmod-0.6.2/_fedmod/__init__.py", line 1, in <module>
import gi
File "/usr/lib64/python3.8/site-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: cannot import name '_gi' from 'gi' (/usr/lib64/python3.8/site-packages/gi/__init__.py)
Same problem from libmodulemd (linked the FTBFS bug). Same problem with gnofract4d
+ xvfb-run -a -n 23 /usr/bin/python3 createdocs.py
/builddir/build/BUILD/gnofract4d-4.0.1/fract4d/absyn.py:198: SyntaxWarning: invalid escape sequence \s
m = re.match(".*?(\s*\(\s*(\w+)\s*\))", id)
Problem creating docs. Online help will be incomplete.
cannot import name '_gi' from 'gi' (/usr/lib64/python3.8/site-packages/gi/__init__.py)
error: Bad exit status from /var/tmp/rpm-tmp.WHZFDt (%build)
gplugin:
-- checking if pygobject works with python3
CMake Error at python/CMakeLists.txt:76 (message):
pygobject does not work with python3
-- Configuring incomplete, errors occurred!
See also "/builddir/build/BUILD/gplugin-0.27.0/x86_64-redhat-linux-gnu/CMakeFiles/CMakeOutput.log".
error: Bad exit status from /var/tmp/rpm-tmp.rKoICu (%build)
Colin, could you please prioritize this? We plan to move Python 3.8 to a side tag in ~2 weeks. Packages that will fail to rebuild will block merging the side tag back to rawhide (~1 month from now) and may not be installable in Fedora 31. package Zim:
+ ./setup.py build
./setup.py:264: SyntaxWarning: invalid escape sequence \m
'the following two commands:\m'
/builddir/build/BUILD/zim-0.70/zim/fs.py:164: SyntaxWarning: invalid escape sequence \s
'''Translates paths for windows shares in the platform specific
/builddir/build/BUILD/zim-0.70/zim/parsing.py:267: SyntaxWarning: invalid escape sequence \w
'''Wrapper around regex pattern objects which memorizes the
/builddir/build/BUILD/zim-0.70/zim/parsing.py:365: SyntaxWarning: invalid escape sequence \w
is_uri_re = Re('^(\w[\w\+\-\.]*):')
/builddir/build/BUILD/zim-0.70/zim/parsing.py:367: SyntaxWarning: invalid escape sequence \w
is_url_re = Re('^(\w[\w\+\-\.]*)://')
/builddir/build/BUILD/zim-0.70/zim/parsing.py:369: SyntaxWarning: invalid escape sequence \S
is_email_re = Re('^(mailto:\S+|[^\s:]+)\@\S+\.\w+(\?.+)?$', re.U)
/builddir/build/BUILD/zim-0.70/zim/parsing.py:381: SyntaxWarning: invalid escape sequence \w
is_interwiki_re = Re('^(\w[\w\+\-\.]*)\?(.*)', re.U)
/builddir/build/BUILD/zim-0.70/zim/parsing.py:383: SyntaxWarning: invalid escape sequence \w
is_interwiki_keyword_re = re.compile('^\w[\w\+\-\.]*$', re.U)
Traceback (most recent call last):
File "./setup.py", line 25, in <module>
import makeman # helper script
File "/builddir/build/BUILD/zim-0.70/makeman.py", line 13, in <module>
from zim.main import HelpCommand
File "/builddir/build/BUILD/zim-0.70/zim/main/__init__.py", line 22, in <module>
import zim.fs
File "/builddir/build/BUILD/zim-0.70/zim/fs.py", line 27, in <module>
from zim.signals import SignalEmitter, SIGNAL_AFTER
File "/builddir/build/BUILD/zim-0.70/zim/signals.py", line 7, in <module>
from gi.repository import GObject
File "/usr/lib64/python3.8/site-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: cannot import name '_gi' from 'gi' (/usr/lib64/python3.8/site-packages/gi/__init__.py)
caribou:
Traceback (most recent call last):
File "../tools/make_schema.py", line 3, in <module>
from gi.repository import GLib
File "/usr/lib64/python3.8/site-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: cannot import name '_gi' from 'gi' (/usr/lib64/python3.8/site-packages/gi/__init__.py)
make[2]: *** [Makefile:851: org.gnome.antler.gschema.xml.in] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/caribou-0.4.21/data'
make[1]: *** [Makefile:519: all-recursive] Error 1
make: *** [Makefile:474: all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.VK1FEu (%build)
Bad exit status from /var/tmp/rpm-tmp.VK1FEu (%build)
The cause is - /usr/lib64/python3.8/site-packages/gi/_gi.cpython-38m-x86_64-linux-gnu.so has incorrect name:
<mock-chroot> sh-5.0# python3 -c 'from gi.repository import GLib'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib64/python3.8/site-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: cannot import name '_gi' from 'gi' (/usr/lib64/python3.8/site-packages/gi/__init__.py)
<mock-chroot> sh-5.0# mv /usr/lib64/python3.8/site-packages/gi/_gi.cpython-38m-x86_64-linux-gnu.so /usr/lib64/python3.8/site-packages/gi/_gi.cpython-38-x86_64-linux-gnu.so
<mock-chroot> sh-5.0# python3 -c 'from gi.repository import GLib'
Note that since 3.8.0a4, the "m" is not supposed to be there. Is it somehow hardcoded?
<mock-chroot> sh-5.0# python3-config --extension-suffix
.cpython-38-x86_64-linux-gnu.so
I don't see it hardcoded in spec, must be the build system, will examine. Note: The Python 3 tests are skipped in %check. If they were not, the package would probably fail to build. Examining the build log, this might simply require a bumped rebuild... Yes, sorry about the noise. *** Bug 1710754 has been marked as a duplicate of this bug. *** The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |
Created attachment 1568364 [details] Full build log from COPR python-simpleline-1.4-2.fc31 fails to build from source in Fedora rawhide with Python 3.8. Test failure is: BUILDSTDERR: ====================================================================== BUILDSTDERR: ERROR: simpleline_tests.glib_tests (unittest.loader._FailedTest) BUILDSTDERR: ---------------------------------------------------------------------- BUILDSTDERR: ImportError: Failed to import test module: simpleline_tests.glib_tests BUILDSTDERR: Traceback (most recent call last): BUILDSTDERR: File "/usr/lib64/python3.8/unittest/loader.py", line 470, in _find_test_path BUILDSTDERR: package = self._get_module_from_name(name) BUILDSTDERR: File "/usr/lib64/python3.8/unittest/loader.py", line 377, in _get_module_from_name BUILDSTDERR: __import__(name) BUILDSTDERR: File "/builddir/build/BUILD/simpleline-1.4/tests/simpleline_tests/glib_tests/__init__.py", line 21, in <module> BUILDSTDERR: from simpleline.event_loop.glib_event_loop import GLibEventLoop BUILDSTDERR: File "/builddir/build/BUILD/simpleline-1.4/simpleline/event_loop/glib_event_loop.py", line 29, in <module> BUILDSTDERR: import gi BUILDSTDERR: File "/usr/lib64/python3.8/site-packages/gi/__init__.py", line 42, in <module> BUILDSTDERR: from . import _gi BUILDSTDERR: ImportError: cannot import name '_gi' from 'gi' (/usr/lib64/python3.8/site-packages/gi/__init__.py) BUILDSTDERR: ---------------------------------------------------------------------- BUILDSTDERR: Ran 166 tests in 0.154s BUILDSTDERR: FAILED (errors=1) BUILDSTDERR: make: *** [Makefile:26: test] Error 1 RPM build errors: BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.sv12vt (%check) BUILDSTDERR: Bad exit status from /var/tmp/rpm-tmp.sv12vt (%check) Child return code was: 1