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

nano-2.6.3 fails to build on OS X ("undeclared identifier 'TIOCLINUX'") #17835

Closed
TikhonJelvis opened this issue Aug 19, 2016 · 2 comments
Closed
Labels
0.kind: bug 6.topic: darwin Running or building packages on Darwin

Comments

@TikhonJelvis
Copy link
Contributor

Issue description

The nano-2.6.3 package fails to build on OS X. (nano-2.6.2 worked fine.)

Here's the compile error (I can post the full output if needed):

clang -DHAVE_CONFIG_H -I. -I..  -DLOCALEDIR=\"/nix/store/h1afxzyfxh7xc8b0scvq831s1yapczgm-nano-2.6.3/share/locale\" -DSYSCONFDIR=\"/etc\" -I/nix/store/gmb9mxkm5mqfnhlav16rx5x7wf070qqf-ncurses-5.9-dev/include/ncursesw -I/nix/store/gmb9mxkm5mqfnhlav16rx5x7wf070qqf-ncurses-5.9-dev/include   -g -O2 -Wall -c -o winio.o winio.c
winio.c:513:15: error: use of undeclared identifier 'TIOCLINUX'
        if (ioctl(0, TIOCLINUX, &modifiers) >= 0 && (modifiers & 0x04)) {
                     ^
1 error generated.
make[2]: *** [Makefile:427: winio.o] Error 1
make[2]: Leaving directory '/private/var/folders/my/71d693qj5szdm986z1wj06krlrw5ms/T/nix-build-nano-2.6.3.drv-0/nano-2.6.3/src'
make[1]: *** [Makefile:405: all-recursive] Error 1
make[1]: Leaving directory '/private/var/folders/my/71d693qj5szdm986z1wj06krlrw5ms/T/nix-build-nano-2.6.3.drv-0/nano-2.6.3'
make: *** [Makefile:344: all] Error 2
builder for ‘/nix/store/7ab97a0vc332msl3kavhpcss245f0fv9-nano-2.6.3.drv’ failed with exit code 2
error: build of ‘/nix/store/7ab97a0vc332msl3kavhpcss245f0fv9-nano-2.6.3.drv’ failed

Steps to reproduce

From the latest nixpkgs-unstable channel, on OS X:

nix-env -i nano

Technical details

  • System: OS X 10.11.4
  • Nix version: nix-env (Nix) 1.11.2
  • Nixpkgs version: 16.09pre88626.1db8403
@TikhonJelvis
Copy link
Contributor Author

Looks like it's a problem with nano-2.6.3 having some Linux-specific code added unconditionally. MacPorts has a version with that code just commented out: https://trac.macports.org/browser/trunk/dports/editors/nano/files/patch-src-winio.c.diff

@joachifm
Copy link
Contributor

It's a known issue, see also #17742 (comment)

@joachifm joachifm added 0.kind: bug 6.topic: darwin Running or building packages on Darwin labels Aug 19, 2016
@obadz obadz closed this as completed in 3f783e7 Aug 19, 2016
svend pushed a commit to svend/nixpkgs that referenced this issue Aug 31, 2016
Add patch to make Darwin happy & fix NixOS#17835
sorokin pushed a commit to sorokin/nixpkgs that referenced this issue Feb 15, 2017
Add patch to make Darwin happy & fix NixOS#17835
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

No branches or pull requests

2 participants