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

[Feature request] Run natively on Raspbian #3051

Closed
alexxroche opened this issue Apr 23, 2022 · 2 comments
Closed

[Feature request] Run natively on Raspbian #3051

alexxroche opened this issue Apr 23, 2022 · 2 comments
Labels
feature-request Request of a new feature

Comments

@alexxroche
Copy link

Is your feature request related to a problem? Please describe.

I wanted to install a local, (native) instance of invidious on a Raspberry pi 3 running Raspbian and ran into a crystal shard problem:

invidious@localhost:~/invidious $ shards install --production
<snip>
Installing ameba (0.14.4)
Postinstall make bin && make run_file
Failed make bin && make run_file:
shards build
Dependencies are satisfied
Building: ameba
Error target ameba failed to compile:
In src/ameba/severity.cr:14:7

 14 | in Error      then 'E'
      ^
Error: unexpected token: in (expecting when, else or end)

make: *** [Makefile:8: bin/ameba] Error 1
invidious@localhost:~/invidious $ crystal build src/invidious.cr --release                                                                                                    
Showing last frame. Use --error-trace for full trace.

In lib/db/src/db.cr:2:1

 2 | require "log"
     ^
Error: can't find file 'log'

If you're trying to require a shard:
- Did you remember to run `shards install`?
- Did you make sure you're running the compiler in the same directory as your shard.yml?      

This was after I followed the invidious install guide and ended up cloning the repo as root, which threw a different error:

invidious@localhost:~/invidious $ shards install --production
Fetching https://github.com/will/crystal-pg.git
Fetching https://github.com/crystal-lang/crystal-db.git
Fetching https://github.com/crystal-lang/crystal-sqlite3.git
Fetching https://github.com/kemalcr/kemal.git
Fetching https://github.com/luislavena/radix.git
Fetching https://github.com/crystal-loot/exception_page.git
Fetching https://github.com/Sija/backtracer.cr.git
Fetching https://github.com/jeromegn/kilt.git
Fetching https://github.com/iv-org/protodec.git
Fetching https://github.com/iv-org/lsquic.cr.git
Fetching https://github.com/athena-framework/negotiation.git
Unsupported shard.lock. It was likely generated from a newer version of Shards.
invidious@localhost:~/invidious $ crystal build src/invidious.cr --release
Showing last frame. Use --error-trace for full trace.

In src/invidious.cr:21:1

 21 | require "kemal"
      ^
Error: can't find file 'kemal'

If you're trying to require a shard:
- Did you remember to run `shards install`?
- Did you make sure you're running the compiler in the same directory as your shard.yml?

(That took me a moment to realise that crystal didn't have write access to the repo!)

Describe the solution you'd like

for this to compile without having to install docker.

Describe alternatives you've considered

Porting invidious to rust-lang?

@alexxroche alexxroche added the feature-request Request of a new feature label Apr 23, 2022
@unixfox
Copy link
Member

unixfox commented Apr 23, 2022

Please use our docker image for ARM(64): #361 (comment)

@unixfox unixfox closed this as completed Apr 23, 2022
@SamantazFox
Copy link
Member

Please use our docker image for ARM(64): #361 (comment)

@unixfox Note that they mentioned that they'd like: "for this to compile without having to install docker."

I wanted to install a local, (native) instance of invidious on a Raspberry pi 3 running Raspbian and ran into a crystal shard problem:

@alexxroche Afaik, Crystal doesn't provide ARM prebuilt binaries. And we (the invidious team) don't have the time to bundle that. The only ARM crystal package I'm aware of i the one in Alpine linux, which can't be used on GNU/Linux distros because it's using a different libc.

You can try to follow the following resources in order to have Crystal available on raspbian:

Porting invidious to rust-lang?

Rewriting invidious (in any language) is out of our scope. This would require too much work (the current code base is very large) compared to continuing with Crystal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request of a new feature
Projects
None yet
Development

No branches or pull requests

3 participants