Bug 1485853 - [abrt] glib2-devel: module(): gdbus-codegen:41:<module>:ModuleNotFoundError: No module named 'codegen'
Summary: [abrt] glib2-devel: module(): gdbus-codegen:41:<module>:ModuleNotFoundError: ...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: glib2
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:8227d6cbeb74b0f38e147368c9b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-28 09:16 UTC by Matteo Settenvini
Modified: 2018-11-30 18:42 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-30 18:42:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (687 bytes, text/plain)
2017-08-28 09:16 UTC, Matteo Settenvini
no flags Details
File: cgroup (387 bytes, text/plain)
2017-08-28 09:16 UTC, Matteo Settenvini
no flags Details
File: cpuinfo (1.12 KB, text/plain)
2017-08-28 09:16 UTC, Matteo Settenvini
no flags Details
File: environ (429 bytes, text/plain)
2017-08-28 09:16 UTC, Matteo Settenvini
no flags Details
File: mountinfo (3.75 KB, text/plain)
2017-08-28 09:16 UTC, Matteo Settenvini
no flags Details
File: namespaces (102 bytes, text/plain)
2017-08-28 09:16 UTC, Matteo Settenvini
no flags Details
File: open_fds (244 bytes, text/plain)
2017-08-28 09:16 UTC, Matteo Settenvini
no flags Details

Description Matteo Settenvini 2017-08-28 09:16:39 UTC
Description of problem:
I was trying to compile empathy master branch through gnome-builder (flatpak nightly).

Version-Release number of selected component:
glib2-devel-2.53.6-1.fc27

Additional info:
reporter:       libreport-2.9.1
cmdline:        /usr/bin/python3 /bin/gdbus-codegen --interface-prefix org.gnome.Empathy. --c-namespace EmpathyGen --generate-c-code chat-manager-interface Chat_Manager.xml
crash_function: module
exception_type: ModuleNotFoundError
executable:     /bin/gdbus-codegen
kernel:         4.13.0-0.rc5.git1.1.fc27.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
gdbus-codegen:41:<module>:ModuleNotFoundError: No module named 'codegen'

Traceback (most recent call last):
  File "/bin/gdbus-codegen", line 41, in <module>
    from codegen import codegen_main
ModuleNotFoundError: No module named 'codegen'

Local variables in innermost frame:
__name__: '__main__'
__doc__: None
__package__: None
__loader__: <_frozen_importlib_external.SourceFileLoader object at 0x7fbc05d7c5f8>
__spec__: None
__annotations__: {}
__builtins__: <module 'builtins' (built-in)>
__file__: '/bin/gdbus-codegen'
__cached__: None
os: <module 'os' from '/usr/lib64/python3.6/os.py'>
sys: <module 'sys' (built-in)>
srcdir: None
filedir: '/bin'
path: '/bin/../share/glib-2.0'

Comment 1 Matteo Settenvini 2017-08-28 09:16:44 UTC
Created attachment 1319031 [details]
File: backtrace

Comment 2 Matteo Settenvini 2017-08-28 09:16:45 UTC
Created attachment 1319032 [details]
File: cgroup

Comment 3 Matteo Settenvini 2017-08-28 09:16:47 UTC
Created attachment 1319033 [details]
File: cpuinfo

Comment 4 Matteo Settenvini 2017-08-28 09:16:48 UTC
Created attachment 1319034 [details]
File: environ

Comment 5 Matteo Settenvini 2017-08-28 09:16:50 UTC
Created attachment 1319035 [details]
File: mountinfo

Comment 6 Matteo Settenvini 2017-08-28 09:16:51 UTC
Created attachment 1319036 [details]
File: namespaces

Comment 7 Matteo Settenvini 2017-08-28 09:16:53 UTC
Created attachment 1319037 [details]
File: open_fds

Comment 8 Mats Wichmann 2017-11-08 17:31:43 UTC
+metoo.

gdbus-codegen in 2.54.1 (f27 pre-rel) is computing a relative path to the python modules it needs. If gdbus-codegen is found in a path ending in 'bin', this happens:

    # Make the prefix containing gdbus-codegen 'relocatable' at runtime by
    # adding /some/prefix/bin/../share/glib-2.0 to the python path
    path = os.path.join(filedir, '..', 'share', 'glib-2.0')

In Fedora, /bin and /usr/bin are the same thing, so if the script is called as /usr/bin/codegen, path ends up as /usr/bin/../share/glib-2.0 which works fine.  If it is called as /bin/codegen - the identical script! - path ends up as /bin/../share/glib-2.0 which is not, as there is no /share directory.

It can't be illegal to call the script as /bin/gdbus-codegen, can it?

I don't know that this is exactly the problem Matteo is seeing, but the outcome is certainly identical in a failure to import the module. In builds using scons the system path is not necessarily inherited and if the constructed path happens to have /bin first, this breaks.

This is the same (and fully described) in bug 1507661, I just added here because that one is tagged RHEL7 and my problem is explicitly Fedora.  Bugs should be combined if possible.

Comment 9 Ali Akcaagac 2017-11-26 05:37:58 UTC
I confirm this issue on Fedoa 27...

Just switched from Fedora 26 to Fedora 27 and wanted to recompile Xfce Git through an automate build process. Running the same processes as I did on Fedora 26.

But on Fedora 27 this failed to compile xfconf because gdbus-codegen wasn't able to find the module "codegen". This caused the entire rat's tail of other Xfce related Git sources to fail building.

It would be urgently required to have this issue fixed.

I also confirm, that the git commits to gdbus-codegen (from the b.g.o report) solved the issue.

Btw: I test what becomes Xfce 4.14

Comment 10 Ben Cotton 2018-11-27 17:51:43 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Ben Cotton 2018-11-30 18:42:24 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.