Giter Club home page Giter Club logo

Comments (7)

averms avatar averms commented on September 25, 2024

Here is the full stacktrace:

Error: Could not symlink ../../../../../../../home/linuxbrew/.linuxbrew/Cellar/libvdpau/1.5/lib/vdpau/libvdpau_trace.so
Target /home/linuxbrew/.linuxbrew/Cellar/libvdpau/1.5/lib/vdpau/libvdpau_trace.so
is a symlink belonging to libvdpau. You can unlink it:
  brew unlink libvdpau

To force the link and overwrite all conflicting files:
  brew link --overwrite libvdpau

To list all files that would be deleted:
  brew link --overwrite libvdpau --dry-run
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/pathname.rb:330:in `symlink'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/pathname.rb:330:in `make_relative_symlink'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/pathname.rb:563:in `make_relative_symlink'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/keg.rb:593:in `make_relative_symlink'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/keg.rb:645:in `block in link_dir'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/pathname.rb:571:in `block in find'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/find.rb:49:in `block (2 levels) in find'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/find.rb:48:in `catch'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/find.rb:48:in `block in find'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/find.rb:43:in `each'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/find.rb:43:in `find'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/pathname.rb:571:in `find'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/keg.rb:622:in `link_dir'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/keg.rb:566:in `resolve_any_conflicts'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/keg.rb:661:in `block in link_dir'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/pathname.rb:571:in `block in find'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/find.rb:49:in `block (2 levels) in find'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/find.rb:48:in `catch'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/find.rb:48:in `block in find'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/find.rb:43:in `each'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/find.rb:43:in `find'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/pathname.rb:571:in `find'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/keg.rb:622:in `link_dir'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/keg.rb:439:in `link'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/link.rb:112:in `block (2 levels) in link'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/keg.rb:329:in `block in lock'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/lock_file.rb:35:in `with_lock'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/keg.rb:324:in `lock'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/link.rb:107:in `block in link'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/link.rb:57:in `each'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/link.rb:57:in `link'
/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:86:in `<main>'

Pure speculation but I wonder if this is related to Silverblue symlinking /home to var/home

from brew.

Bo98 avatar Bo98 commented on September 25, 2024

Pure speculation but I wonder if this is related to Silverblue symlinking /home to var/home

This seems probable. Though symlink target being in the Cellar itself seems very odd and I'm not entirely sure what's so special about that particular file only?

Usually the error would be something like:

Error: Could not symlink lib/vdpau/libvdpau_trace.so
Target /home/linuxbrew/.linuxbrew/lib/vdpau/libvdpau_trace.so

from brew.

averms avatar averms commented on September 25, 2024

and I'm not entirely sure what's so special about that particular file only?

Actually, linking the other way around (mesa before libvdpau) gives the same symlink error but on a different file. Running brew unlink mesa libvdpau && brew link mesa libvdpau outputs the following:

Unlinking /home/linuxbrew/.linuxbrew/Cellar/mesa/24.0.3... 0 symlinks removed.
Unlinking /home/linuxbrew/.linuxbrew/Cellar/libvdpau/1.5... 6 symlinks removed.
Linking /home/linuxbrew/.linuxbrew/Cellar/mesa/24.0.3... 75 symlinks created.
Linking /home/linuxbrew/.linuxbrew/Cellar/libvdpau/1.5... 
Error: Could not symlink ../../../../../../../home/linuxbrew/.linuxbrew/Cellar/mesa/24.0.3/lib/vdpau/libvdpau_nouveau.so
Target /home/linuxbrew/.linuxbrew/Cellar/mesa/24.0.3/lib/vdpau/libvdpau_nouveau.so
is a symlink belonging to mesa. You can unlink it:
  brew unlink mesa

To force the link and overwrite all conflicting files:
  brew link --overwrite mesa

To list all files that would be deleted:
  brew link --overwrite mesa --dry-run

from brew.

Bo98 avatar Bo98 commented on September 25, 2024

Hmm I wonder if it gets mixed up with handling the vdpau subdirectory in /home/linuxbrew/.linuxbrew/lib.

The correct behaviour is when the first formula is installed then that's a whole directory symlink, but when the second formula is installed it recognises that, makes it a regular directory and then symlinks the contents.

Definitely works correctly on Ubuntu so is probably some /var/home incorrect handling.

I don't have a Silverblue setup on hand, though I'll look and see if there's a Docker image with a similar filesystem layout.

from brew.

cho-m avatar cho-m commented on September 25, 2024

Maybe also check output of brew link mesa --dry-run --verbose as it should show commands brew is attempting.


I'm guessing it could be handling of link where some parts of code directly use HOMEBREW_PREFIX/... while others run .realpath or .resolved_path. Also possible that some symlink? check on HOMEBREW_PREFIX-rooted paths will break.


EDIT: Though it looks like some support went into #15656. May need to be debugged further by anyone who has Silverblue

from brew.

github-actions avatar github-actions commented on September 25, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

from brew.

averms avatar averms commented on September 25, 2024

Yeah it's definitely the /home -> var/home symlink.

I don't have a Silverblue setup on hand, though I'll look and see if there's a Docker image with a similar filesystem layout.

Try the following Dockerfile:

FROM debian:12
RUN apt-get -y update && apt-get -y install \
    curl \
    git \
    gcc
RUN rm -r /home && mkdir /var/home && ln -s var/home /home
RUN useradd --create-home linuxbrew
USER linuxbrew
WORKDIR /home/linuxbrew
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
ENV HOMEBREW_TEMP=/var/tmp
RUN .linuxbrew/bin/brew shellenv >>.bashrc

Just enter the container and try to install mesa.

from brew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.