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

php: get rid of composableDerivation #43900

Merged
merged 1 commit into from Jul 26, 2018
Merged

php: get rid of composableDerivation #43900

merged 1 commit into from Jul 26, 2018

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented Jul 21, 2018

Motivation for this change

I'm not using php so please test. Will merge within a week.

Note that, after #43886, this is the last derivation using composableDerivation. Therefore, when both have been merged we can remove composableDerivation and supporting code in lib/deprecated.nix.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@FRidh
Copy link
Member Author

FRidh commented Jul 21, 2018

cc contributors @etu @srhb @fpletz @bachp

@etu
Copy link
Contributor

etu commented Jul 21, 2018

@FRidh I've tried to build this and something seems to be very wrong compared to master.

It doesn't build the package.

Example:

~/code/nixpkgs $ nix-build -A php72
these paths will be fetched (14.33 MiB download, 14.35 MiB unpacked):
  /nix/store/p0v3nx2k48qaqhqwqkbbpdyji8n7v3rv-php-7.2.7.tar.bz2
copying path '/nix/store/p0v3nx2k48qaqhqwqkbbpdyji8n7v3rv-php-7.2.7.tar.bz2' from 'https://cache.nixos.org'...
/nix/store/p0v3nx2k48qaqhqwqkbbpdyji8n7v3rv-php-7.2.7.tar.bz2

It barely downloaded anything except from the sources. And then I tried to list the results symlink but failed at first because results is a symlink to /nix/store/p0v3nx2k48qaqhqwqkbbpdyji8n7v3rv-php-7.2.7.tar.bz2

@FRidh
Copy link
Member Author

FRidh commented Jul 21, 2018

Ah, I forgot to add stdenv.mkDerivation :)

@FRidh
Copy link
Member Author

FRidh commented Jul 21, 2018

This needs more fixing it seems.

@etu
Copy link
Contributor

etu commented Jul 21, 2018

Yeah, it seems to complain about mysql lib something:

checking for specified location of the MySQL UNIX socket... no
/nix/store/ryz3asl9wg7pm08lkix503kqhb2x1d0f-mariadb-connector-c-2.3.6/bin/mysql_config: unrecognized option '--libmysqld-libs'
checking for mysql_set_server_option in -lmysqlclient... no
configure: error: wrong mysql library version or lib not found. Check config.log for more information.
builder for '/nix/store/085kqlv8rsn3pvcjyw27n94ggdlxp189-php-7.1.19.drv' failed with exit code 1

Which isn't a problem on master

@FRidh
Copy link
Member Author

FRidh commented Jul 21, 2018

Now all versions are building on NixOS.

@GrahamcOfBorg build php56 php70 php71 php72

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: php

Partial log (click to expand)

checking for working memcmp... yes
checking for stdarg.h... (cached) yes
checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... yes
checking for specified location of the MySQL UNIX socket... no
/nix/store/bpbar6w40yhb23whxr3b6jf8rjyb612c-mariadb-connector-c-2.3.6/bin/mysql_config: unrecognized option '--libmysqld-libs'
checking for mysql_set_server_option in -lmysqlclient... no
configure: error: wrong mysql library version or lib not found. Check config.log for more information.
builder for '/nix/store/2ghadwbvnypzkh5wdfw07624s6nz7v64-php-7.2.7.drv' failed with exit code 1
error: build of '/nix/store/2ghadwbvnypzkh5wdfw07624s6nz7v64-php-7.2.7.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: php56, php70, php71, php72

Partial log (click to expand)

checking for references to /build in /nix/store/y75zb19hzapwn42vwga4f9x37mrkv65y-php-7.2.7...
moving /nix/store/y75zb19hzapwn42vwga4f9x37mrkv65y-php-7.2.7/sbin/* to /nix/store/y75zb19hzapwn42vwga4f9x37mrkv65y-php-7.2.7/bin
shrinking RPATHs of ELF executables and libraries in /nix/store/f6pblwjnjp8d3ljzv45b4ib876m03c6a-php-7.2.7-dev
strip is /nix/store/90vmpr41dzsx350k5argycaf693hnl1l-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/f6pblwjnjp8d3ljzv45b4ib876m03c6a-php-7.2.7-dev
checking for references to /build in /nix/store/f6pblwjnjp8d3ljzv45b4ib876m03c6a-php-7.2.7-dev...
/nix/store/mj957dr89n77m8q0myakm24z75w0n4s5-php-5.6.36
/nix/store/n93xfsgbgli26vdkms9pv5y4wm099x00-php-7.0.30
/nix/store/x2ddi6pyl1wnskpka5y9m57m5j10lz86-php-7.1.19
/nix/store/y75zb19hzapwn42vwga4f9x37mrkv65y-php-7.2.7

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: php

Partial log (click to expand)

/nix/store/y75zb19hzapwn42vwga4f9x37mrkv65y-php-7.2.7/bin/php-config: interpreter directive changed from " /bin/sh" to "/nix/store/z9qg7lpkrajdnlgw5pxp9yx984prl1fi-bash-4.4-p23/bin/sh"
/nix/store/y75zb19hzapwn42vwga4f9x37mrkv65y-php-7.2.7/bin/peardev: interpreter directive changed from "/bin/sh" to "/nix/store/z9qg7lpkrajdnlgw5pxp9yx984prl1fi-bash-4.4-p23/bin/sh"
/nix/store/y75zb19hzapwn42vwga4f9x37mrkv65y-php-7.2.7/bin/pecl: interpreter directive changed from "/bin/sh" to "/nix/store/z9qg7lpkrajdnlgw5pxp9yx984prl1fi-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/y75zb19hzapwn42vwga4f9x37mrkv65y-php-7.2.7...
moving /nix/store/y75zb19hzapwn42vwga4f9x37mrkv65y-php-7.2.7/sbin/* to /nix/store/y75zb19hzapwn42vwga4f9x37mrkv65y-php-7.2.7/bin
shrinking RPATHs of ELF executables and libraries in /nix/store/f6pblwjnjp8d3ljzv45b4ib876m03c6a-php-7.2.7-dev
strip is /nix/store/90vmpr41dzsx350k5argycaf693hnl1l-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/f6pblwjnjp8d3ljzv45b4ib876m03c6a-php-7.2.7-dev
checking for references to /build in /nix/store/f6pblwjnjp8d3ljzv45b4ib876m03c6a-php-7.2.7-dev...
/nix/store/y75zb19hzapwn42vwga4f9x37mrkv65y-php-7.2.7

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: php

Partial log (click to expand)

these derivations will be built:
  /nix/store/4khsjsqlpxih3ygjhcznrhd6773qws9d-php-7.2.7.drv
waiting for locks or build slots...
/nix/store/37n40fzbz5nz0p0i66rc1la0hpa0kgsv-php-7.2.7

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: php56, php70, php71, php72

Partial log (click to expand)

checking for references to /build in /nix/store/li76lwnzlgyyqkijj8qas6d8ls764d7m-php-7.1.19...
moving /nix/store/li76lwnzlgyyqkijj8qas6d8ls764d7m-php-7.1.19/sbin/* to /nix/store/li76lwnzlgyyqkijj8qas6d8ls764d7m-php-7.1.19/bin
shrinking RPATHs of ELF executables and libraries in /nix/store/5fznaqs7qxxxbg1b4vrx6d6656fd06gc-php-7.1.19-dev
strip is /nix/store/7iyn7gn33i7xxjgmwf25k20246y6nd9d-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/5fznaqs7qxxxbg1b4vrx6d6656fd06gc-php-7.1.19-dev
checking for references to /build in /nix/store/5fznaqs7qxxxbg1b4vrx6d6656fd06gc-php-7.1.19-dev...
/nix/store/sg8xf7qviqdb1bl3xvskkyxgdqvxaihk-php-5.6.36
/nix/store/k7ii5i8l2gsbdas57s4qfmma7s6h48wj-php-7.0.30
/nix/store/li76lwnzlgyyqkijj8qas6d8ls764d7m-php-7.1.19
/nix/store/37n40fzbz5nz0p0i66rc1la0hpa0kgsv-php-7.2.7

@etu
Copy link
Contributor

etu commented Jul 21, 2018

@FRidh I've just completed an nix-shell -p nox --run "nox-review pr 43900" all things build except hhvm, but I can also note that this is not a new issue.

So I'd say you're good to go with this 👍

EDIT: Also, don't ask me why hhvm doesn't build. I just know that it doesn't from testing PHP PR's before and noticing that it haven't happened due to PHP upgrades.

EDIT2: Wrote an issue about it here: #43911

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: php56, php70, php71, php72

Partial log (click to expand)

/nix/store/567xp46lrpff076nkbganjdsm76qfyd4-php-7.2.7/lib/build/config.guess: interpreter directive changed from " /bin/sh" to "/nix/store/mdzgfbangzw62b6cb48dg0q83sxdy12y-bash-4.4-p23/bin/sh"
/nix/store/567xp46lrpff076nkbganjdsm76qfyd4-php-7.2.7/lib/build/config.sub: interpreter directive changed from " /bin/sh" to "/nix/store/mdzgfbangzw62b6cb48dg0q83sxdy12y-bash-4.4-p23/bin/sh"
/nix/store/567xp46lrpff076nkbganjdsm76qfyd4-php-7.2.7/lib/build/shtool: interpreter directive changed from "/bin/sh" to "/nix/store/mdzgfbangzw62b6cb48dg0q83sxdy12y-bash-4.4-p23/bin/sh"
moving /nix/store/567xp46lrpff076nkbganjdsm76qfyd4-php-7.2.7/sbin/* to /nix/store/567xp46lrpff076nkbganjdsm76qfyd4-php-7.2.7/bin
strip is /nix/store/8axizw5mf6dx7wip65nbkyrmlkhmjhc5-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/7shfyr3z7x7r0ngigvs77q9p97z3i9k1-php-7.2.7-dev
/nix/store/72gykgbwpkb4kgnk1x6yh5xj3hdr2zhi-php-5.6.36
/nix/store/hmag757qsyasqa0pljb2s7rlhidab6sh-php-7.0.30
/nix/store/884vlf4lyssjgdbw4p9wy96zbdwd5hap-php-7.1.19
/nix/store/567xp46lrpff076nkbganjdsm76qfyd4-php-7.2.7

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: php

Partial log (click to expand)

/nix/store/567xp46lrpff076nkbganjdsm76qfyd4-php-7.2.7

@fpletz fpletz self-requested a review July 22, 2018 09:24
@bachp
Copy link
Member

bachp commented Jul 23, 2018

I don't currently use this. So I can't test.

@Izorkin
Copy link
Contributor

Izorkin commented Jul 24, 2018

Thanks. php56 with nixpkgs.overlays worked.

Some bugs may have creeped in during the conversion.
One flag I had trouble with and so removed was:

    "--enable-embedded-mysqli"
@FRidh FRidh merged commit 8e668dc into NixOS:master Jul 26, 2018
@FRidh FRidh deleted the php branch July 26, 2018 10:05
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: php

Partial log (click to expand)

/nix/store/lwg4hd69b3fz2iwxyq45rl7jiw0802p7-php-7.2.7/lib/build/config.guess: interpreter directive changed from " /bin/sh" to "/nix/store/fcyxw5aslw3a82p33x5lhckj0mr6g1s4-bash-4.4-p23/bin/sh"
/nix/store/lwg4hd69b3fz2iwxyq45rl7jiw0802p7-php-7.2.7/lib/build/shtool: interpreter directive changed from "/bin/sh" to "/nix/store/fcyxw5aslw3a82p33x5lhckj0mr6g1s4-bash-4.4-p23/bin/sh"
/nix/store/lwg4hd69b3fz2iwxyq45rl7jiw0802p7-php-7.2.7/lib/build/config.sub: interpreter directive changed from " /bin/sh" to "/nix/store/fcyxw5aslw3a82p33x5lhckj0mr6g1s4-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/lwg4hd69b3fz2iwxyq45rl7jiw0802p7-php-7.2.7...
moving /nix/store/lwg4hd69b3fz2iwxyq45rl7jiw0802p7-php-7.2.7/sbin/* to /nix/store/lwg4hd69b3fz2iwxyq45rl7jiw0802p7-php-7.2.7/bin
shrinking RPATHs of ELF executables and libraries in /nix/store/kzflsxd0agbrcya4y0w2rndx1vvsa20z-php-7.2.7-dev
strip is /nix/store/a3nk8z2i7m7wa3jdckgv710n7j3yx4b5-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/kzflsxd0agbrcya4y0w2rndx1vvsa20z-php-7.2.7-dev
checking for references to /build in /nix/store/kzflsxd0agbrcya4y0w2rndx1vvsa20z-php-7.2.7-dev...
/nix/store/lwg4hd69b3fz2iwxyq45rl7jiw0802p7-php-7.2.7

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: php

Partial log (click to expand)

/nix/store/vp62xclhpfmn297gasv1ca33yk5m7y7v-php-7.2.7/bin/pear: interpreter directive changed from "/bin/sh" to "/nix/store/n86k15k75jfjqx7k4lzprj055pm7ssjn-bash-4.4-p23/bin/sh"
/nix/store/vp62xclhpfmn297gasv1ca33yk5m7y7v-php-7.2.7/bin/php-config: interpreter directive changed from " /bin/sh" to "/nix/store/n86k15k75jfjqx7k4lzprj055pm7ssjn-bash-4.4-p23/bin/sh"
/nix/store/vp62xclhpfmn297gasv1ca33yk5m7y7v-php-7.2.7/bin/phpize: interpreter directive changed from "/bin/sh" to "/nix/store/n86k15k75jfjqx7k4lzprj055pm7ssjn-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/vp62xclhpfmn297gasv1ca33yk5m7y7v-php-7.2.7...
moving /nix/store/vp62xclhpfmn297gasv1ca33yk5m7y7v-php-7.2.7/sbin/* to /nix/store/vp62xclhpfmn297gasv1ca33yk5m7y7v-php-7.2.7/bin
shrinking RPATHs of ELF executables and libraries in /nix/store/ajkcdf70n9ach76di226bkigz8byv8nc-php-7.2.7-dev
strip is /nix/store/a245zacjzf3qw0davhvlfarihcy2yyrc-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/ajkcdf70n9ach76di226bkigz8byv8nc-php-7.2.7-dev
checking for references to /build in /nix/store/ajkcdf70n9ach76di226bkigz8byv8nc-php-7.2.7-dev...
/nix/store/vp62xclhpfmn297gasv1ca33yk5m7y7v-php-7.2.7

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: php

Partial log (click to expand)

/nix/store/llrvlw0r7nznq8s61ib4pw8rb7jizmn8-php-7.2.7/bin/pecl: interpreter directive changed from "/bin/sh" to "/nix/store/ryb1pmpqm7xiznq5574lifykqrr30hg6-bash-4.4-p23/bin/sh"
/nix/store/llrvlw0r7nznq8s61ib4pw8rb7jizmn8-php-7.2.7/bin/php-config: interpreter directive changed from " /bin/sh" to "/nix/store/ryb1pmpqm7xiznq5574lifykqrr30hg6-bash-4.4-p23/bin/sh"
/nix/store/llrvlw0r7nznq8s61ib4pw8rb7jizmn8-php-7.2.7/bin/phpize: interpreter directive changed from "/bin/sh" to "/nix/store/ryb1pmpqm7xiznq5574lifykqrr30hg6-bash-4.4-p23/bin/sh"
/nix/store/llrvlw0r7nznq8s61ib4pw8rb7jizmn8-php-7.2.7/lib/build/config.guess: interpreter directive changed from " /bin/sh" to "/nix/store/ryb1pmpqm7xiznq5574lifykqrr30hg6-bash-4.4-p23/bin/sh"
/nix/store/llrvlw0r7nznq8s61ib4pw8rb7jizmn8-php-7.2.7/lib/build/config.sub: interpreter directive changed from " /bin/sh" to "/nix/store/ryb1pmpqm7xiznq5574lifykqrr30hg6-bash-4.4-p23/bin/sh"
/nix/store/llrvlw0r7nznq8s61ib4pw8rb7jizmn8-php-7.2.7/lib/build/shtool: interpreter directive changed from "/bin/sh" to "/nix/store/ryb1pmpqm7xiznq5574lifykqrr30hg6-bash-4.4-p23/bin/sh"
moving /nix/store/llrvlw0r7nznq8s61ib4pw8rb7jizmn8-php-7.2.7/sbin/* to /nix/store/llrvlw0r7nznq8s61ib4pw8rb7jizmn8-php-7.2.7/bin
strip is /nix/store/sixx1lfy97125f6hxymbwn64cb8z62p3-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/vsgp6rf36yg6wxgiskpcr2b5r03kzhkm-php-7.2.7-dev
/nix/store/llrvlw0r7nznq8s61ib4pw8rb7jizmn8-php-7.2.7

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