unlimitedbacon / stl-thumb

Thumbnail generator for STL files
MIT License
1.13k stars 97 forks source link

Bug: Build error while installing via AUR (failed to load source for dependency `glutin`) #58

Open ShivamJoker opened 2 years ago

ShivamJoker commented 2 years ago

I am using manjaro and trying to install the app via aur I am getting this error while installing

Building stl-thumb...
Running as unit: run-u234.service
Press ^] three times within 1s to disconnect TTY.
==> Making package: stl-thumb 0.4.1-1 (Sunday 22 May 2022 09:53:39 PM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning stl-thumb git repo...
Cloning into bare repository '/var/cache/private/pamac/stl-thumb/stl-thumb'...
remote: Enumerating objects: 892, done.
remote: Counting objects: 100% (94/94), done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 892 (delta 72), reused 59 (delta 59), pack-reused 798
Receiving objects: 100% (892/892), 45.48 MiB | 6.70 MiB/s, done.
Resolving deltas: 100% (536/536), done.
==> Validating source files with sha256sums...
    stl-thumb ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of stl-thumb git repo...
Cloning into 'stl-thumb'...
done.
==> Starting build()...
Note: switching to 'tags/v0.4.1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at c009ddf Fix benchmark test
    Updating git repository `https://github.com/unlimitedbacon/glutin.git`
error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to load source for dependency `glutin`

Caused by:
  Unable to update https://github.com/unlimitedbacon/glutin.git#81c71e18

Caused by:
  failed to create directory `/.cargo/git/db/glutin-2096cc6d8c9067b5`

Caused by:
  Read-only file system (os error 30)
==> ERROR: A failure occurred in build().
    Aborting...
Finished with result: exit-code
Main processes terminated with: code=exited/status=4
Service runtime: 9.432s
CPU time consumed: 3.910s
tobimai commented 2 years ago

It is fixed by using glutin = "0.28.0" as a dependency and not using the patch in the Cargo.toml. Works fine for me, but I do not know the reason for implementing that patch.

unlimitedbacon commented 2 years ago

It's working for me with v0.5.0. If you are still having trouble with it then try doing a clean build (rm -rf the build directory).

The patch is needed to prevent a crash in some circumstances. It has been accepted upstream, but they have not published a release yet.

tobimai commented 2 years ago

Also works for me with 5.0 and also from AUR.

ShivamJoker commented 2 years ago

Also works for me with 5.0 and also from AUR.

How are you installing it? It's still same for me

unlimitedbacon commented 2 years ago

Are you guys using the rust Arch package or installing from rustup? If using rustup, you may need to do rustup update.

tobimai commented 2 years ago

Also works for me with 5.0 and also from AUR.

How are you installing it? It's still same for me

Well for some reason it's working on my Desktop but not on my laptop now, but I installed it manually on my Desktop once so maybe it gets confused there.

Are you guys using the rust Arch package or installing from rustup? If using rustup, you may need to do rustup update.

I am using the AUR package

Also the error is different now, it shows: Error: no override and no default toolchain set

kiwi-x commented 2 years ago

Hello,

I tried to install it yesterday on my Manjaro KDE and the installation with pamac from AUR failed with the same error message. I cloned the AUR repository myself, ran "makepkg build" and that was sucessful. So it looks like there is an issues with pamac with runs with an unprivileged user id that's not a real user on the machine.