Bug 1716464

Summary: graphviz fails to build with Python 3.8
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: graphvizAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: alex, jima, jskarvad, tremble
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/graphviz/
Whiteboard:
Fixed In Version: graphviz-2.40.1-50.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-03 21:14:39 UTC Type: ---
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    
Attachments:
Description Flags
Proposed fix none

Description Miro Hrončok 2019-06-03 14:35:28 UTC
See https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/graphviz/ for actual logs. This report is automated and not very verbose, but feel free to ping me for help.

Comment 1 Jaroslav Škarvada 2019-06-03 17:15:23 UTC
It failed in python2.

Comment 2 Jaroslav Škarvada 2019-06-03 17:46:36 UTC
Well we could probably improve the dual python building, but the following is probably the source of the problem:
checking for python3... python3
checking Python.h usability... no
checking Python.h presence... no
checking for Python.h... no

Is there python.h? The package requires python3-devel. If yes, I will probably need access to the build root to resolve this.

Comment 3 Jaroslav Škarvada 2019-06-03 17:57:37 UTC
I probably got it, it's because previous python had /usr/include/python3.7m and it seems the path is now /usr/include/python3.8 (i.e. without the 'm').

Comment 4 Jaroslav Škarvada 2019-06-03 18:00:43 UTC
Created attachment 1576733 [details]
Proposed fix

Please try with the following patch and let me know.

Comment 5 Miro Hrončok 2019-06-03 18:18:06 UTC
Will try. Why was that in there in the first place? python3-config --includes gives you the proper flags.

Comment 6 Jaroslav Škarvada 2019-06-03 18:21:38 UTC
Hmm, it seems it hardcodes. I will try fixing it later.

Comment 7 Miro Hrončok 2019-06-03 18:33:22 UTC
The patch ends with the same error.

checking for python3... python3
checking Python.h usability... yes
checking Python.h presence... yes
checking for Python.h... yes
...
/bin/sh ../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../lib/gvc -I../../lib/common -I../../lib/cgraph -I../../lib/cdt -I../../lib/pathplan -DDEMAND_LOADING=1 -I/usr/include/python3.8m -I/usr/include/x86_64-linux  -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 -fno-strict-aliasing -fno-strict-overflow  -c -o libgv_python_la-gv_python.lo `test -f 'gv_python.cpp' || echo './'`gv_python.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../lib/gvc -I../../lib/common -I../../lib/cgraph -I../../lib/cdt -I../../lib/pathplan -DDEMAND_LOADING=1 -I/usr/include/python3.8m -I/usr/include/x86_64-linux -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 -fno-strict-aliasing -fno-strict-overflow -c gv_python.cpp  -fPIC -DPIC -o .libs/libgv_python_la-gv_python.o
gv_python.cpp:178:11: fatal error: Python.h: No such file or directory
  178 | # include <Python.h>
      |           ^~~~~~~~~~
compilation terminated.

If you need access to the buildroot, use the mock config from https://copr.fedorainfracloud.org/coprs/g/python/python3.8/

Comment 8 Jaroslav Škarvada 2019-06-03 18:35:51 UTC
(In reply to Miro Hrončok from comment #7)
> If you need access to the buildroot, use the mock config from
> https://copr.fedorainfracloud.org/coprs/g/python/python3.8/

Thanks, I will check in the mock.

Comment 9 Jaroslav Škarvada 2019-06-03 21:14:39 UTC
Fixed in graphviz-2.40.1-50.fc31 (tested in mock).