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

mint crashes on start (aarch64) #544

Closed
MarcusE1W opened this issue Apr 20, 2022 · 8 comments
Closed

mint crashes on start (aarch64) #544

MarcusE1W opened this issue Apr 20, 2022 · 8 comments
Labels
question Further information is requested

Comments

@MarcusE1W
Copy link

Hi.

I have successfully build mint from source on my ARM Pinebook (aarch64) with Manjaro ARM (archlinux) using the suggested commands:

git clone https://github.com/mint-lang/mint.git
cd mint
shards install
shards build --progress --release --no-debug

If I then want to try it out with:

cd bin
./mint --help

I get this error message

Unhandled exception: BakedFileSystem empty: no files in /home/mmw/.local/mint/src/assets (Exception)
  from ./mint in '??'
  from ./mint in '??'
  from ./mint in '__crystal_main'
  from ./mint in 'main'
  from /usr/lib/libc.so.6 in '??'
  from /usr/lib/libc.so.6 in '__libc_start_main'
  from ./mint in '_start'
  from ???

The content of assets is this:

mmw@PBP  ~/.../src/assets   master  ls
css_properties  html_tags       mint-logo.svg  sw-utils.js
docs-viewer     live-reload.js  runtime.js

Any suggestions ?

@gdotdesign
Copy link
Member

We bake the needed assets into the binary here: https://github.com/mint-lang/mint/blob/master/src/assets.cr using https://github.com/schovi/baked_file_system

From the looks of it the baking fails or there is nothing at the given path (maybe it resolves differently on Manjaro?) you can try setting the absolute path instead of the relative one.

@gdotdesign gdotdesign added the question Further information is requested label Apr 20, 2022
@MarcusE1W
Copy link
Author

Thanks.
Manjaro is essentially Archlinux with a bit delay to ensure the new packages work. I am not aware of any differences to resolve the path differently.

Where would I set the absolute path?

@gdotdesign
Copy link
Member

@MarcusE1W
Copy link
Author

MarcusE1W commented Apr 20, 2022

Hmm, no success so far.

Here is what I did with a fresh install:

rm -rf mint
git clone https://github.com/mint-lang/mint.git
cd mint

edited assets.cd and replaced line 5 from

    bake_folder "./assets"

to

    bake_folder "/home/mmw/.local/mint/src/assets"
shards install
shards build --progress --release --no-debug

unfortunately the same error occurs:

 mmw@PBP  ~/.local/mint   master ●  ./bin/mint --help
Unhandled exception: BakedFileSystem empty: no files in /home/mmw/.local/mint/src/assets (Exception)
  from ./bin/mint in '??'
  from ./bin/mint in '??'
  from ./bin/mint in '__crystal_main'
  from ./bin/mint in 'main'
  from /usr/lib/libc.so.6 in '??'
  from /usr/lib/libc.so.6 in '__libc_start_main'
  from ./bin/mint in '_start'
  from ???

The folder mentioned in the first line of the exception is the correct folder path.

@gdotdesign
Copy link
Member

There are no baked files, but I don't know why.

The error comes from here: https://github.com/schovi/baked_file_system/blob/master/src/baked_file_system.cr#L186
Here is the code that does the actual baking: https://github.com/schovi/baked_file_system/blob/master/src/loader/loader.cr#L10

So If you are so inclined, you can debug it locally, the shards are installed in the lib directory in the project.

@MarcusE1W
Copy link
Author

Currently I know nothing about crystal. I just thought I give mint a try.
So I might not be able to do it, but I will try.

@gdotdesign
Copy link
Member

I think I found the issue: https://github.com/schovi/baked_file_system/blob/master/src/loader/loader.cr#L25 paths are rejected that have a dot in them . ¯_(ツ)_/¯ try to move the repo outside the .local directory.

@MarcusE1W
Copy link
Author

Perfect, that works :-)

This could be the related issue:
schovi/baked_file_system#34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

2 participants