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

feat(default.nix): Init in /compiler+runtime #94

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

haruki7049
Copy link
Contributor

Adding Nix-build support for /compiler+runtime directory.

@haruki7049
Copy link
Contributor Author

Hey @jeaye, In 7585782, An error is occured about LLVM supported version. However github.com/llvm/llvm-project has no version, named as 19.0.x. What LLVM version should I use?

CMake Error at cmake/llvm.cmake:78 (message):
  Found unsupported version: LLVM 19.1.1;

  Please set llvm_dir pointing to the llvm version 19.0 to 19.0.x build or
  installation folder
Call Stack (most recent call first):
  CMakeLists.txt:113 (include)

@haruki7049 haruki7049 changed the title feat(default.nix): Init in /comipler+runtime feat(default.nix): Init in /compiler+runtime Oct 4, 2024
@haruki7049
Copy link
Contributor Author

  • Fixed typo in PR's title...

@jeaye
Copy link
Member

jeaye commented Oct 4, 2024

Hey @jeaye, In 7585782, An error is occured about LLVM supported version. However github.com/llvm/llvm-project has no version, named as 19.0.x. What LLVM version should I use?

CMake Error at cmake/llvm.cmake:78 (message):
  Found unsupported version: LLVM 19.1.1;

  Please set llvm_dir pointing to the llvm version 19.0 to 19.0.x build or
  installation folder
Call Stack (most recent call first):
  CMakeLists.txt:113 (include)

Hey! I'd say, in order to get things compiling, we can just patch that CMake check to allow your 19.1.1 version. Everyone working on jank, right now, compiles Clang/LLVM from source and it's roughly 19.0.0 but it has a particular fix which hasn't made it into the 19.x release yet. I have a ticket for that here: llvm/llvm-project#111068

By using 19.1.1, we may run into some hard crashes when we run jank, but the main task here is getting it compiling with Nix. Using a different Clang version after we get things compiling should be much easier, especially if I can get that commit backported to 19.x.

@jeaye
Copy link
Member

jeaye commented Oct 4, 2024

I went through our vcpkg.json to see what we can do about each of the deps. Looks like only one of them needs compilation. The majority can be global distro packages. A few we'll need to bring in as submodules (like compiler+runtime/third-party/bpptree and others).

  • bdwgc: distro package (boehmgc or bdwgc, same thing)
  • boost-algorithm: distro package (boost)
  • boost-filesystem: distro package (boost)
  • boost-smart-ptr: distro package (boost)
  • boost-variant: distro package (boost)
  • boost-preprocessor: distro package (boost)
  • fmt: distro package (fmt)
  • readline: distro package (readline)
  • cli11: header-only; submodule https://github.com/CLIUtils/CLI11 into compiler+runtime/third-party/cli11
  • immer: header-only; submodule https://github.com/arximboldi/immer into compiler+runtime/third-party/immer
  • magic-enum: header-only; submodule https://github.com/Neargye/magic_enum into compiler+runtime/third-party/magic_enum
  • libassert: skip this, we're not using it right now
  • libzippp:
    • needs compilation
    • submodule https://github.com/ctabin/libzippp into compiler+runtime/third-party/libzippp
    • uses cmake, so we should be able to build it as an external project

Hopefully this is helpful.

@haruki7049
Copy link
Contributor Author

haruki7049 commented Oct 4, 2024

Tasks:

  • Build boost
  • Build folly (Resolved by using local submodule)

@haruki7049
Copy link
Contributor Author

Memo: What is the DCHECK?

/build/source/folly/logging/LoggerDB.cpp: In constructor 'folly::LoggerDB::LoggerDB()':
/build/source/folly/logging/LoggerDB.cpp:78:3: error: 'DCHECK' was not declared in this scope
   78 |   DCHECK(ret.second);
      |   ^~~~~~
/build/source/folly/logging/LoggerDB.cpp: In member function 'folly::LogCategory* folly::LoggerDB::createCategoryLocked(LoggerNameMap&, folly::StringPiece, folly::LogCategory*)':
/build/source/folly/logging/LoggerDB.cpp:473:3: error: 'DCHECK' was not declared in this scope
  473 |   DCHECK(ret.second);
      |   ^~~~~~
make[2]: *** [CMakeFiles/folly_base.dir/build.make:3366: CMakeFiles/folly_base.dir/folly/logging/LoggerDB.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/folly_base.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

@jeaye
Copy link
Member

jeaye commented Oct 4, 2024

Hmm, so jank builds what it needs from folly as part of a custom target: https://github.com/jank-lang/jank/blob/main/compiler%2Bruntime/CMakeLists.txt#L323

Folly itself is a pain in the ass to build, so I've stripped out just the bits that jank needs and patched them to compile more easily. Are you building folly on its own, or using jank's CMake target for it?

@haruki7049
Copy link
Contributor Author

I was building folly only, thinking that I could just build folly as is. it is quite hard to use git submodule in Nix.

@jeaye
Copy link
Member

jeaye commented Oct 4, 2024

I was building folly only, thinking that I could just build folly as is. it is quite hard to use git submodule in Nix.

I think getting Nix to clone recursively (or just work with submodules in some way) would be beneficial for two reasons:

  1. Lots of people will need to build jank without Nix and submodules will work easily for them
  2. We don't want the Nix build to be building from different sources than what's in the actual repo (i.e. the submodules)

You know Nix better than I do, for sure. What I know, though, is that:

  1. If we're just building from the local filesystem (i.e. submodules have already been initialized), Nix doesn't need to know anything about submodules
  2. If we're building from scratch, fetchGit supports a deepClone = true flag

Are we able to work with that?

@haruki7049
Copy link
Contributor Author

Now my local repository was not cloned using git clone --recurse-submodules {repo_url}, but simply cloned and used using git clone {repo_url}. Even in this case, to make nix-build available, it was taken from the URL.

Sure, if we have those files locally, we can reference them.

Make git clone --recurse-submodules {repo_url} mandatory?

But I'd like to say no, because I believe that building in Nix should be possible with or without submodules.

@jeaye
Copy link
Member

jeaye commented Oct 4, 2024

Now my local repository was not cloned using git clone --recurse-submodules {repo_url}, but simply cloned and used using git clone {repo_url}. Even in this case, to make nix-build available, it was taken from the URL.

Sure, if we have those files locally, we can reference them.

Make git clone --recurse-submodules {repo_url} mandatory?

But I'd like to say no, because I believe that building in Nix should be possible with or without submodules.

Initializing submodules (either with git clone --recurse-submodules or git submodule update --recursive --init) is currently mandatory, outside of Nix. Since we want Nix to use the same sources, I think Nix should also use the submodules. Otherwise, maintaining the Nix versions of our dependencies will require duplicate effort. Whenever we update a submodule, we'll also need to update the Nix expression.

Submodules are pure and reproducible, like any git commit. A single git commit in jank represents not only a snapshot of jank's source but also all of its submodules.

Hopefully that's a good enough point. Thanks for working with me here. 🙂 すみません

@haruki7049
Copy link
Contributor Author

That may indeed be true. Ok, I'll take the method of using local submodules on Nix.

And, no need to apologize. It's okay. NO PROBLEM!!
だいじょうぶ!!

@haruki7049
Copy link
Contributor Author

Wait, The folly submodule should contain files other than those listed below. If you do not write the file exclusion settings in the submodule, you will end up writing the source file exclusion in Nix as well.

set(
  folly_sources
  third-party/folly/folly/ScopeGuard.cpp
  third-party/folly/folly/SharedMutex.cpp
  third-party/folly/folly/concurrency/CacheLocality.cpp
  third-party/folly/folly/synchronization/ParkingLot.cpp
  third-party/folly/folly/synchronization/SanitizeThread.cpp
  third-party/folly/folly/lang/SafeAssert.cpp
  third-party/folly/folly/lang/ToAscii.cpp
  third-party/folly/folly/system/ThreadId.cpp
  third-party/folly/folly/system/AtFork.cpp
  third-party/folly/folly/detail/Futex.cpp
)

@jeaye
Copy link
Member

jeaye commented Oct 4, 2024

Wait, The folly submodule should contain files other than those listed below. If you do not write the file exclusion settings in the submodule, you will end up writing the source file exclusion in Nix as well.

set(
  folly_sources
  third-party/folly/folly/ScopeGuard.cpp
  third-party/folly/folly/SharedMutex.cpp
  third-party/folly/folly/concurrency/CacheLocality.cpp
  third-party/folly/folly/synchronization/ParkingLot.cpp
  third-party/folly/folly/synchronization/SanitizeThread.cpp
  third-party/folly/folly/lang/SafeAssert.cpp
  third-party/folly/folly/lang/ToAscii.cpp
  third-party/folly/folly/system/ThreadId.cpp
  third-party/folly/folly/system/AtFork.cpp
  third-party/folly/folly/detail/Futex.cpp
)

The folly submodule contains more files, yes. The ones listed there are just the files we're compiling, but we still need other files, such as all of the headers that those source files include. I don't think we should be excluding any files using Nix.

@haruki7049
Copy link
Contributor Author

Then, How should I do for #94 (comment) ?

@jeaye
Copy link
Member

jeaye commented Oct 4, 2024

So, I think you shouldn't need to do anything for folly. We already have a submodule for it and it already builds as part of jank. There shouldn't be anything you need to do there, unless you run into errors compiling the folly which is part of jank. But I believe the error you ran into was when you were compiling a different version of folly. Correct me if I'm wrong.

@haruki7049
Copy link
Contributor Author

Ah, you are referring to a submodule that is local. I finally understand. Thanks, Jeaye!!

@jeaye
Copy link
Member

jeaye commented Oct 29, 2024

The latest llvm 19.1.2 release has everything we need, but it's not available as a binary for most distros yet.

Wait, Is this project using LLVM 19.1.2? Not LLVM 19.1.1?

When you started this PR, jank was using an unreleased version of LLVM. That's why we had to compile it from source. I told you not to worry about it, since the issues would show up as hard crashes at runtime but we should focus on getting things compiling first. Since then, 19.1.2 has been released with the necessary fixes, so we can go forward using that.

@haruki7049
Copy link
Contributor Author

@jeaye Can I close the pull request once I have found it very difficult to write up the default.nix for this project? Instead, I am going to add some more shell.nix.

@jeaye
Copy link
Member

jeaye commented Oct 29, 2024 via email

@haruki7049
Copy link
Contributor Author

If those could be done, it would be quite easy.... But are they feasible?

@jeaye
Copy link
Member

jeaye commented Oct 30, 2024 via email

@jeaye
Copy link
Member

jeaye commented Oct 30, 2024

Yeah. Give me a few days and I'll report back.

On October 29, 2024 4:29:27 PM PDT, haruki7049 @.> wrote: If those could be done, it would be quite easy.... But are they feasible? -- Reply to this email directly or view it on GitHub: #94 (comment) You are receiving this because you were mentioned. Message ID: @.>

I've moved the incremental PCH compilation out of the script and into cmake as a custom target in 319f0b2

Hopefully that helps. I'll work on removing vcpkg next. That'll take longer.

@haruki7049
Copy link
Contributor Author

haruki7049 commented Oct 30, 2024

Commit hash: 3f60ab5
Command: nix-build
Directory: /compiler+runtime

This error is generated. What is this?
err.log


nix-shell -p nix-info --run "nix-info -m"

 - system: `"aarch64-darwin"`
 - host os: `Darwin 24.0.0, macOS 15.0.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/store/63lvc59rjz075kb1f11xww2x2xqpw1pn-source`

@jeaye
Copy link
Member

jeaye commented Oct 30, 2024

Commit hash: 3f60ab5 Command: nix-build Directory: /compiler+runtime

This error is generated. What is this? err.log

nix-shell -p nix-info --run "nix-info -m"

 - system: `"aarch64-darwin"`
 - host os: `Darwin 24.0.0, macOS 15.0.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/store/63lvc59rjz075kb1f11xww2x2xqpw1pn-source`

The error happens when building folly. From what I gather, the issue is because you're using libc++ instead of libstdc++. We can see that in the errors here:

In file included from /nix/store/7x3an9qwvkmird3n67qw09jccmd1dd7g-libcxx-19.1.1-dev/include/c++/v1/functional:552:
In file included from /nix/store/7x3an9qwvkmird3n67qw09jccmd1dd7g-libcxx-19.1.1-dev/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /nix/store/7x3an9qwvkmird3n67qw09jccmd1dd7g-libcxx-19.1.1-dev/include/c++/v1/vector:325:
In file included from /nix/store/7x3an9qwvkmird3n67qw09jccmd1dd7g-libcxx-19.1.1-dev/include/c++/v1/__format/formatter_bool.h:16:
In file included from /nix/store/7x3an9qwvkmird3n67qw09jccmd1dd7g-libcxx-19.1.1-dev/include/c++/v1/__format/concepts.h:16:
In file included from /nix/store/7x3an9qwvkmird3n67qw09jccmd1dd7g-libcxx-19.1.1-dev/include/c++/v1/__format/format_parse_context.h:16:

jank needs to be built with libstdc++. Generally, clang will use this by default on Linux, but Nix must be doing something weird.

@jeaye
Copy link
Member

jeaye commented Nov 2, 2024

vcpkg is gone: #122

We rely on boost and readline globally, while the rest has been brought in via submodules.

@haruki7049 haruki7049 force-pushed the feat/setup-nix-build-compiler branch from ed864ba to c221ce9 Compare November 2, 2024 05:32
@haruki7049

This comment was marked as outdated.

@haruki7049
Copy link
Contributor Author

haruki7049 commented Nov 10, 2024

@jeaye
I don't know, because I don't know C++, but is the fmt/format really imported?

Commit hash: c221ce9

System:

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-linux"`
 - host os: `Linux 6.6.31, NixOS, 24.11 (Vicuna), 24.11pre703931.4aa36568d413`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.10`
 - channels(root): `"nixos, nixos-hardware"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

err.log

@jeaye
Copy link
Member

jeaye commented Nov 10, 2024

@jeaye I don't know, because I don't know C++, but is the fmt/format really imported?

Commit hash: c221ce9

System:

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-linux"`
 - host os: `Linux 6.6.31, NixOS, 24.11 (Vicuna), 24.11pre703931.4aa36568d413`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.10`
 - channels(root): `"nixos, nixos-hardware"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

err.log

Looks like you may not be on the latest main. Your compilation line there is missing the include path to fmt. It was added here: 8166273#diff-084c38e4be3e607f9cb1264d6a09cf1234173392296c938b42838cfffb28176dR236

@haruki7049
Copy link
Contributor Author

Hey @jeaye, Are you know this error's meaning?

https://gist.github.com/haruki7049/b04d1772c570f6019bd02808a0fc3647#file-err-log

Commit hash: 3e3a3bd

@jeaye
Copy link
Member

jeaye commented Nov 10, 2024

Hey @jeaye, Are you know this error's meaning?

https://gist.github.com/haruki7049/b04d1772c570f6019bd02808a0fc3647#file-err-log

Commit hash: 3e3a3bd

The error is saying that the incremental PCH we're loading was compiled with different flags than the jank binary. So when the jank binary tries to load the incremental PCH at runtime, clang raises this error.

I saw this before and I think I fixed it by ensuring all the same compilation flags are used for both jank and the incremental.pch. Though, I think I've only seen it when using a prebuilt clang/llvm for building jank. I've never been able to fully get that working, for one reason or another.

@jeaye
Copy link
Member

jeaye commented Nov 10, 2024

If that incremental.pch is the only thing getting in the way, perhaps we can try without it. There would be a severe performance penalty for startup time, though. That's why I'm hopeful that we can get it loaded normally.

@jeaye
Copy link
Member

jeaye commented Nov 23, 2024

If that incremental.pch is the only thing getting in the way, perhaps we can try without it. There would be a severe performance penalty for startup time, though. That's why I'm hopeful that we can get it loaded normally.

@haruki7049 following up to say the llvm-ir branch has both PCHs removed. This should fix the error you were seeing. It's not quite ready to merge yet, but I think it should allow you to build everything cleanly on Nix. 🙂

@haruki7049
Copy link
Contributor Author

TODO

$ ldd result/bin/jank
	linux-vdso.so.1 (0x00007ffe8e3f3000)
	libfmtd.so.11 => not found
	libgccpp.so.1 => /home/haruki/program-dir/jank/compiler+runtime/result/bin/../lib/libgccpp.so.1 (0x00007f55cb49a000)
	libgc.so.1 => /home/haruki/program-dir/jank/compiler+runtime/result/bin/../lib/libgc.so.1 (0x00007f55cb429000)
	libzippp.so => not found
	libreadline.so.8 => /nix/store/xxcf5gwyn5pldv4b4wa2jw6vqg7v55y6-readline-8.2p10/lib/libreadline.so.8 (0x00007f55cb3cd000)
	libclang.so.19.1 => /nix/store/a5ximnyqqb2rn5x8w90ic1acr0js84cg-clang-19.1.1-lib/lib/libclang.so.19.1 (0x00007f55c8000000)
	libclang-cpp.so.19.1 => /nix/store/a5ximnyqqb2rn5x8w90ic1acr0js84cg-clang-19.1.1-lib/lib/libclang-cpp.so.19.1 (0x00007f55c3800000)
	libLLVM.so.19.1 => /nix/store/2f53shlvx25ng9kbmlpar45fg0zrjj35-llvm-19.1.1-lib/lib/libLLVM.so.19.1 (0x00007f55ba600000)
	libdl.so.2 => /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/libdl.so.2 (0x00007f55cb3c8000)
	libstdc++.so.6 => /nix/store/22nxhmsfcv2q2rpkmfvzwg2w5z1l231z-gcc-13.3.0-lib/lib/libstdc++.so.6 (0x00007f55ba200000)
	libm.so.6 => /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/libm.so.6 (0x00007f55c7f1a000)
	libgcc_s.so.1 => /nix/store/22nxhmsfcv2q2rpkmfvzwg2w5z1l231z-gcc-13.3.0-lib/lib/libgcc_s.so.1 (0x00007f55ca7db000)
	libc.so.6 => /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/libc.so.6 (0x00007f55ba009000)
	/nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/ld-linux-x86-64.so.2 => /nix/store/65h17wjrrlsj2rj540igylrx7fqcd6vq-glibc-2.40-36/lib64/ld-linux-x86-64.so.2 (0x00007f55cb4a1000)
	libncursesw.so.6 => /nix/store/z7nr6aqlzv51pk5ar8bgzg2alfqvi8fd-ncurses-6.4.20221231/lib/libncursesw.so.6 (0x00007f55ca765000)
	libffi.so.8 => /nix/store/4ybgqxv43z9sk9lccwq6dgmz6j32syr1-libffi-3.4.6/lib/libffi.so.8 (0x00007f55ca754000)
	librt.so.1 => /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/librt.so.1 (0x00007f55ca74f000)
	libz.so.1 => /nix/store/rqs1zrcncqz3966khjndg1183cpdnqxs-zlib-1.3.1/lib/libz.so.1 (0x00007f55c7efc000)
	libxml2.so.2 => /nix/store/nr8mh99sfsb1gw1b1qmrwhzmxbhj84j7-libxml2-2.13.3/lib/libxml2.so.2 (0x00007f55ba4a4000)

@haruki7049
Copy link
Contributor Author

Hey @jeaye !!
I AM SO SORRY for being unresponsive... This is because I have been quite busy lately.

Now the default.nix can be built by Nix. However libfmtd.so.11 is not linked to result/bin/jank.
Do you know libfmtd.so.11's package name? I can link libfmtd.so.11 using patchelf if I know the package name.

@jeaye
Copy link
Member

jeaye commented Jan 11, 2025

TODO

$ ldd result/bin/jank
	linux-vdso.so.1 (0x00007ffe8e3f3000)
	libfmtd.so.11 => not found
	libgccpp.so.1 => /home/haruki/program-dir/jank/compiler+runtime/result/bin/../lib/libgccpp.so.1 (0x00007f55cb49a000)
	libgc.so.1 => /home/haruki/program-dir/jank/compiler+runtime/result/bin/../lib/libgc.so.1 (0x00007f55cb429000)
	libzippp.so => not found
	libreadline.so.8 => /nix/store/xxcf5gwyn5pldv4b4wa2jw6vqg7v55y6-readline-8.2p10/lib/libreadline.so.8 (0x00007f55cb3cd000)
	libclang.so.19.1 => /nix/store/a5ximnyqqb2rn5x8w90ic1acr0js84cg-clang-19.1.1-lib/lib/libclang.so.19.1 (0x00007f55c8000000)
	libclang-cpp.so.19.1 => /nix/store/a5ximnyqqb2rn5x8w90ic1acr0js84cg-clang-19.1.1-lib/lib/libclang-cpp.so.19.1 (0x00007f55c3800000)
	libLLVM.so.19.1 => /nix/store/2f53shlvx25ng9kbmlpar45fg0zrjj35-llvm-19.1.1-lib/lib/libLLVM.so.19.1 (0x00007f55ba600000)
	libdl.so.2 => /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/libdl.so.2 (0x00007f55cb3c8000)
	libstdc++.so.6 => /nix/store/22nxhmsfcv2q2rpkmfvzwg2w5z1l231z-gcc-13.3.0-lib/lib/libstdc++.so.6 (0x00007f55ba200000)
	libm.so.6 => /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/libm.so.6 (0x00007f55c7f1a000)
	libgcc_s.so.1 => /nix/store/22nxhmsfcv2q2rpkmfvzwg2w5z1l231z-gcc-13.3.0-lib/lib/libgcc_s.so.1 (0x00007f55ca7db000)
	libc.so.6 => /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/libc.so.6 (0x00007f55ba009000)
	/nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/ld-linux-x86-64.so.2 => /nix/store/65h17wjrrlsj2rj540igylrx7fqcd6vq-glibc-2.40-36/lib64/ld-linux-x86-64.so.2 (0x00007f55cb4a1000)
	libncursesw.so.6 => /nix/store/z7nr6aqlzv51pk5ar8bgzg2alfqvi8fd-ncurses-6.4.20221231/lib/libncursesw.so.6 (0x00007f55ca765000)
	libffi.so.8 => /nix/store/4ybgqxv43z9sk9lccwq6dgmz6j32syr1-libffi-3.4.6/lib/libffi.so.8 (0x00007f55ca754000)
	librt.so.1 => /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/librt.so.1 (0x00007f55ca74f000)
	libz.so.1 => /nix/store/rqs1zrcncqz3966khjndg1183cpdnqxs-zlib-1.3.1/lib/libz.so.1 (0x00007f55c7efc000)
	libxml2.so.2 => /nix/store/nr8mh99sfsb1gw1b1qmrwhzmxbhj84j7-libxml2-2.13.3/lib/libxml2.so.2 (0x00007f55ba4a4000)

@haruki7049! Happy new year!

Very odd to see those not linked. All of the llvm-ir stuff is in main at this point. Both fmt and libzippp are built as part of jank's build. They come in as submodules.

Firstly, check if those shared objects are in your build directory. For me, they are.

If not, try this:

  1. Rebase (or merge) from main
  2. git submodule update --recursive --init
  3. Then configure and build again

You should be able to see cmake compiling fmt and libzippp, too.

@jeaye
Copy link
Member

jeaye commented Jan 12, 2025

@haruki7049! We just merged a new flake.nix which allows for easy compilation of jank in a nix shell with nix develop '.#'. I hope that should make a default.nix much easier to create. @skykanin is the one who got that going. Maybe the two of you can figure out how to get a default.nix going?

So excited to get jank into nixpkgs. :D

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

Successfully merging this pull request may close these issues.

2 participants