Closed vegabook closed 4 months ago
Try
'brew install libomp'
Then recompile
Try
'brew install libomp'
Then recompile
Yeah that does work, but on Nix still doesn't. Even though xgboost is there, and the Nix search libgomp
is provided by libgcc
which I also put into the environment. This may be a Nix issue, but I'm wondering if some assumptions about the location of libgomp
are being made or something like that which are not valid under NixOS.
Reason I say that is that the rest of the (fairly complicated) NX stack works fine under NixOS and there's NIFs aplenty there too.
Hmm I'm not sure then. I've done no testing under Nix. If it does have to do with assumptions with how XGBoost links, then the XGBoost issues or docs might be of more help
Hmm I'm not sure then. I've done no testing under Nix. If it does have to do with assumptions with how XGBoost links, then the XGBoost issues or docs might be of more help
thing is xgboost is natively provided by Nix, but as I'm unsure of where exactly the problem lies I'm going to close this for now and see if I can get any more useful information.
@acalejos Just FYI I have gotten it to compile by forcing NixOS to emulate the Linux File System Hierarchy (FHS). Here is another asciinema showing it in action (both before and after success): https://asciinema.org/a/uILBg73uDf2as2SdYJ4U54j4m
BTW the trick is to emulate the Linux "File System Hierarchy" to fool exgboost to think it doesn't need explicit paths to all its libs. Essentially you're assuming you'll always work on a "standard" Linux distro, that adheres to FHS, and where libgomp.so.1
will always be where Ubuntu/Fedora etc put them. This is not going to work on Nix, nor on many embedded systems, nor on any of the BSDs probably. Not sure exactly how libgomp.so.1
is being referenced in the [e]xgboost stack. The rest of the Nx stack does not suffer from this and I know that Explorer
for example uses NIFs and that I'm sure those try to hit all sorts of Linux libs, but don't rely on FHS.
Here is the shell.nix that helps:
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSEnv {
name = "fhs-env";
multiPkgs = pkgs: (with pkgs; [
elixir
erlang
]);
runScript = "bash";
}).env
Anyway enough waffling now looking forward to using your lib!
I have tried on both Apple Silicon, and on AMD64 Nixos, using Nix:
But can't seem to find
libgomp.so.1
even though this is (provided by libgcc)[https://search.nixos.org/packages?channel=24.05&from=0&size=50&sort=relevance&type=packages&query=libgomp], and for good measure, I also putxgboost
into the environment.And the full Asciinema: https://asciinema.org/a/4Cq3qL4eiehonuJxNbV1gvfVR