Difficulty compiling multilib packages that depend on python3.
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Difficulty compiling multilib packages that depend on python3.
As part of setting up wayland and xwayland, I'm trying to (re)compile atk and friends on a Slackware64-Multilib system. I've been doing well so far, but trying to get gobject-introspection to compile causes barfing on a python3 header: https://pastebin.com/z4TTVZYe
Anyone know how to get this dep working for a multilib compile?
This needs to be fixed in the Slackware python3 package itself.
The pyconfig.h header file is not multilib-ready and it should be renamed based on whether you build a 32bit or a 64bit package. Then a wrapper pyconfig.h should be put in its place which includes the appropriate pyconfig header for the architecture.
I can not fix this in my multilib repository where I do nothing more but re-packaging the 32bit Slackware packages.
[...]
# For multilib support, files that are different between 32- and 64-bit arches
# need different filenames. Use "64" or "32" according to the word size.
# Currently, the best way to determine an architecture's word size happens to
# be checking %%{_lib}.
%if "%{_lib}" == "lib64"
%global wordsize 64
%else
%global wordsize 32
%endif
[...]
# Multilib support for pyconfig.h
# 32- and 64-bit versions of pyconfig.h are different. For multilib support
# (making it possible to install 32- and 64-bit versions simultaneously),
# we need to install them under different filenames, and to make the common
# "pyconfig.h" include the right file based on architecture.
# See https://bugzilla.redhat.com/show_bug.cgi?id=192747
# Filanames are defined here:
%global _pyconfig32_h pyconfig-32.h
%global _pyconfig64_h pyconfig-64.h
%global _pyconfig_h pyconfig-%{wordsize}.h
[...]
# Make python3-devel multilib-ready
mv %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h \
%{buildroot}%{_includedir}/python${LDVersion}/%{_pyconfig_h}
cat > %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h << EOF
#include <bits/wordsize.h>
#if __WORDSIZE == 32
#include "%{_pyconfig32_h}"
#elif __WORDSIZE == 64
#include "%{_pyconfig64_h}"
#else
#error "Unknown word size"
#endif
EOF
[...]
You could check with Pat whether he is willing to add this multilib support to the python3 package.
It will however have a larger chance of success if you provide a patch which produces the desired result, so he does not have to do the research for you.
Here is a quick patch for Pat's python3 SlackBuild based on the fedora spec file above, but I am not sure how to test the original issue. I am also not sure its correct for s390, arm or armel, but I have no way of testing those.
O.O Thanks guys! I'm still working on trying to run Wayland/Enlightenment, running into other issues, but it's great to see that I have something to go on now, I will definitely apply the patch to the SlackBuild.
This needs to be fixed in the Slackware python3 package itself.
The pyconfig.h header file is not multilib-ready and it should be renamed based on whether you build a 32bit or a 64bit package. Then a wrapper pyconfig.h should be put in its place which includes the appropriate pyconfig header for the architecture.
I can not fix this in my multilib repository where I do nothing more but re-packaging the 32bit Slackware packages.
Does convertpkg-compat32 strip header files from the package? I think this may be an issue for python3-compat32, since with the above patch we are expecting a pyconfig-32.h file in the package, and I'm not seeing it after running the package thru convertpkg-compat32.
Does convertpkg-compat32 strip header files from the package? I think this may be an issue for python3-compat32, since with the above patch we are expecting a pyconfig-32.h file in the package, and I'm not seeing it after running the package thru convertpkg-compat32.
I think the convertpkg-compat32 script needs an exception for cases like this, I haven't tested this, but I think it should change this section.
Code:
# Stuff we need to keep, we move into KDEP/ and move it back later:
mkdir KEEP
if [ "$PKGNAM" = "mesa" ];
then
cp -a --parents usr/share/vulkan/icd.d KEEP/
fi
To something like this.
Code:
# Stuff we need to keep, we move into KDEP/ and move it back later:
mkdir KEEP
if [ "$PKGNAM" = "mesa" ];
then
cp -a --parents usr/share/vulkan/icd.d KEEP/
elif [ "$PKGNAM" = "python3" ];
then
cp -a --parents usr/include/python*m/pyconfig-*.h KEEP/
fi
Or you could always add the file directory to the package directory and run makepkg manually just to test it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.