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

error: makeCWrapper: Unknown argument --suffix-each #444

Closed
PlumpMath opened this issue May 5, 2022 · 6 comments · Fixed by #445
Closed

error: makeCWrapper: Unknown argument --suffix-each #444

PlumpMath opened this issue May 5, 2022 · 6 comments · Fixed by #445

Comments

@PlumpMath
Copy link

nix log /nix/store/8bkvnsxz4kdkd77j9cp6irxc8j819771-python3-3.9.12-env.drv
created 258 symlinks in user environment
:9:6: error: makeCWrapper: Unknown argument --suffix-each
#error makeCWrapper: Unknown argument --suffix-each
^
:10:6: error: makeCWrapper: Unknown argument PATH
#error makeCWrapper: Unknown argument PATH
^
:11:6: error: makeCWrapper: Unknown argument :
#error makeCWrapper: Unknown argument :
^
:12:6: error: makeCWrapper: Unknown argument
#error makeCWrapper: Unknown argument
^
4 errors generated.

@bjornfor
Copy link
Contributor

bjornfor commented May 5, 2022

Weird, I was just hitting that as well. On phone now, but I think the problem was wide version mismatch between mach-nix and nixpkgs. Possibly bleeding nixpkgs (master branch) with mach-nix master.

@PlumpMath
Copy link
Author

PlumpMath commented May 5, 2022

nixpkgs.url="github:nixos/nixpkgs/master";

pypi-deps-db={
url="github:DavHau/pypi-deps-db";
# inputs.nixpkgs.follows="nixpkgs"; <--- and
inputs.mach-nix.follows="mach-nix";
flake=false;
};

mach-nix={
  url="github:DavHau/mach-nix/master";
  # inputs.nixpkgs.follows="nixpkgs"; <--- It's the same if I take it out...
  inputs.pypi-deps-db.follows="pypi-deps-db";
  inputs.flake-utils.follows="flake-utils"; 
};

It is a little difficult to remove the nixpkgs-master. Is there no solution?

@PlumpMath
Copy link
Author

I changed it to the stable version of nixpkgs and it worked fine. Stable version of nix-darwin, all replaced.

@kwbauson
Copy link

kwbauson commented May 6, 2022

It's still happening for me on nixpkgs-unstable:

nix build mach-nix#gen.python.pip-helloworld --override-input nixpkgs nixpkgs/nixpkgs-unstable --override-input pypi-deps-db github:DavHau/pypi-deps-db

I've narrowed it down to this commit in nixpkgs NixOS/nixpkgs@7f802c7, but I'm not sure why that'd cause this issue

@bjornfor
Copy link
Contributor

bjornfor commented May 6, 2022

I've narrowed it down to this commit in nixpkgs NixOS/nixpkgs@7f802c7, but I'm not sure why that'd cause this issue

Because makeBinaryWrapper isn't 100% compatible with makeWrapper. Either it must be made more compatible, or mach-nix must adapt to use the new/simpler interface.

bjornfor referenced this issue in NixOS/nixpkgs May 6, 2022
A "python" made with the wrapper is likely to be used as a shebang. On macOS,
this requires a binary rather than another shebang'd script.
bjornfor added a commit to bjornfor/mach-nix that referenced this issue May 6, 2022
Since
NixOS/nixpkgs@7f802c7
using --suffix-each is no longer supported and breaks like this:

  $ nix-build ./any-mach-nix-env-with-latest-nixpkgs.nix
  [...]
  <stdin>: In function 'main':
  <stdin>:9:6: error: #error makeCWrapper: Unknown argument --suffix-each
  <stdin>:10:6: error: #error makeCWrapper: Unknown argument PATH
  <stdin>:11:6: error: #error makeCWrapper: Unknown argument :
  <stdin>:12:6: error: #error makeCWrapper: Unknown argument
  builder for '/nix/store/41713mrzrqlq12kgfgcx10wmdvmkfh7k-python3-3.9.12-env.drv' failed with exit code 1

So replace it with multiple --suffix args, which the new
makeBinaryWrapper/makeCWrapper program supports (and is compatible with
the old makeWrapper).

Fixes DavHau#444.
@bjornfor
Copy link
Contributor

bjornfor commented May 6, 2022

I made a PR to fix it: #445

bjornfor added a commit to bjornfor/mach-nix that referenced this issue May 9, 2022
Since
NixOS/nixpkgs@7f802c7
using --suffix-each in makeWrapperArgs is no longer supported and breaks
like this:

  $ nix-build ./any-mach-nix-env-with-latest-nixpkgs.nix
  [...]
  <stdin>: In function 'main':
  <stdin>:9:6: error: #error makeCWrapper: Unknown argument --suffix-each
  <stdin>:10:6: error: #error makeCWrapper: Unknown argument PATH
  <stdin>:11:6: error: #error makeCWrapper: Unknown argument :
  <stdin>:12:6: error: #error makeCWrapper: Unknown argument
  builder for '/nix/store/41713mrzrqlq12kgfgcx10wmdvmkfh7k-python3-3.9.12-env.drv' failed with exit code 1

So replace it with multiple --suffix args, which the new
makeBinaryWrapper/makeCWrapper program supports (and is compatible with
the old makeWrapper).

Fixes DavHau#444.
Leixb pushed a commit to Leixb/mach-nix that referenced this issue May 31, 2022
Since
NixOS/nixpkgs@7f802c7
using --suffix-each in makeWrapperArgs is no longer supported and breaks
like this:

  $ nix-build ./any-mach-nix-env-with-latest-nixpkgs.nix
  [...]
  <stdin>: In function 'main':
  <stdin>:9:6: error: #error makeCWrapper: Unknown argument --suffix-each
  <stdin>:10:6: error: #error makeCWrapper: Unknown argument PATH
  <stdin>:11:6: error: #error makeCWrapper: Unknown argument :
  <stdin>:12:6: error: #error makeCWrapper: Unknown argument
  builder for '/nix/store/41713mrzrqlq12kgfgcx10wmdvmkfh7k-python3-3.9.12-env.drv' failed with exit code 1

So replace it with multiple --suffix args, which the new
makeBinaryWrapper/makeCWrapper program supports (and is compatible with
the old makeWrapper).

Fixes DavHau#444.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants