-
-
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
igraph: don't enable LTO on darwin #122058
Conversation
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.
diff LGTM
We can merge when darwin ofborg build succeeds
Built fine for me on x86_64-darwin, but I did get a few test failures. My mac is old and clunky, so it could be that.
A lot of the errors look like this. Probably unrelated to this PR
|
Thanks for giving this a shot. If you have an idea on how to fix the tests I'm all ears. |
If @rmcgibbo can test it, we should give AUTO a shot. |
Pushed. |
Same failures on 48c084a33ee925a3cfb08f51ed6b3bcdb6291c93. I think it might be an issue with my version of osx (which is 10.12.6). it looks like during configure, it's picking up blas from /nix/store/sjbaxyq59vish88xvy3yrki16ga0b33k-blas-3/lib/libblas.dylib, but at runtime it's pickup up blas from /usr/lib/libblas.dylib. |
No idea how to address that without looking deeper into igraph. |
Is setting |
Maybe we need to load blas into LD_LIBRAY_PATH? |
@@ -86,7 +86,7 @@ stdenv.mkDerivation rec { | |||
|
|||
preCheck = '' | |||
# needed to find libigraph.so | |||
export LD_LIBRARY_PATH="$PWD/src" | |||
export LD_LIBRARY_PATH="${lib.getLib blas}/lib:$PWD/src" |
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.
export LD_LIBRARY_PATH="${lib.getLib blas}/lib:$PWD/src" | |
export LD_LIBRARY_PATH="${lib.makeLibraryPath [ blas ]}:$PWD/src" |
just in case we add something else in the future?
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.
trying this now
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.
Applied.
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.
This didn't work, but this did:
diff --git a/pkgs/development/libraries/igraph/default.nix b/pkgs/development/libraries/igraph/default.nix
index 911c77109c6..a060440456e 100644
--- a/pkgs/development/libraries/igraph/default.nix
+++ b/pkgs/development/libraries/igraph/default.nix
@@ -86,7 +86,8 @@ stdenv.mkDerivation rec {
preCheck = ''
# needed to find libigraph.so
- export LD_LIBRARY_PATH="$PWD/src"
+ # export LD_LIBRARY_PATH="$PWD/src"
+ export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [ blas ]}:$PWD/src"
'';
postInstall = ''
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.
Integrated.
I think building |
I think ofborg doesn't build on Darwin anymore |
Result of 2 packages failed to build:1 package skipped due to time constraints:
6 packages built successfully:
Note that build failures may predate this PR, and could be nondeterministic or hardware dependent. Result of 2 packages failed to build:1 package skipped due to time constraints:
6 packages built successfully:
Note that build failures may predate this PR, and could be nondeterministic or hardware dependent. |
77e2032
to
2d8d367
Compare
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.
Nice!
export LD_LIBRARY_PATH="$PWD/src" | ||
|
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.
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.
Fixed!
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.
Builds on darwin for me.
> The IGRAPH_ENABLE_LTO build option now supports the AUTO value, which > uses LTO only if the compiler supports it. Warning: CMake may not > always be able to detect that LTO is not fully supported. Therefore, > the default setting is OFF. https://igraph.org/2021/03/23/igraph-0.9.1-c.html
Motivation for this change
Package was failing on darwin only. Unable to test due to lack of darwin machine.
https://nix-cache.s3.amazonaws.com/log/qn3p5hjrprdc9c7phv0mfl89l2k79z8q-igraph-0.9.3.drv
An alternative would be to rely on autodetection, which exists since 0.9.1. But this change should be the safer bet.
ZHF #122042
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)