jank-lang / jank

A Clojure dialect hosted on LLVM with native C++ interop
https://jank-lang.org
Mozilla Public License 2.0
1.6k stars 43 forks source link

Fix Ubuntu version in README #75

Closed wodin closed 3 months ago

wodin commented 4 months ago

I tried it out on Ubuntu 22.04 and found that the libstdc++6 package was too old. Then I tried it on Ubuntu 24.04 and it worked (the jank command ran with no arguments).

Btw, I ran it in docker and had to install the following packages before the jank command would run at all:

I tried running jank repl without success, despite installing a few more packages:

Note: Looks like your first run. Building pre-compiled header… In file included from /usr/local/bin/../include/cpp/jank/prelude.hpp:18:
In file included from /usr/local/bin/../include/cpp/jank/type.hpp:40:
/usr/local/bin/../include/cpp/jank/hash.hpp:62:29: error: unexpected type name 'T': expected expression
      if constexpr(requires(T t) { t.first, t.second; })
                            ^
In file included from /usr/local/bin/../include/cpp/jank/prelude.hpp:18:
In file included from /usr/local/bin/../include/cpp/jank/type.hpp:45:
/usr/local/bin/../include/cpp/jank/native_persistent_string.hpp:171:5: error: destructor cannot be declared constexpr
    constexpr ~native_persistent_string() noexcept
    ^
/usr/local/bin/../include/cpp/jank/native_persistent_string.hpp:578:52: error: no member named 'endian' in namespace 'std'; did you mean 'folly::Endian'?
    static constexpr native_bool is_little_endian{ std::endian::native == std::endian::little };
                                                   ^~~~~~~~~~~
                                                   folly::Endian
/usr/local/bin/../include/folly/lang/Bits.h:291:7: note: 'folly::Endian' declared here
class Endian {
      ^
In file included from /usr/local/bin/../include/cpp/jank/prelude.hpp:18:
In file included from /usr/local/bin/../include/cpp/jank/type.hpp:45:
[...]
jeaye commented 4 months ago

Hey! Thanks for the report. The errors you're getting are due to your C++ compiler not being new enough, looks like; it's not understanding C++20 concepts, constexpr destructors, and so on.

Let me spin up a 24.04 machine this weekend and I'll see what can be done. If you'd like to test more before that, just make sure you're using the latest Clang!

jeaye commented 3 months ago

Hey. Just checking in. I've verified that jank builds properly on Ubuntu 24.04, using the commands in the build doc.

I can't merge this PR, as it stands, since the line that was changed is regarding the pre-compiled jank binaries. Those are indeed still build on Ubuntu 22.04. If you'd like to update the Github workflow file to try building them on 24.04, that would complete the change. My guess it that it'll require some debugging work, though, so I'm going to close this for now.

If you'd like to push that forward, feel free to open this back up and update your changes. If you need more support for compiling jank on Ubuntu 24.04, let me know. I just started in a clean distrobox, ran the commands listed, and everything is working.