pantry icon indicating copy to clipboard operation
pantry copied to clipboard

Inconsistencies with dnf/apt install gcc

Open PhilipDeegan opened this issue 1 year ago • 5 comments

Hi

I've been testing out pkgx recently to see if I can use it to replace usage of dnf or apt across different linux distros.

I've run into two separate issues when trying to use gcc on fedora and ubuntu. Such that, compilation works when I dnf or apt install gcc, and does not when I pkgx install gcc

Is this something that I should report here or elsewhere?

Thanks

PhilipDeegan avatar Oct 11 '24 12:10 PhilipDeegan

It depends on what problem you're having. If it's a problem with the environment construction, then this is the correct repo. If it's a problem with the gnu.org/gcc formula, then pkgxdev/pantry.

It might specifically be an issue with the pkgx install scripts. If you instead use pkgx +gcc^{version} ... as your command line instead of using install, do you experience the same issues? That would point to a problem with the install methodology.

You could try running your makefile (or whatever) with CC='pkgx +gnu.org/gcc^14 gcc' or pkgx +gcc^14 +make make, as an example, to use pkgx to manage the full environment.

jhheider avatar Oct 11 '24 18:10 jhheider

The errors, were during compilation of python package during a pip install.

I think the ubuntu issue was, the build system couldn't find x86_64-linux-gnu-gcc

and the fedora issue was a missing standard header

 fatal error: stdlib.h: No such file or directory

it's possible what you suggest might work, but I'm not sure compilation during pip install uses CC or CXX

PhilipDeegan avatar Oct 11 '24 19:10 PhilipDeegan

This is probably a deeper problem with how we add the gcc headers to the env.

mxcl avatar Oct 11 '24 19:10 mxcl

the build system couldn't find x86_64-linux-gnu-gcc

yes, we don't add the system-target binaries to the provides: key for gnu.org/gcc. this would be solved using pkgx +gnu.org/gcc, but because they aren't listed as a provided binary, no installation shim exists.

jhheider avatar Oct 11 '24 20:10 jhheider

you can see the fedora error here

the ubuntu issue was happening locally for me during a docker build (but still during pip install internally)

you should be able to reproduce this via

comment out this line

and add if_install gcc -v here

PhilipDeegan avatar Oct 12 '24 11:10 PhilipDeegan