Folks, an issue has come up recently that I don't understand. This problem applies to both F31 and F32.
Back in May I built several python2 packages that I needed to make sbackup work on F32. sbackup is the python2 application I use to do daily backups.
The source packages I rebuilt are
gnome-python2-2.28.1-23.fc29.src.rpm pyorbit-2.24.0-28.fc30.src.rpm
Back in May the packages built fine. I recently upgraded one system from F30 to F31, so I tried to rebuild the packages on F31. The build fails. Here is one of the messages:
gnomemodule.c:55:57: warning: passing argument 3 of 'PyDict_SetItemString' makes pointer from integer without a cast [-Wint-conversion] 55 | PyDict_SetItemString(dict, "POPT_CONTEXT_ARG_OPTS", PyInt_FromLong(POPT_CONTEXT_ARG_OPTS)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int In file included from */usr/include/python3.7m/Python.h*:109, from /usr/include/pygtk-2.0/pygobject.h:5, from gnomemodule.c:8:
Note that despite having python set to python2 during the build it's pulling a file from python3 directory. This same failure occurs now on F32 as well. How can I get the compile to pull in python2 files?
[root@terrapin rpmbuild]# python -V Python 2.7.18
The build is done:
rpmbuild -ba SPECS/gnome-python2.spec
This is dependent on also building pyorbit
rpmbuild -ba SPECS/pyorbit.spec
note that pyorbit will not build if python is python2, but will build if you use python3
It seems to me that the whole build setup for python2 is all messed up on both F31 and F32 and I don't know what I need to do to fix things so I can compile both pyorbit and gnome-python2 with python set to python2.
Any help is appreciated.
Paolo
Den 2020-08-13 kl. 18:51, skrev Paolo Galtieri:
Folks, an issue has come up recently that I don't understand. This problem applies to both F31 and F32.
Back in May I built several python2 packages that I needed to make sbackup work on F32. sbackup is the python2 application I use to do daily backups.
The source packages I rebuilt are
gnome-python2-2.28.1-23.fc29.src.rpm pyorbit-2.24.0-28.fc30.src.rpm
Back in May the packages built fine. I recently upgraded one system from F30 to F31, so I tried to rebuild the packages on F31. The build fails. Here is one of the messages:
gnomemodule.c:55:57: warning: passing argument 3 of 'PyDict_SetItemString' makes pointer from integer without a cast [-Wint-conversion] 55 | PyDict_SetItemString(dict, "POPT_CONTEXT_ARG_OPTS", PyInt_FromLong(POPT_CONTEXT_ARG_OPTS)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int In file included from */usr/include/python3.7m/Python.h*:109, from /usr/include/pygtk-2.0/pygobject.h:5, from gnomemodule.c:8:
Note that despite having python set to python2 during the build it's pulling a file from python3 directory. This same failure occurs now on F32 as well. How can I get the compile to pull in python2 files?
[root@terrapin rpmbuild]# python -V Python 2.7.18
The build is done:
rpmbuild -ba SPECS/gnome-python2.spec
This is dependent on also building pyorbit
rpmbuild -ba SPECS/pyorbit.spec
note that pyorbit will not build if python is python2, but will build if you use python3
It seems to me that the whole build setup for python2 is all messed up on both F31 and F32 and I don't know what I need to do to fix things so I can compile both pyorbit and gnome-python2 with python set to python2.
Any help is appreciated.
Python 2 did reach end of life (EOL) on January 1st, 2020. And if you do "dnf info python2" in F32 you will get something like:
Error: No matching package
Paolo
Am 13.08.20 um 19:19 schrieb Jon Ingason:
Python 2 did reach end of life (EOL) on January 1st, 2020. And if you do "dnf info python2" in F32 you will get something like:
Error: No matching package
While your comment about Python 2 being EOL is correct the latter is not. both "dnf install python27" and "dnf install python2" are working for me on F32.
Felix
Den 2020-08-13 kl. 20:09, skrev Felix Schwarz:
Am 13.08.20 um 19:19 schrieb Jon Ingason:
Python 2 did reach end of life (EOL) on January 1st, 2020. And if you do "dnf info python2" in F32 you will get something like:
Error: No matching package
While your comment about Python 2 being EOL is correct the latter is not. both "dnf install python27" and "dnf install python2" are working for me on F32.
Sorry, my bad. Should have used "dnf search python2". :-(
Felix
Am 13.08.20 um 18:51 schrieb Paolo Galtieri:
Back in May I built several python2 packages that I needed to make sbackup work on F32. sbackup is the python2 application I use to do daily backups.
The source packages I rebuilt are
gnome-python2-2.28.1-23.fc29.src.rpm pyorbit-2.24.0-28.fc30.src.rpm
Back in May the packages built fine. I recently upgraded one system from F30 to F31, so I tried to rebuild the packages on F31. The build fails. Here is one of the messages:
Not sure what you are actually doing but this works for me:
fedpkg clone --anonymous gnome-python2 cd gnome-python2 git checkout f31 fedpkg --release=f32 mockbuild (same for pyorbit)
Besides that you should try to use sbackup with Python 3 somehow as it is pretty likely that you won't be able to use the gnome/pyorbit libraries anymore due to newer external dependencies in a few months/years.
Felix
I did try to port it to python 3. The problem I encountered was that one of the modules sbackup used had no corresponding one in python 3.
As I said in my email this all worked back on May 6 when I built the modules I needed to get sbackup to work with python 2.
All I'm trying to do is use rpmbuild to build the binary packages from the source RPMs.
Paolo
On 8/13/20 11:18 AM, Felix Schwarz wrote:
Am 13.08.20 um 18:51 schrieb Paolo Galtieri:
Back in May I built several python2 packages that I needed to make sbackup work on F32. sbackup is the python2 application I use to do daily backups.
The source packages I rebuilt are
gnome-python2-2.28.1-23.fc29.src.rpm pyorbit-2.24.0-28.fc30.src.rpm
Back in May the packages built fine. I recently upgraded one system from F30 to F31, so I tried to rebuild the packages on F31. The build fails. Here is one of the messages:
Not sure what you are actually doing but this works for me:
fedpkg clone --anonymous gnome-python2 cd gnome-python2 git checkout f31 fedpkg --release=f32 mockbuild (same for pyorbit)
Besides that you should try to use sbackup with Python 3 somehow as it is pretty likely that you won't be able to use the gnome/pyorbit libraries anymore due to newer external dependencies in a few months/years.
Felix _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
After doing a little more investigation here's the issue. When rpmbuild runs the compile phase it does the following:
./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-static
When this completes every Makefile has this entry in it.
PYTHON = /usr/bin/python PYTHON_CC = gcc -pthread PYTHON_EMBED_LIBS = -L/usr/lib64 -lm -lpthread -ldl -lutil -lpython2.7 PYTHON_EXEC_PREFIX = ${exec_prefix} PYTHON_INCLUDES = *-I/usr/include/python3.7m -I/usr/include/python3.7m* PYTHON_LDFLAGS = PYTHON_LIBS = PYTHON_PLATFORM = linux2 PYTHON_PREFIX = ${prefix} PYTHON_VERSION = 2.7
Note the PYTHON_INCLUDES entry. The problem is that on Jul 1 the following program was added:
/usr/bin/python-config
The configure program has this code in it:
if test -x "$PYTHON-config"; then PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null` else PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
So on May 6 when I ran the rpmbuild the first time python-config did not exist hence it dropped into the else case. In the else case PYTHON_VERSION is determined by the output of
$PYTHON -c "import sys; print sys.version[:3]"
where PYTHON is python2. python-config is linked to python3-config. There is a python2-config which is dated July 20. There is nothing configured to use alternatives to switch between versions of python-config as there is to switch between versions of python. One way to fix this is for python-config to determine the version of python that is currently active and then call the appropriate python*-config, since there is a python3.7m-config. This way one doesn't have to remember to go change the python-config link every time you change versions of python.
Paolo
On 8/13/20 11:18 AM, Felix Schwarz wrote:
Am 13.08.20 um 18:51 schrieb Paolo Galtieri:
Back in May I built several python2 packages that I needed to make sbackup work on F32. sbackup is the python2 application I use to do daily backups.
The source packages I rebuilt are
gnome-python2-2.28.1-23.fc29.src.rpm pyorbit-2.24.0-28.fc30.src.rpm
Back in May the packages built fine. I recently upgraded one system from F30 to F31, so I tried to rebuild the packages on F31. The build fails. Here is one of the messages:
Not sure what you are actually doing but this works for me:
fedpkg clone --anonymous gnome-python2 cd gnome-python2 git checkout f31 fedpkg --release=f32 mockbuild (same for pyorbit)
Besides that you should try to use sbackup with Python 3 somehow as it is pretty likely that you won't be able to use the gnome/pyorbit libraries anymore due to newer external dependencies in a few months/years.
Felix _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org