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

libredirect is failed to build on MacOS (unstable channel) #141811

Closed
rudyryk opened this issue Oct 15, 2021 · 3 comments · Fixed by #144653
Closed

libredirect is failed to build on MacOS (unstable channel) #141811

rudyryk opened this issue Oct 15, 2021 · 3 comments · Fixed by #144653
Labels
0.kind: bug Something is broken 6.topic: darwin Running or building packages on Darwin

Comments

@rudyryk
Copy link

rudyryk commented Oct 15, 2021

Describe the bug

libredirect is failed to build

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install Nix packager on MacOS
  2. nix-shell -p libredirect

Expected behavior

Build without errors.

Screenshots

% nix-shell -p libredirect
these derivations will be built:
  /nix/store/cjpqz1r3z04lh16f6mfms47p7w93f2in-libredirect-0.drv
building '/nix/store/cjpqz1r3z04lh16f6mfms47p7w93f2in-libredirect-0.drv'...
unpacking sources
patching sources
configuring
no configure script, doing nothing
building
libredirect.c:90:27: warning: second argument to 'va_arg' is of promotable type 'mode_t' (aka 'unsigned short'); this va_arg has undefined behavior because arguments will be promoted to 'int' [-Wvarargs]
        mode = va_arg(ap, mode_t);
                          ^~~~~~
/nix/store/gsf62i0m9a3lbvnlvci9nlranvx7ncrw-clang-wrapper-7.1.0/resource-root/include/stdarg.h:35:50: note: expanded from macro 'va_arg'
#define va_arg(ap, type)    __builtin_va_arg(ap, type)
                                                 ^~~~
libredirect.c:104:27: warning: second argument to 'va_arg' is of promotable type 'mode_t' (aka 'unsigned short'); this va_arg has undefined behavior because arguments will be promoted to 'int' [-Wvarargs]
        mode = va_arg(ap, mode_t);
                          ^~~~~~
/nix/store/gsf62i0m9a3lbvnlvci9nlranvx7ncrw-clang-wrapper-7.1.0/resource-root/include/stdarg.h:35:50: note: expanded from macro 'va_arg'
#define va_arg(ap, type)    __builtin_va_arg(ap, type)
                                                 ^~~~
libredirect.c:118:27: warning: second argument to 'va_arg' is of promotable type 'mode_t' (aka 'unsigned short'); this va_arg has undefined behavior because arguments will be promoted to 'int' [-Wvarargs]
        mode = va_arg(ap, mode_t);
                          ^~~~~~
/nix/store/gsf62i0m9a3lbvnlvci9nlranvx7ncrw-clang-wrapper-7.1.0/resource-root/include/stdarg.h:35:50: note: expanded from macro 'va_arg'
#define va_arg(ap, type)    __builtin_va_arg(ap, type)
                                                 ^~~~
3 warnings generated.
installing
install: creating directory '/nix/store/vnn9n7qz6r6wk5rmkqzlmmv6kzy9yl46-libredirect-0'
install: creating directory '/nix/store/vnn9n7qz6r6wk5rmkqzlmmv6kzy9yl46-libredirect-0/lib'
'libredirect.dylib' -> '/nix/store/vnn9n7qz6r6wk5rmkqzlmmv6kzy9yl46-libredirect-0/lib/libredirect.dylib'
post-installation fixup
patching script interpreter paths in /nix/store/vnn9n7qz6r6wk5rmkqzlmmv6kzy9yl46-libredirect-0
patching script interpreter paths in /nix/store/4z4i62b2yq642kfl48zvxdwami3kzadj-libredirect-0-hook
running install tests
Assertion failed: (testfp != NULL), function main, file test.c, line 51.
Assertion failed: (system(SUBTEST) == 0), function test_subprocess, file test.c, line 41.
/nix/store/nanwchp2iifac622hl6ad22bnpkqk2ip-stdenv-darwin/setup: line 1355: 66325 Abort trap: 6           NIX_REDIRECTS="/foo/bar/test=/nix/store/yf7fdgv8lad2xwxh579lk607sy09kzph-coreutils-8.32/bin/true" ./test
builder for '/nix/store/cjpqz1r3z04lh16f6mfms47p7w93f2in-libredirect-0.drv' failed with exit code 134
error: build of '/nix/store/cjpqz1r3z04lh16f6mfms47p7w93f2in-libredirect-0.drv' failed

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
% nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (0.01 MiB download, 0.03 MiB unpacked):
  /nix/store/b1ikfhh5p0fhgmdysi2bmr5bvbcx640s-nix-info
  /nix/store/fkkkf1lbcb186la1zh6f522krcn9vpn8-DarwinTools-1
copying path '/nix/store/fkkkf1lbcb186la1zh6f522krcn9vpn8-DarwinTools-1' from 'https://cache.nixos.org'...
copying path '/nix/store/b1ikfhh5p0fhgmdysi2bmr5bvbcx640s-nix-info' from 'https://cache.nixos.org'...
 - system: `"x86_64-darwin"`
 - host os: `Darwin 19.6.0, macOS 10.15.7`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.3.16`
 - channels(Admin): `"nixpkgs-21.11pre320922.ee084c02040"`
 - nixpkgs: `/Users/Admin/.nix-defexpr/channels/nixpkgs`
@rudyryk rudyryk added the 0.kind: bug Something is broken label Oct 15, 2021
@veprbl veprbl added the 6.topic: darwin Running or building packages on Darwin label Oct 16, 2021
@r-burns
Copy link
Contributor

r-burns commented Oct 17, 2021

Cannot reproduce, it builds for me. Your channels say you are on commit ee084c0 but the hash of the derivation /nix/store/cjpqz1r3z04lh16f6mfms47p7w93f2in-libredirect-0.drv is not correct for that commit. Can you figure out what commit you are building libredirect from?

@rudyryk
Copy link
Author

rudyryk commented Oct 19, 2021

Can you figure out what commit you are building libredirect from?

How could I do that? Please point me to the right direction. I haven't added any custom channels and/or configs.

@r-burns
Copy link
Contributor

r-burns commented Oct 19, 2021

Clone this repo locally, cd inside and run nix-build -A libredirect. You can check out different commits to build libredirect at different points in history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants