Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New dependency #70

Closed
pallaswept opened this issue Nov 14, 2023 · 10 comments
Closed

New dependency #70

pallaswept opened this issue Nov 14, 2023 · 10 comments

Comments

@pallaswept
Copy link

Now that we have fixed #68, there is a new dependency not mentioned in the readme, we need python3-devel added.

@Lurkki14
Copy link
Owner

Is python3-devel is an openSUSE package? But yes, python-hwdata being installed doesn't mean you can build the program with the feature; libpython3 and python3 is also needed.

@pallaswept
Copy link
Author

pallaswept commented Nov 15, 2023

Is python3-devel is an openSUSE package?

Yeh python3-devel is openSUSE's name for the package, it'll vary like they usually do so I figured it'd be python3-dev on Ubuntu but I don't see it in the package names, but there's a libpython3-dev so maybe that'd do it?

But yes, python-hwdata being installed doesn't mean you can build the program with the feature; libpython3 and python3 is also needed.

Interesting - I figured it'd follow the pattern of required packages in your current readme, ie (package)-devel for redhat/suse, so I literally guessed at it and python3-devel worked - that was my 2nd guess, python-devel failed - but once I got it working, I knew I should let you know so the readme could be updated. Perhaps libpython3 and python3 individually would do the trick, but including python3-devel as a buildrequires pulled those in as dependencies, as I can see in the build log. It'll do the same for RedHat, but I don't know how it's going to work for ubuntu/debian or other distros/packaging systems....

I did a test build, and instead of using python3-devel as the buildrequire, I specified python3 and I had to be very specific with the libpython dep, and include libpython3_11-1_0 - libpython didn't work nor did libpython3 (they gave me a "nothing provides" error).... and the build failed with meson saying that it couldn't find the python dependency (Run-time dependency python found: NO (tried pkgconfig, pkgconfig and sysconfig)... go figure.... So I tried it with that specific libpython version and with just python and it installed python2 and gave me the same error from meson, and I tried with python311 (so it'd use the same version that the working build did) and it installed the same versions but I STILL got that meson error. Weird, but OK....

So, all that being said, given the need to be super-specific with the libpython version, and not being able to get meson to see python even when it was definitely there, I think that from the redhat/suse perspective, python3-devel is the way to fly here, but we'll need an ubuntu/debian packager to see what's best for that environment.

@Lurkki14
Copy link
Owner

Usually the exact libpython .so name is something like libpython3-11.so so you'd need to get the linker flags from pkg-config which I assume python3-devel provides.

@Lurkki14
Copy link
Owner

Updated the README now with this info, but seems like Ubuntu doesn't have python-hwdata packaged.

@pallaswept
Copy link
Author

Usually the exact libpython .so name is something like libpython3-11.so so you'd need to get the linker flags from pkg-config which I assume python3-devel provides.

That makes sense. I'm not sure what the equivalent will be in debian/ubuntu land and everywhere else though :/ Sorry I'm clueless on that front.

Updated the README now with this info, but seems like Ubuntu doesn't have python-hwdata packaged.

Nor did openSUSE really. There was a user's repo with a very old version (2.35, last updated 6 years ago) and I can see that there's another user who has added one the same day I did (theirs is an adaptation of the debian distro's build) but I had to package it myself. The source had a RedHat packaging script in it, but it wouldn't work on opensuse, so I made a few very small modifications (just stopped it trying to change to directories that didn't exist) and that did the trick, so mine is closest to upstream. I know you want to stay with @tujhen 's build, and I assume he'll be wanting to build it with the full support for everything, so he might like to copy my package of python-hwdata.

@pallaswept
Copy link
Author

BTW, since you're not opposed to using python libraries, that might be a good way to get around the whole problem with #65. Perhaps something like https://pypi.org/project/nvidia-ml-py/ might do the trick? I don't know, but it occurred to me that it might help.

@Lurkki14
Copy link
Owner

BTW, since you're not opposed to using python libraries, that might be a good way to get around the whole problem with #65. Perhaps something like https://pypi.org/project/nvidia-ml-py/ might do the trick? I don't know, but it occurred to me that it might help.

That would be quite a Rube Goldberg machine, since that Python module just calls libnvml.so functions

@pallaswept
Copy link
Author

BTW, since you're not opposed to using python libraries, that might be a good way to get around the whole problem with #65. Perhaps something like https://pypi.org/project/nvidia-ml-py/ might do the trick? I don't know, but it occurred to me that it might help.

That would be quite a Rube Goldberg machine, since that Python module just calls libnvml.so functions

Yeh, but by using a wrapper library rather than calling the lib directly, you wouldn't need libnvml.so present to do the build, which is the aim of the game, if you want to be able to have tuxclocker's nvidia capabilities available to all those other distros, rather than relying on people like me to break rules and risk a ban so that your app will work....

seems like Ubuntu doesn't have python-hwdata packaged.

I just noticed, that other user I mentioned on OpenBuildService, packages the lib for debian and ubuntu and everything else you can imagine: https://build.opensuse.org/package/show/home:alvistack/xsuchy-python-hwdata-2.4.1. That might be helpful for the ubuntu users?

@Lurkki14
Copy link
Owner

I added that OBS page to the README, should be good enough until Ubuntu packages it (if ever)

@pallaswept
Copy link
Author

I added that OBS page to the README, should be good enough until Ubuntu packages it (if ever)

Someone could create a PPA for this, but they'll also have the #65 problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants