Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 677642

Summary: media-libs/opencolorio-1.1.0-r1 : /.../PyAllocationTransform.cpp:67:27: error: cast between incompatible function types from PyObject*
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: normal CC: andrius, jaak, lordvan, waebbl-gentoo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
media-libs:opencolorio-1.1.0-r1:20190210-120045.log
temp.tbz2
opencolorio-1.1.0-remove-Werror.patch
opencolorio-1.1.0.diff

Description Toralf Förster gentoo-dev 2019-02-10 13:31:59 UTC
cd /var/tmp/portage/media-libs/opencolorio-1.1.0-r1/work/opencolorio-1.1.0_build/src/pyglue && /usr/bin/x86_64-pc-linux-gnu-g++ -DPYOCIO_NAME=PyOpenColorIO -DPyOpenColorIO_EXPORTS -DUSE_SSE -I/var/tmp/portage/media-libs/opencolorio-1.1.0-r1/work/opencolorio-1.1.0/export -I/var/tmp/portage/media-libs/opencolorio-1.1.0-r1/work/opencolorio-1.1.0_build/export -I/var/tmp/portage/media-libs/opencolorio-1.1.0-r1/work/opencolorio-1.1.0_build/src/pyglue -I/usr/include/python3.6m   -DNDEBUG -O2 -pipe -march=native -Wall -Wextra -Wshadow -Wconversion -Wcast-qual -Wformat=2 -msse2 -Wno-strict-aliasing -Wno-missing-field-initializers -Werror -fPIC   -o CMakeFiles/PyOpenColorIO.dir/PyAllocationTransform.cpp.o -c /var/tmp/portage/media-libs/opencolorio-1.1.0-r1/work/opencolorio-1.1.0/src/pyglue/PyAllocationTransform.cpp
/var/tmp/portage/media-libs/opencolorio-1.1.0-r1/work/opencolorio-1.1.0/src/pyglue/PyAllocationTransform.cpp:67:27: error: cast between incompatible function types from ‘PyObject* (*)(PyObject*)’ {aka ‘_object* (*)(_object*)’} to ‘PyCFunction’ {aka ‘_object* (*)(_object*, _object*)’} [-Werror=cast-function-type]
             (PyCFunction) PyOCIO_AllocationTransform_getAllocation, METH_NOARGS, ALLOCATIONTRANSFORM_GETALLOCATION__DOC__ },
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/media-libs/opencolorio-1.1.0-r1/work/opencolorio-1.1.0/src/pyglue/PyAllocationTransform.cpp:71:27: error: cast between incompatible function types from ‘PyObject* (*)(PyObject*)’ {aka ‘_object* (*)(_object*)’} to ‘PyCFunction’ {aka ‘_object* (*)(_object*, _object*)’} [-Werror=cast-function-type]

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_20190205-121519

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.1
 [2] x86_64-pc-linux-gnu-8.2.0 *

Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.6
  [3]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems)
  [3]   ruby26 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.32.0 *



emerge -qpvO media-libs/opencolorio
[ebuild  N    ] media-libs/opencolorio-1.1.0-r1  USE="python -doc -opengl -static-libs -test" CPU_FLAGS_X86="sse2" PYTHON_SINGLE_TARGET="python3_6 -python2_7 -python3_4 -python3_5" PYTHON_TARGETS="python2_7 python3_6 -python3_4 -python3_5"
Comment 1 Toralf Förster gentoo-dev 2019-02-10 13:32:02 UTC
Created attachment 564540 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-02-10 13:32:07 UTC
Created attachment 564542 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2019-02-10 13:32:10 UTC
Created attachment 564544 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2019-02-10 13:32:12 UTC
Created attachment 564546 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2019-02-10 13:32:15 UTC
Created attachment 564548 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-02-10 13:32:18 UTC
Created attachment 564550 [details]
media-libs:opencolorio-1.1.0-r1:20190210-120045.log
Comment 7 Toralf Förster gentoo-dev 2019-02-10 13:32:21 UTC
Created attachment 564552 [details]
temp.tbz2
Comment 8 Thomas Raschbacher gentoo-dev 2019-02-21 22:49:38 UTC
Seems to be a GCC 8 issue.
Adding "-Wno-error=cast-function-type" to CXXFLAGS / CFLAGS makes it compile. (not verified function)

source: https://github.com/swig/swig/issues/1259
Comment 10 Bernd 2019-03-30 13:21:27 UTC
The src/pyglue/CMakeLists.txt file adds a global -Werror flag for unix systems. IIRC this is something, we don't want to have. Commenting this out let the compilation succeed. But the debian patch looks like the right approach for this issue, in addition to disabling -Werror.
Comment 11 Bernd 2019-03-30 13:22:56 UTC
Created attachment 571244 [details, diff]
opencolorio-1.1.0-remove-Werror.patch

Patch to disable global -Werror flag in src/pyglue/CMakeLists.txt
Comment 12 Bernd 2019-03-30 13:26:24 UTC
Additionally, I tried bumping EAPI and removing obsolete python-3.4 from PYTHON_COMPAT, which works for me.
Comment 13 Bernd 2019-03-30 13:27:33 UTC
Created attachment 571246 [details, diff]
opencolorio-1.1.0.diff

Diff between opencolorio-1.1.0-r1 and EAPI bumped opencolorio-1.1.0-r2
Comment 14 Larry the Git Cow gentoo-dev 2020-10-10 04:34:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=279e0179049fc08d5f304e23f1729a2c231a2f07

commit 279e0179049fc08d5f304e23f1729a2c231a2f07
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2020-10-10 03:27:22 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2020-10-10 03:27:33 +0000

    media-libs/opencolorio: bump to 1.1.1
    
    Closes: https://bugs.gentoo.org/747409
    Closes: https://bugs.gentoo.org/667986
    Closes: https://bugs.gentoo.org/677642
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/opencolorio/Manifest                 |  1 +
 media-libs/opencolorio/opencolorio-1.1.1.ebuild | 92 +++++++++++++++++++++++++
 2 files changed, 93 insertions(+)