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

arcanist: not executable on Darwin due to wrappers in shebang #86881

Closed
purcell opened this issue May 5, 2020 · 4 comments · Fixed by #87406
Closed

arcanist: not executable on Darwin due to wrappers in shebang #86881

purcell opened this issue May 5, 2020 · 4 comments · Fixed by #87406
Labels
0.kind: bug 6.topic: darwin Running or building packages on Darwin

Comments

@purcell
Copy link
Member

purcell commented May 5, 2020

Describe the bug

% arc diff origin/master
/nix/store/701ysppiy3rg2rx874dwbq0siypry2dj-arcanist-20200127/libexec/arcanist/bin/../scripts/arcanist.php: line 2: ?php: No such file or directory
/nix/store/701ysppiy3rg2rx874dwbq0siypry2dj-arcanist-20200127/libexec/arcanist/bin/../scripts/arcanist.php: line 4: syntax error near unexpected token `;'
/nix/store/701ysppiy3rg2rx874dwbq0siypry2dj-arcanist-20200127/libexec/arcanist/bin/../scripts/arcanist.php: line 4: `sanity_check_environment();'

To Reproduce
Steps to reproduce the behavior:

  1. Install nixpkgs.arcanist on Darwin
  2. Execute it

Expected behavior

The program runs, via PHP being used to execute the top-level arcanist.php script.

Additional context

Guessing this is related to #23018, which appears stalled, or perhaps there was uncertainty about which MacOS versions this applied to.

The arcanist.php mentioned above begins

#!/nix/store/27bvk409ismmgysi1lv868f51f3nh4wq-php-with-extensions-7.4.4/bin/php
<?php

sanity_check_environment();

and it is invoked via the arc bin wrapper which begins

#! /nix/store/4p3bds5cknzwg72np1rzyn3jq0962z84-bash-4.4-p23/bin/bash -e
export PATH='/nix/store/27bvk409ismmgysi1lv868f51f3nh4wq-php-with-extensions-7.4.4/bin'${PATH:+':'}$PATH
exec -a "$0" "/nix/store/701ysppiy3rg2rx874dwbq0siypry2dj-arcanist-20200127/bin/.arc-wrapped"  "$@"

while /nix/store/701ysppiy3rg2rx874dwbq0siypry2dj-arcanist-20200127/bin/.arc-wrapped is itself a bash wrapper, and /nix/store/27bvk409ismmgysi1lv868f51f3nh4wq-php-with-extensions-7.4.4/bin/php is

#! /nix/store/4p3bds5cknzwg72np1rzyn3jq0962z84-bash-4.4-p23/bin/bash -e
export PHP_INI_SCAN_DIR='/nix/store/27bvk409ismmgysi1lv868f51f3nh4wq-php-with-extensions-7.4.4/lib'
exec -a "$0" "/nix/store/27bvk409ismmgysi1lv868f51f3nh4wq-php-with-extensions-7.4.4/bin/.php-wrapped"  "$@"

The /nix/store/27bvk409ismmgysi1lv868f51f3nh4wq-php-with-extensions-7.4.4/bin/.php-wrapped is the native executable.

Notify maintainers

@thoughtpolice

Metadata

  • system: "x86_64-darwin"
  • host os: Darwin 19.4.0, macOS 10.15.4
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 2.3.4
  • channels(steve): "nixpkgs-20.09pre221814.10100a97c89"
  • nixpkgs: /Users/steve/.nix-defexpr/channels/nixpkgs

Maintainer information:

- arcanist
@veprbl veprbl added the 6.topic: darwin Running or building packages on Darwin label May 5, 2020
@veprbl
Copy link
Member

veprbl commented May 5, 2020

cc @NixOS/php

@aanderse
Copy link
Member

aanderse commented May 8, 2020

@talyz you're the only member of the team I'm aware of having access to a mac... do you have any capacity to look at this?

talyz added a commit to talyz/nixpkgs that referenced this issue May 9, 2020
With recent work done on the PHP packaging, the PHP executable is by
default a wrapper script. Darwin doesn't like scripts in the shebang
of another script, so we have to wrap arcanist, feeding the script as
an argument to PHP instead. See NixOS#86881 and NixOS#23018.
@talyz talyz mentioned this issue May 9, 2020
10 tasks
@talyz
Copy link
Contributor

talyz commented May 10, 2020

@aanderse I looked into it yesterday and may have fixed it in #87406, but I don't use arcanist, so if someone who does can try it out, that would be great :)

@aanderse
Copy link
Member

@talyz sorry I've never used that application either.

@veprbl veprbl linked a pull request May 11, 2020 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants