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

cannot layer binutils #188

Closed
andreasgerstmayr opened this issue Jan 15, 2024 · 8 comments · Fixed by #189 or #241
Closed

cannot layer binutils #188

andreasgerstmayr opened this issue Jan 15, 2024 · 8 comments · Fixed by #189 or #241
Assignees
Labels
bug Something isn't working

Comments

@andreasgerstmayr
Copy link

I'm trying to install binutils:

$ rpm-ostree install binutils
[...]
error: Checkout binutils-2.40-13.fc39.x86_64: Hardlinking b0/5c0ba45128dbfb28a8089c44e19f93cd0e4531678f017696f69515b916f6c3.file to ld: File exists

afaics this is because the file exists already in the image:

$ podman run -it ghcr.io/ublue-os/silverblue-nvidia:39 ls -l /usr/bin/ld         
lrwxrwxrwx. 1 root root 20 Jan 15 15:37 /usr/bin/ld -> /etc/alternatives/ld

$ podman run -it ghcr.io/ublue-os/silverblue-nvidia:39 ls -l /etc/alternatives/ld
lrwxrwxrwx. 1 root root 15 Jan 15 15:37 /etc/alternatives/ld -> /usr/bin/ld.bfd

$ podman run -it ghcr.io/ublue-os/silverblue-nvidia:39 ls -l /usr/bin/ld.bfd     
ls: cannot access '/usr/bin/ld.bfd': No such file or directory

it's a symlink to /etc/alternatives/ld, which itself points to /usr/bin/ld.bfd, which doesn't exist.

The symlinks are created here:
https://github.com/ublue-os/nvidia/blob/98c79efbd4f1e929df1dc4416bb701bb9a319969/post-install.sh#L9-L10

I'm wondering if these lines are still relevant, as the file they're linking to doesn't exist anyway?

@Akergez
Copy link

Akergez commented Jan 20, 2024

Can confirm this bug. I cannot install gcc

@KyleGospo
Copy link
Member

Any reason distrobox couldn't be used to access this package?

@Akergez
Copy link

Akergez commented Jan 20, 2024

Any reason distrobox couldn't be used to access this package?

It affects on many different and important packages. Not all problems can be solved by distrobox. I switched to Fedora Silverblue with manually installed nvidia drivers. It is not silver bullet, but it works better in this simple case

@andreasgerstmayr
Copy link
Author

Any reason distrobox couldn't be used to access this package?

It could, but then I'd need to install VS Code also in the same distrobox. If I'm working on a project with lots of exotic dependencies, I would go this route, but in my case I only needed golang (depends on binutils), so I figured it's simpler to just layer it.

I switched to Fedora Silverblue with manually installed nvidia drivers. It is not silver bullet, but it works better in this simple case

You could also create your own image based on silverblue-nvidia, like here: https://github.com/andreasgerstmayr/os-images/blob/main/images/silverblue-nvidia/Containerfile

@bsherman bsherman added the bug Something isn't working label Jan 29, 2024
@bsherman bsherman self-assigned this Jan 29, 2024
@bsherman
Copy link
Contributor

I believe this a bug related to a workaround done in one (or a few) of the ublue-os Containerfiles. My understanding is we do need this symlink at some point in our image build process, but it probably should not get left behind on the image.

bsherman added a commit that referenced this issue Jan 31, 2024
This symlink was part of an old workaround but breaks ability of
downstreams to layer binutils, gcc, etc.

Fixes: #188
castrojo pushed a commit that referenced this issue Jan 31, 2024
This symlink was part of an old workaround but breaks ability of
downstreams to layer binutils, gcc, etc.

Fixes: #188
@castrojo
Copy link
Member

A confirmation that this is working would be great! Nice work ya'll!

@bsherman
Copy link
Contributor

bsherman commented Jan 31, 2024

$ rpm-ostree install -A binutils
Checking out tree eb7f246... done
Enabled rpm-md repositories: copr:copr.fedorainfracloud.org:ublue-os:akmods updates fedora fedora-multimedia rpmfusion-free-updates rpmfusion-free rpmfusion-nonfree-updates rpmfusion-nonfree updates-archive
Updating metadata for 'copr:copr.fedorainfracloud.org:ublue-os:akmods'... done
Updating metadata for 'updates'... done
Updating metadata for 'fedora'... done
Updating metadata for 'fedora-multimedia'... done
Updating metadata for 'rpmfusion-free-updates'... done
Updating metadata for 'rpmfusion-free'... done
Updating metadata for 'rpmfusion-nonfree-updates'... done
Updating metadata for 'rpmfusion-nonfree'... done
Updating metadata for 'updates-archive'... done
Importing rpm-md... done
rpm-md repo 'copr:copr.fedorainfracloud.org:ublue-os:akmods'; generated: 2024-01-30T22:21:21Z solvables: 140
rpm-md repo 'updates'; generated: 2024-01-30T04:10:51Z solvables: 20984
rpm-md repo 'fedora'; generated: 2023-11-01T00:12:39Z solvables: 70825
rpm-md repo 'fedora-multimedia'; generated: 2024-01-30T03:45:46Z solvables: 377
rpm-md repo 'rpmfusion-free-updates'; generated: 2024-01-25T08:35:03Z solvables: 144
rpm-md repo 'rpmfusion-free'; generated: 2023-11-04T16:49:08Z solvables: 445
rpm-md repo 'rpmfusion-nonfree-updates'; generated: 2024-01-25T08:53:33Z solvables: 58
rpm-md repo 'rpmfusion-nonfree'; generated: 2023-11-04T17:26:32Z solvables: 208
rpm-md repo 'updates-archive'; generated: 2024-01-31T02:18:48Z solvables: 26898
Resolving dependencies... done
Installing 2 packages:
  binutils-2.40-14.fc39.x86_64 (updates)
  binutils-gold-2.40-14.fc39.x86_64 (updates)
Continue? [y/N] y
Checking out tree eb7f246... done
Enabled rpm-md repositories: copr:copr.fedorainfracloud.org:ublue-os:akmods updates fedora fedora-multimedia rpmfusion-free-updates rpmfusion-free rpmfusion-nonfree-updates rpmfusion-nonfree updates-archive
Importing rpm-md... done
rpm-md repo 'copr:copr.fedorainfracloud.org:ublue-os:akmods' (cached); generated: 2024-01-30T22:21:21Z solvables: 140
rpm-md repo 'updates' (cached); generated: 2024-01-30T04:10:51Z solvables: 20984
rpm-md repo 'fedora' (cached); generated: 2023-11-01T00:12:39Z solvables: 70825
rpm-md repo 'fedora-multimedia' (cached); generated: 2024-01-30T03:45:46Z solvables: 377
rpm-md repo 'rpmfusion-free-updates' (cached); generated: 2024-01-25T08:35:03Z solvables: 144
rpm-md repo 'rpmfusion-free' (cached); generated: 2023-11-04T16:49:08Z solvables: 445
rpm-md repo 'rpmfusion-nonfree-updates' (cached); generated: 2024-01-25T08:53:33Z solvables: 58
rpm-md repo 'rpmfusion-nonfree' (cached); generated: 2023-11-04T17:26:32Z solvables: 208
rpm-md repo 'updates-archive' (cached); generated: 2024-01-31T02:18:48Z solvables: 26898
Resolving dependencies... done
Will download: 2 packages (6.7 MB)
Downloading from 'updates'... done
Importing packages... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Generating initramfs... done
Writing OSTree commit... done
Staging deployment... done
Freed: 94.3 MB (pkgcache branches: 0)
Computing /etc diff to preserve... done
Updating /usr... done
Updating /etc... done
Running systemd-tmpfiles for /run and /var... done
Added:
  binutils-2.40-14.fc39.x86_64
  binutils-gold-2.40-14.fc39.x86_64
Successfully updated running filesystem tree.

But I'd like to hear from @andreasgerstmayr and @Akergez as well.

@andreasgerstmayr
Copy link
Author

I just tested it, works great!
Thank you @bsherman for resolving this issue 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
5 participants