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

Provide install instructions #328

Open
mneumann opened this issue May 16, 2022 · 3 comments
Open

Provide install instructions #328

mneumann opened this issue May 16, 2022 · 3 comments

Comments

@mneumann
Copy link
Contributor

mneumann commented May 16, 2022

What is the correct way of installing savi to a system location?

I copied build/savi-debug to /usr/local/bin/savi.
When I run savi in a directory containing a manifest.savi, I get:

Savi compiler error occured with message "Error opening directory: '/usr/local/core/declarators/meta': No such file or directory". Consider submitting an issue ticket.

When I copy the core directory to /usr/local/core it works. I'd suggest to search for these files in /usr/local/lib/savi/core instead.

Also savi init exists silently, not generating any files and not printing any hints to run savi init bin.

@jemc
Copy link
Contributor

jemc commented May 17, 2022

Right now the only expected way to install is with asdf, or with the release tarballs that asdf uses (which get automatically built for each platform by CI - though as you know, FreeBSD CI isn't working yet).

In that case, the tarball can be extracted anywhere - you only need to keep the file structure intact.

asdf is a convenient way to install because it makes shims for easily selecting a specified version, and you don't need to manually manage the PATH to find the savi binary - once you've set up asdf once.

I'd suggest to search for these files in /usr/local/lib/savi/core instead.

I don't want Savi to be searching for its files at an absolute file path - I want it to stay relative to the savi binary so that you can put the files anywhere you choose. At this time, installing in a global directory like /usr/local/bin is not the expected use case.

However, if you want to rearrange the relative paths in the tarball a bit so that it's a bit more friendly for a global installation (while still staying friendly to the main "anywhere installation" use case.

@mneumann
Copy link
Contributor Author

asdf doesn't seem to be easily available for FreeBSD :(
There is only support for ASDF, Advanced Scientific Data Format :).

You probably have code in the Makefile to produce that tarball right? I can run that locally and unpack the tar in a system directory or into $HOME/.local etc.

If I know which directories are needed by savi, I can just cpdup them accordingly.

@jemc
Copy link
Contributor

jemc commented May 19, 2022

asdf doesn't seem to be easily available for FreeBSD :(

@mneumann - did you try using the Git method of installation for asdf? Nothing on that page explicitly says FreeBSD is supported, but I do see some PR activity in the asdf repo that mentions FreeBSD, implying that it works on that platform.

You probably have code in the Makefile to produce that tarball right? I can run that locally and unpack the tar in a system directory or into $HOME/.local etc.

Right now, it's only in CirrusCI steps but I could likely move those steps into a Makefile target, then invoke that target from CirrusCI.

If I know which directories are needed by savi, I can just cpdup them accordingly.

Basically, at the time of this writing (which may change in the future) what you need is:

  • bin/savi (technically this can be named anything, as long as the relative path to the following two directories in this list is retained)
  • core (Savi source code for the core library, referenced during compilation)
  • lib/libsavi_runtime (built LLVM IR and debugging info for the runtime, referenced at the final stage of compilation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants