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

Package for Debian 12 #12

Open
spwhitton opened this issue Jan 10, 2024 · 12 comments
Open

Package for Debian 12 #12

spwhitton opened this issue Jan 10, 2024 · 12 comments

Comments

@spwhitton
Copy link

Hello,

I would very much like to try Spatial Shell. I run the latest release of Debian, "bookworm". I have no OCaml experience. When I try to use your build instructions, this is what happens:

swhitton@zephyr:~/src/spatial-shell>eval $(opam env --switch=default)
swhitton@zephyr:~/src/spatial-shell>make build-deps

<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["ocaml-system"]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
∗ installed ocaml-system.4.13.1
∗ installed ocaml-config.2
∗ installed ocaml.4.13.1
Done.
# Run eval $(opam env) to update the current shell environment

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[default] no changes from https://opam.ocaml.org
[spatial-shell.6] synchronised (file:///home/swhitton/src/spatial-shell)
spatial-shell is now pinned to git+file:///home/swhitton/src/spatial-shell#main (version 7-dev)

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[spatial-shell.7-dev] synchronised (git+file:///home/swhitton/src/spatial-shell#main)

[ERROR] Package conflict!
  * Incompatible packages:
- (invariant) → ocaml-system
- spatial-shell >= 7-dev → ocaml >= 5.0.0 → ocaml-base-compiler < 5.0.2~
You can temporarily relax the switch invariant with `--update-invariant'
  * Missing dependency:
- spatial-shell >= 7-dev → ocaml >= 5.0.0 → ocaml-variants < 5.2.1~ → ocaml-beta
unmet availability conditions: 'enable-ocaml-beta-repository'

No solution found, exiting
make: *** [Makefile:46: build-deps] Error 20
2 swhitton@zephyr:~/src/spatial-shell>ocaml --version
The OCaml toplevel, version 4.13.1

I would be grateful for any input.

I am a Debian Developer, and so if I find I like Spatial Shell, I would be interested in getting it into the official Debian and Ubuntu repositories. But got to try it out locally first :)

@spwhitton
Copy link
Author

Alright, I was able to get it the static build to work by passing -j1 to make, and hacking --update-invariants into the Makefile. I wonder if OCaml 5 is absolutely required for this project to build. Unfortunately, Debian seems to be still on OCaml 4.

@lthms
Copy link
Owner

lthms commented Jan 11, 2024

Hi @spwhitton and thanks for opening this issue! I have to admit, I’m pretty exciting by your message. Let’s make sure we can make it work locally indeed!

I won’t bother you too much with the details, but basically, using ocaml-system by default was a mistake. I’ve pushed a patch to default to the latest version of OCaml, and make build-deps should work this time.

I’ve also amend the build instruction in order to be sure it works with users not familiar with OCaml. In particular, running eval $(opam env) after make build-dev-deps.

If you ran into another issue, don’t hesitate to report it! I really want Spatial Shell to be usable and having it packaged in Debian and Ubuntu would be… well, awesome to say the least.

Something I can suggest if you ran into an issue: use the scripts/prepare-release-artifacts.sh script first. This will build an archive containing static binaries (build with musl). It’s used in the CI on ubuntu, so that’s reassuring.

@lthms
Copy link
Owner

lthms commented Jan 11, 2024

I didn’t see your message before posting mine, sorry about that. I’ll take the liberty to reopen, just to clear a specific related question. The dependency to OCaml 5 is really not necessary, and I can lift it pretty easily I think, I now exactly why I need that and it’s a bad reason. If you think it’s better for, eventually, packaging Spatial Shell for Debian (if Opam local switches are not a proper solution), I’ll definitely spend the necessary (and small) time to remove it. It was bothering me in any case.

@lthms lthms reopened this Jan 11, 2024
@spwhitton
Copy link
Author

spwhitton commented Jan 11, 2024 via email

@lthms
Copy link
Owner

lthms commented Jan 11, 2024

Thanks for the explanation! I don’t have a lot of dependencies, but some are missing from Debian repo. I’ll try to get the list of missing packages and could even give a try to package them myself at first (I’ve always been curious about Debian packaging (: ).

@lthms
Copy link
Owner

lthms commented Jan 11, 2024

Oh, I was a bit too hasty in pushing my latest changes. It looks like Bookworm still provides OCaml 4.13, not the latest LTS.

I think I’ll add a CI change to check that we can still build Spatial Shell on Debian stable without having to specify the OCAML_COMPILER manually 😅

@spwhitton
Copy link
Author

spwhitton commented Jan 11, 2024 via email

@lthms
Copy link
Owner

lthms commented Jan 11, 2024

I'd be very happy to do what I can to help you get those deps, and then indeed spatial-shell, into Debian. In particular, I can sponsor the uploads.

That’s good to know, thanks!

'spatial' is such a generic noun I think that it might be perceived as a namespace-grab.

Would spatiald work better, you think?

@lthms lthms changed the title Cannot build on Debian 12 Package for Debian 12 Jan 14, 2024
@lthms
Copy link
Owner

lthms commented Jan 14, 2024

Let’s repurpose the issue. Having Debian packages (even not added to the official repositories) was on my todo list.

I am currently in the process in trying to have less dependencies and less constraints. Once this PR is merged Spatial Shell will be compatible with OCaml 4.13 (packaged in debian stable).

@lthms
Copy link
Owner

lthms commented Jan 14, 2024

According to the CI, here are the OCaml libs installed by make build-deps

@spwhitton
Copy link
Author

I'd be very happy to do what I can to help you get those deps, and then indeed spatial-shell, into Debian. In particular, I can sponsor the uploads.

That’s good to know, thanks!

I have a confession to make: I reimplemented most of Spatial Shell in Perl over the weekend. As such, I'm no longer willing to invest significant effort into packaging it for Debian. I hope this is not too disappointing.

'spatial' is such a generic noun I think that it might be perceived as a namespace-grab.

Would spatiald work better, you think?

Hmm, still quite generic. I thought of spatialshd.

@lthms
Copy link
Owner

lthms commented Jan 15, 2024

I have a confession to make: I reimplemented most of Spatial Shell in Perl over the weekend.

No worries. If you have any valuable lessons you are willing to share from this journey, I would welcome them very much!

I’ll keep this issue to try to track my progress on this matter nonetheless.

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