-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
llvmPackages.tblgen: fix build on darwin #377225
base: staging
Are you sure you want to change the base?
Conversation
# These flags are needed only for evaluating the CMake file. | ||
++ lib.optionals stdenv.hostPlatform.isDarwin [ | ||
"-DLLDB_INCLUDE_TESTS=OFF" | ||
"-DLIBXML2_INCLUDE_DIR=/non-existent" |
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.
Why have you added this? I've been able to build stdenv
on darwin without it, actually.
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.
Are you sure? @emilazy commented it is not working on Darwin
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.
I meant LIBXML2_INCLUDE_DIR
, specifically. LLDB_INCLUDE_TESTS=OFF
was enough in my testing.
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.
Without LIBXML2_INCLUDE_DIR
it is not possible to build:
error: builder for '/nix/store/vi7vr3akzqyjwdrgrkaynhmm2c80miql-llvm-tblgen-19.1.6.drv' failed with exit code 1;
last 25 log lines:
>
> CMake Error in /tmp/nix-build-llvm-tblgen-19.1.6.drv-0/llvm-tblgen-src-19.1.6/lldb/tools/lldb-server/CMakeLists.txt:
> Found relative path while evaluating include directories of "lldb-server":
>
> "LIBXML2_INCLUDE_DIR-NOTFOUND"
>
>
>
> CMake Error in /tmp/nix-build-llvm-tblgen-19.1.6.drv-0/llvm-tblgen-src-19.1.6/lldb/tools/lldb-server/CMakeLists.txt:
> Found relative path while evaluating include directories of "lldb-server":
>
> "LIBXML2_INCLUDE_DIR-NOTFOUND"
>
>
>
> -- Generating done (4.5s)
> CMake Warning:
> Manually-specified variables were not used by the project:
>
> BUILD_TESTING
> CMAKE_EXPORT_NO_PACKAGE_REGISTRY
> CMAKE_POLICY_DEFAULT_CMP0025
>
>
> CMake Generate step failed. Build files cannot be regenerated correctly.
For full logs, run 'nix log /nix/store/vi7vr3akzqyjwdrgrkaynhmm2c80miql-llvm-tblgen-19.1.6.drv'.
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.
What platform is that?
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.
aarch64-darwin (apple m4 pro)
tested on x86_64-darwin, same behavior.
My last PR, #375654 , fails to build correctly on Darwin, as noted in this comment.
In previous PR I only tested the build on Linux (x86_64 and aarch64). It seems additional adjustments are needed for proper compatibility on Darwin.
Right now it builds successful on aarch64-darwin
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.