-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Nix portability improvements #13005
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
base: master
Are you sure you want to change the base?
Nix portability improvements #13005
Conversation
This no longer appears to be needed, and it breaks test execution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .nix
diff looks good; @hacker1024 would you be up to also run the tests? Speaking of, I still think it would make sense to add at least impure builds (i.e. build in a devShell) if not ccache to the CI, just that I'm occupied with other projects
@@ -213,7 +213,7 @@ add_library(ggml | |||
|
|||
target_link_libraries(ggml PUBLIC ggml-base) | |||
|
|||
if (CMAKE_SYSTEM_NAME MATCHES "Linux") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a special branch for https://releases.llvm.org/10.0.0/projects/libcxx/docs/UsingLibcxx.html#id2? Note that clang does not necessarily mean libc++, and gcc does not necessarily mean libstdc++ (e.g. in Nixpkgs all stdenvs use the same stdlib determined by the platform)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also idk about libdl
handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially. I guess it depends on how many systems we actually want to support - the original change was required for GCC on RHEL 8, so there's a reason for this branch for that use case.
I'm not sure if it's worth preemptively handling ancient LLVM versions as well unless either someone explicitly requires it or we're actively testing it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GCC on RHEL 8,
Let's then add a comment explaining the "why"s
Tested. Nice. Let's do a |
We could also consider replacing the flake with normal Nix and e.g. following the release channel. EDIT: well we'd have to keep around a flake for compatibility, but we could e.g. leave out the lock file |
This MR updates the Nix package in the interest of improving portability (in regards to cross-compilation and other libcs).
Changes:
native
/propagated
buildInput
sets where appropriatestdc++fs
on platforms that do not support itLLAMA_BUILD_*
options through NixTested platforms:
x86_64
forx86_64
x86_64
forx86_64
x86_64
foraarch64
x86_64
for staticaarch64