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

pythonPackages.cx_oracle: fix dlopen, patchelf and fix library path for oracle-instantclient binaries #40695

Merged
merged 11 commits into from May 22, 2018

Conversation

flokli
Copy link
Contributor

@flokli flokli commented May 17, 2018

Motivation for this change

Backport of #40688 to release-18.03.

This PR:

  • cleans up the oracle-instantclient expression
  • prefixes LD_LIBRARY_PATH for binaries in there
  • patchelfs some previously missed binaries
  • bumps pythonPackages.cx_oracle package
  • patches the odpi library, so it can find the oracle-instantclient libraries without having to set ORACLE_HOME
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

flokli and others added 8 commits May 17, 2018 20:52
(cherry picked from commit c936651)
(cherry picked from commit c1932f5)
previously, $ORACLE_HOME had to be set for each python script using this
library.

We now patch odpi to load libclntsh.so from oracle-instantclient if
$ORACLE_HOME was not provided.

(cherry picked from commit 639f795)
@flokli
Copy link
Contributor Author

flokli commented May 17, 2018

/cc @y0no

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python

The following builds were skipped because they don't evaluate on aarch64-linux: oracle-instantclient

Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


/nix/store/pqby5j0dwxz3bzh0gpqlfrjvvb614r2b-python-2.7.14

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python

The following builds were skipped because they don't evaluate on x86_64-linux: oracle-instantclient

Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


/nix/store/nx3jw576gqw01iiijgsav39w2qa4cni2-python-2.7.14

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python

The following builds were skipped because they don't evaluate on x86_64-darwin: oracle-instantclient

Partial log (click to expand)



these paths will be fetched (8.81 MiB download, 49.77 MiB unpacked):
  /nix/store/hldbiyiqd85xs8i2vjxccd23aj5by0f7-python-2.7.14
  /nix/store/m1zibc42jw94g2n6askrdkha96mgwp2k-gdbm-1.14
  /nix/store/pkbcpy0r299xw5ibwa7ym6giab5ys021-openssl-1.0.2o
copying path '/nix/store/m1zibc42jw94g2n6askrdkha96mgwp2k-gdbm-1.14' from 'https://cache.nixos.org'...
copying path '/nix/store/pkbcpy0r299xw5ibwa7ym6giab5ys021-openssl-1.0.2o' from 'https://cache.nixos.org'...
copying path '/nix/store/hldbiyiqd85xs8i2vjxccd23aj5by0f7-python-2.7.14' from 'https://cache.nixos.org'...
/nix/store/hldbiyiqd85xs8i2vjxccd23aj5by0f7-python-2.7.14

@flokli
Copy link
Contributor Author

flokli commented May 22, 2018

I added the commits from #40900 into this PR as well, as this makes the expression much nicer :-)

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python

Partial log (click to expand)

/nix/store/pqby5j0dwxz3bzh0gpqlfrjvvb614r2b-python-2.7.14

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python

Partial log (click to expand)

/nix/store/nx3jw576gqw01iiijgsav39w2qa4cni2-python-2.7.14

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python

Partial log (click to expand)

these paths will be fetched (7.82 MiB download, 46.35 MiB unpacked):
  /nix/store/hldbiyiqd85xs8i2vjxccd23aj5by0f7-python-2.7.14
  /nix/store/m1zibc42jw94g2n6askrdkha96mgwp2k-gdbm-1.14
copying path '/nix/store/m1zibc42jw94g2n6askrdkha96mgwp2k-gdbm-1.14' from 'https://cache.nixos.org'...
copying path '/nix/store/hldbiyiqd85xs8i2vjxccd23aj5by0f7-python-2.7.14' from 'https://cache.nixos.org'...
/nix/store/hldbiyiqd85xs8i2vjxccd23aj5by0f7-python-2.7.14

Split `buildCommand`, provide `unpackCmd` and add `installPhase`.

Use autoPatchelfHook, we can get rid of all the manual hacking around
with patchelf.

Use install to install to $out

(cherry picked from commit fe56ad7)
we requireFile, so hydra can't build it anyways.

(cherry picked from commit 9770699)
@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python

Partial log (click to expand)

/nix/store/hldbiyiqd85xs8i2vjxccd23aj5by0f7-python-2.7.14

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python

Partial log (click to expand)

/nix/store/nx3jw576gqw01iiijgsav39w2qa4cni2-python-2.7.14

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python

Partial log (click to expand)

/nix/store/pqby5j0dwxz3bzh0gpqlfrjvvb614r2b-python-2.7.14

@y0no
Copy link

y0no commented May 22, 2018

👍

@Mic92 Mic92 merged commit daebac6 into NixOS:release-18.03 May 22, 2018
@flokli flokli deleted the oracle-fixes-18.03 branch May 22, 2018 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants