Bug 1718283 - gplugin fails to build with Python 3.8
Summary: gplugin fails to build with Python 3.8
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gplugin
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Igor Raits
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F32FTBFS F32FailsToInstall PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-06-07 12:10 UTC by Petr Viktorin
Modified: 2019-11-27 00:23 UTC (History)
4 users (show)

Fixed In Version: gplugin-0.29.0-1.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-27 00:23:35 UTC
Type: Bug


Attachments (Terms of Use)

Description Petr Viktorin 2019-06-07 12:10:10 UTC
gplugin fails to build with Python 3.8.0b1.

The build no longer links to libpython, resulting in undefined references to Python API like Py_InitializeEx.
Code that embeds Python (rather than building an extension module) needs to pass `--embed` to any `python3-config --libs` invocation to build with Python 3.8.
More information: 
https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.8/fedora-rawhide-x86_64/00924614-gplugin/

For all our attempts to build gplugin with Python 3.8, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/gplugin/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.8:
https://copr.fedorainfracloud.org/coprs/g/python/python3.8/

Let us know here if you have any questions.

Comment 1 Miro Hrončok 2019-07-10 14:42:35 UTC
Igor?

Comment 2 Igor Raits 2019-07-28 15:06:15 UTC
0.28.0 is building now in rawhide. Now they are using meson as buildsystem, I guess this could be fixed. If not, please reopen this bug.

Comment 3 Miro Hrončok 2019-07-28 22:05:36 UTC
0.28.0-1.fc30
https://copr.fedorainfracloud.org/coprs/g/python/python3.8/build/985671/

+ /usr/bin/meson --buildtype=plain --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/libexec --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localedir=/usr/share/locale --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --wrap-mode=nodownload --auto-features=enabled . x86_64-redhat-linux-gnu -Ddoc=false
The Meson build system
Version: 0.51.1
Source dir: /builddir/build/BUILD/gplugin-0.28.0
Build dir: /builddir/build/BUILD/gplugin-0.28.0/x86_64-redhat-linux-gnu
Build type: native build
Project name: gplugin
Project version: 0.28.0
Appending CFLAGS from environment: '-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
Appending LDFLAGS from environment: '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
C compiler for the build machine: cc (gcc 9.1.1 "cc (GCC) 9.1.1 20190605 (Red Hat 9.1.1-2)")
Appending CFLAGS from environment: '-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
Appending LDFLAGS from environment: '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
C compiler for the host machine: cc (gcc 9.1.1 "cc (GCC) 9.1.1 20190605 (Red Hat 9.1.1-2)")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Program help2man found: YES (/usr/bin/help2man)
Found pkg-config: /usr/bin/pkg-config (1.6.3)
Run-time dependency glib-2.0 found: YES 2.61.1
Run-time dependency gobject-2.0 found: YES 2.61.1
Run-time dependency gmodule-2.0 found: YES 2.61.1
Compiler for C supports arguments -Wformat: YES 
Compiler for C supports arguments -Wformat -Werror=format-security: YES 
Configuring gplugin-version.sh using configuration
Found pkg-config: /usr/bin/pkg-config (1.6.3)
WARNING: Project targetting '>=0.37.0' but tried to use feature introduced in '0.50.0': install arg in configure_file
Configuring gplugin-version.h using configuration
Configuring gplugin.h using configuration
Configuring gplugin-native.h using configuration
WARNING: Project targetting '>=0.37.0' but tried to use feature introduced in '0.41.0': variables arg in pkgconfig.generate
WARNING: Project targetting '>=0.37.0' but tried to use feature introduced in '0.41.0': custom pkgconfig variables
Run-time dependency gtk+-3.0 found: YES 3.24.10
Configuring gplugin-gtk.h using configuration
Configuring gplugin-gtk.xml using configuration
Configuring gplugin.spec using configuration
Run-time dependency lua found: YES 5.3.5
Checking if "lua "lgi" module" with dependency lua runs: YES
Run-time dependency python3 found: YES 3.8
Run-time dependency pygobject-3.0 found: YES 3.32.2
Checking if "Python GI" with dependencies glib-2.0, python3, pygobject-3.0 runs: DID NOT COMPILE

python/meson.build:28:2: ERROR: Problem encountered: pygobject does not work with python3

A full log can be found at /builddir/build/BUILD/gplugin-0.28.0/x86_64-redhat-linux-gnu/meson-logs/meson-log.txt

Comment 4 Igor Raits 2019-07-29 04:40:12 UTC
Could you paste that meson-log.txt please?

Comment 5 Igor Raits 2019-07-29 04:44:31 UTC
In any case, https://github.com/mesonbuild/meson/issues/5629 is being discussed upstream.

Do you need gplugin quickly or it can wait? If quickly, you can actually s/python3/python3-embed/ in that meson.build.

Comment 6 Miro Hrončok 2019-07-29 08:53:17 UTC
(In reply to Igor Gnatenko from comment #4)
> Could you paste that meson-log.txt please?

Sorry, this was from Copr, so I don't have it.

You can run the build in mock to get the file, mock config file at https://copr.fedorainfracloud.org/coprs/g/python/python3.8/

Comment 7 Miro Hrončok 2019-07-30 14:42:30 UTC
> Do you need gplugin quickly or it can wait?

It can wait.

Comment 8 Ben Cotton 2019-08-13 17:04:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 9 Ben Cotton 2019-08-13 18:52:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 10 Miro Hrončok 2019-08-14 22:24:57 UTC
The coordinated rebuild of Python 3.8 has started in the `f32-python` side tag.

If you figure out how to rebuild this package, please don't rebuild it in regular rawhide, but use the side tag instead:

    on branch master:
    $ fedpkg build --target=f32-python

To wait for a build to show up in the side tag, do:

    $ koji wait-repo f32-python --build=<nvr>

Where <nvr> is name-version-release of the source package, e.g. python-foo-1.1-2.fc32.

An updated mock config is posted at:
http://copr.fedorainfracloud.org/coprs/g/python/python3.8/

Note that it will take a while before the essential packages are rebuilt, so don't expect all your dependencies to be available right away.

Thanks. Let us know if you need up to date info, or if you have any questions.



PS this message is mass posted to all the bugs that block the PYTHON38 bug. If this is also a Fedora 31 FTBFS bug and you manage to fix it, you can do a f31 build as usual:

    on branch f31:
    $ fedpkg build

Comment 11 Miro Hrončok 2019-08-20 22:50:03 UTC
> Do you need gplugin quickly or it can wait?

Now I want it quickly please ;)

Comment 12 Miro Hrončok 2019-08-21 16:35:44 UTC
The f32-python side tag has been merged. In order to rebuild the package, do it in regular rawhide, but please wait until python3-3.8 is tagged:

  $ koji wait-repo f32-build --build python3-3.8.0~b3-3.fc32


If your built already started in f32-python, after it is finished, please tag it to rawhide with:

  $ koji tag-build f32-pending <nvr>

For example:

  $ koji tag-build f32-pending libreoffice-6.3.0.4-3.fc32

Thanks!

(This comment is mass posted to all bugzillas blocking the PYTHON38 tracking bug.)

Comment 13 Miro Hrončok 2019-08-21 17:29:41 UTC
(Python 3.8 has landed in the rawhide buildroot.)

Comment 14 Elliott Sales de Andrade 2019-09-14 10:51:05 UTC
Log output is:
Command line:  cc -I/usr/include/pygobject-3.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/python3.8 /builddir/build/BUILD/gplugin-0.28.0/python/gplugin-python-test-pygobject.c -o /tmp/tmphpdlgtq3/output.exe -pipe -Wl,--start-group /usr/lib64/libglib-2.0.so /usr/lib64/libgobject-2.0.so -Wl,--end-group -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -D_FILE_OFFSET_BITS=64 -O0 -std=c99 

Code:
 /builddir/build/BUILD/gplugin-0.28.0/python/gplugin-python-test-pygobject.c
Compiler stdout:
 
Compiler stderr:
 In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from /builddir/build/BUILD/gplugin-0.28.0/python/gplugin-python-test-pygobject.c:18:
/usr/include/features.h:397:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
  397 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
      |    ^~~~~~~
/usr/bin/ld: /tmp/ccSOWmxP.o: in function `_Py_DECREF':
/usr/include/python3.8/object.h:478: undefined reference to `_Py_Dealloc'
/usr/bin/ld: /tmp/ccSOWmxP.o: in function `pygobject_init':
/usr/include/pygobject-3.0/pygobject.h:302: undefined reference to `PyImport_ImportModule'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:304: undefined reference to `PyErr_Occurred'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:308: undefined reference to `PyErr_Fetch'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:309: undefined reference to `PyObject_Repr'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:325: undefined reference to `PyUnicode_FromFormat'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:329: undefined reference to `PyExc_ImportError'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:329: undefined reference to `PyErr_SetObject'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:341: undefined reference to `PyExc_ImportError'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:341: undefined reference to `PyErr_SetString'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:347: undefined reference to `PyObject_GetAttrString'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:348: undefined reference to `PyCapsule_Type'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:349: undefined reference to `PyCapsule_GetPointer'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:352: undefined reference to `PyExc_ImportError'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:352: undefined reference to `PyErr_SetString'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:364: undefined reference to `PyObject_GetAttrString'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:366: undefined reference to `PyExc_ImportError'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:366: undefined reference to `PyErr_SetString'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:371: undefined reference to `PyArg_ParseTuple'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:373: undefined reference to `PyExc_ImportError'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:373: undefined reference to `PyErr_SetString'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:383: undefined reference to `PyExc_ImportError'
/usr/bin/ld: /usr/include/pygobject-3.0/pygobject.h:383: undefined reference to `PyErr_Format'
/usr/bin/ld: /tmp/ccSOWmxP.o: in function `main':
/builddir/build/BUILD/gplugin-0.28.0/python/gplugin-python-test-pygobject.c:32: undefined reference to `Py_IsInitialized'
/usr/bin/ld: /builddir/build/BUILD/gplugin-0.28.0/python/gplugin-python-test-pygobject.c:33: undefined reference to `Py_InitializeEx'
/usr/bin/ld: /builddir/build/BUILD/gplugin-0.28.0/python/gplugin-python-test-pygobject.c:50: undefined reference to `PySys_SetArgvEx'
/usr/bin/ld: /builddir/build/BUILD/gplugin-0.28.0/python/gplugin-python-test-pygobject.c:57: undefined reference to `PyErr_Occurred'
/usr/bin/ld: /builddir/build/BUILD/gplugin-0.28.0/python/gplugin-python-test-pygobject.c:58: undefined reference to `PyErr_Print'
collect2: error: ld returned 1 exit status

Could not compile test file /builddir/build/BUILD/gplugin-0.28.0/python/gplugin-python-test-pygobject.c: 1


Since gplugin is asking for headers from pygobject-3.0 via pkgconfig, this seems like a bug in its pkgconfig file. It should list Python3 correctly if it's going to reference it.

Comment 15 Miro Hrončok 2019-09-16 08:38:00 UTC
This issue is blocking the Python 3.8 rebuilds. If this package won't build with 3.8, it won't be installable, along with all its dependent packages, in Fedora 32.
Furthermore, as it fails to install, its dependent packages will fail to install and/or build as well.

Could you please look into this?

Comment 16 Elliott Sales de Andrade 2019-11-01 04:54:33 UTC
This should be fixed in gplugin 0.28.2.

Comment 17 Miro Hrončok 2019-11-17 23:47:24 UTC
Could you please look into this?

Comment 18 Igor Raits 2019-11-18 06:29:46 UTC
I'll upgrade gplugin to latest version today.

Comment 19 Fedora Update System 2019-11-18 11:48:50 UTC
FEDORA-2019-187b264d83 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-187b264d83

Comment 20 Fedora Update System 2019-11-19 03:15:27 UTC
gplugin-0.29.0-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-187b264d83

Comment 21 Fedora Update System 2019-11-27 00:23:35 UTC
gplugin-0.29.0-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.


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