Skip to content

Python: fix build on Fedora/SUSE#39837

Closed
adamjstewart wants to merge 2 commits intospack:developfrom
adamjstewart:packages/python-lib64
Closed

Python: fix build on Fedora/SUSE#39837
adamjstewart wants to merge 2 commits intospack:developfrom
adamjstewart:packages/python-lib64

Conversation

@adamjstewart
Copy link
Copy Markdown
Member

@adamjstewart adamjstewart commented Sep 5, 2023

cflags = []

# https://bugs.python.org/issue1294959
if "fedora" in self.spec.os or "suse" in self.spec.os:
Copy link
Copy Markdown
Member

@haampie haampie Sep 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to do this without spec.os? I'd like to be able to drop that property. For spack it makes no sense at all to have a lib64 directory 😕 can't you just drop the branch and force lib everywhere?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lib is already the default but doesn't seem to work on Fedora/SUSE, I think it needs to be lib64. We can do it without spec.os, I just need some way of checking to see which distro we're on.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What makes it such that it needs to be lib64? Something in Python itself? Where?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea, try reading through https://bugs.python.org/issue1294959 and see if you can extract more info than me.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case of Opensuse the issue here is that the autoconf installed by Opensuse defaults to install libs in lib64, is there a way to conflict with external package. In this manner we can use the spack autoconf.

@michaelkuhn
Copy link
Copy Markdown
Member

michaelkuhn commented Oct 12, 2023

I cannot reproduce the original problem on Fedora:

$ spack load python+zlib   
$ python -c 'import zlib'
$ ls $(spack location -i python+zlib)
bin/  include/  lib/  share/

Am I missing anything?

@DanielYang59
Copy link
Copy Markdown

I cannot reproduce the original problem on Fedora:

$ spack load python+zlib   
$ python -c 'import zlib'
$ ls $(spack location -i python+zlib)
bin/  include/  lib/  share/

Am I missing anything?

@michaelkuhn May be specific to OpenSUSE Tumbleweed?

Copy link
Copy Markdown
Member

@manuelakuhn manuelakuhn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to reproduce the problems on my Fedora and inside an opensuse/tumbleweed container but could not reproduce it in either of them.
I tried

# spack load python+zlib
# python -c 'import zlib'
# ls $(spack location -i python+zlib)
.spack  bin  include  lib  share

and spack install py-pip ^zlib which ran through without problems.

@adamjstewart
Copy link
Copy Markdown
Member Author

@DanielYang59 @awadell1 any other ideas for reproducing the original issue?

@DanielYang59
Copy link
Copy Markdown

@adamjstewart I'm working on reproducing this issue on my PC (with Zen 4 CPU) on a OpenSUSE Tumbleweed VM. However I cannot even install the berkeley-db dependency and got checking whether the C+= compiler supports templates for STL... configure: error: no error (gcc-c++-13 is installed on my VM). I'm working on resolving this and would keep you updated.

@michaelkuhn
Copy link
Copy Markdown
Member

I also gave this another try in a Tumbleweed container and wasn't able to reproduce the issue. python+zlib's prefix contains a lib directory, the zlib module imports fine and py-pip can also be installed.

@adamjstewart
Copy link
Copy Markdown
Member Author

Closing until we find a way to reproduce the original issues.

@DanielYang59
Copy link
Copy Markdown

DanielYang59 commented Jan 17, 2024

@HadrienG2 is able to reproduce this on a local install (not a container) just as my original case in #39551 (comment).

I managed to reproduce this, but only on a local openSUSE Tumbleweed install, not on an opensuse/tumbleweed container. No idea what is different between the containerized and non-containerized version though... 🤷

Can you please follow up this please? Sorry I cannot help much on this as I wiped my local OpenSUSE image.

@vicentebolea
Copy link
Copy Markdown
Member

As a both OpenSUSE and spack user I still see this error whenever I install python in spack. I would like to help with this

@adamjstewart
Copy link
Copy Markdown
Member Author

Can you open a new PR? Or comment on the open issue? I think someone other than me should spearhead this fix since I don't have access to these systems. Feel free to steal my changes for the new PR, I don't care about credit.

@vicentebolea
Copy link
Copy Markdown
Member

Followup PR at: #48575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken Python3 on OpenSUSE, lib-dynload not correctly linked Installation issue: python

6 participants