Building 'ncurses' overrided with 'emscriptenStdenv' fails and outputs the following logs.
$ nix-shell ~/emscripten.nix
these derivations will be built:
/nix/store/8a8dvm7hc5l3wd69ad0fy654vx2dvdid-ncurses-6.2.drv
building '/nix/store/8a8dvm7hc5l3wd69ad0fy654vx2dvdid-ncurses-6.2.drv'...
unpacking sources
unpacking source archive /nix/store/rd644pi88sjvlrkfyai5wg7jpmbzdaf7-v6.2.tar.gz
source root is ncurses-6.2
setting SOURCE_DATE_EPOCH to timestamp 1581501022 of file ncurses-6.2/test/xterm-color_48x48.xpm
patching sources
applying patch /nix/store/i4ai4idhj7d7qdyhv601568hna0b5car-clang.patch
patching file c++/cursesf.h
Hunk #1 succeeded at 683 with fuzz 2 (offset 2 lines).
Hunk #2 succeeded at 696 with fuzz 1 (offset 2 lines).
patching file c++/cursesm.h
Hunk #1 succeeded at 641 with fuzz 2 (offset 2 lines).
Hunk #2 succeeded at 653 with fuzz 2 (offset 2 lines).
configuring
configure: ./configure --prefix=/nix/store/bdim2m1gy20269x6q54b5pzr3d4wx5hh-ncurses-6.2
checking for egrep... grep -E
Configuring NCURSES 6.2 ABI 6 (Wed Sep 1 15:22:21 UTC 2021)
checking for package version... 6.2
checking for package patch date... 20200212
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
Configuring for linux-gnu
checking for prefix... /nix/store/bdim2m1gy20269x6q54b5pzr3d4wx5hh-ncurses-6.2
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/emcc accepts -g... yes
checking version of /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/emcc... 2.0.27
checking if this is really Intel C compiler... no
checking if this is really Clang C compiler... yes
checking for /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/emcc option to accept ANSI C... none needed
checking $CFLAGS variable... ok
checking $CC variable... ok
checking how to run the C preprocessor... /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/emcc -E
checking whether /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/emcc needs -traditional... no
checking whether /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/emcc understands -c and -o together... yes
checking for ldconfig... /nix/store/6z35qvn00xrjvaznv9kfy8xddbbdz4gl-glibc-2.33-47-bin/bin/ldconfig
checking if you want to ensure bool is consistent with C++... yes
checking whether we are using the GNU C++ compiler... yes
checking whether /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/em++ accepts -g... yes
checking if /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/em++ works... yes
checking version of /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/em++... 2.0.27
configure: WARNING: templates do not work
checking if you want to build C++ binding and demo... yes
checking if you want to build with Ada... yes
checking if you want to install terminal database... yes
checking if you want to install manpages... yes
checking if you want to build programs such as tic... yes
checking if you want to build test-programs... yes
checking if you wish to install curses.h... yes
checking for mawk... no
checking for gawk... gawk
checking for egrep... (cached) grep -E
checking for a BSD compatible install... /nix/store/1570w56jrkvr90w9x158vyb5vahnk18v-coreutils-8.32/bin/install -c
checking for lint... no
checking for cppcheck... no
checking for splint... no
checking whether ln -s works... yes
checking if ln -s -f options work... yes
checking for long file names... yes
checking if you want to use pkg-config... yes
checking for pkg-config... /nix/store/96g3h5kipmvdsfw7ipn1sq7myb8rpn5g-pkg-config-wrapper-0.29.2/bin/pkg-config
checking for /nix/store/96g3h5kipmvdsfw7ipn1sq7myb8rpn5g-pkg-config-wrapper-0.29.2/bin/pkg-config library directory... yes
checking if we should install .pc files for /nix/store/96g3h5kipmvdsfw7ipn1sq7myb8rpn5g-pkg-config-wrapper-0.29.2/bin/pkg-config... no
checking if we should assume mixed-case filenames... auto
checking if filesystem supports mixed-case filenames... yes
checking whether make sets ${MAKE}... yes
checking for exctags... no
checking for ctags... no
checking for exetags... no
checking for etags... no
checking for ctags... no
checking for etags... no
checking for makeflags variable...
checking for ranlib... /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/emranlib
checking for ld... /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/emcc
checking for ar... /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/emar
checking for nm... /nix/store/qv2qvak4mgr6cjb6pmdv9fbgxmi501ng-emscripten-llvm-2.0.27/bin/llvm-nm
checking for ar... (cached) /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/emar
checking for options to update archives... -curvU
checking if you have specified an install-prefix...
checking if libtool -version-number should be used... yes
checking if you want to build libraries with libtool... no
checking if you want to build shared libraries... no
checking if you want to build static libraries... yes
checking if you want to build debug libraries... yes
checking if you want to build profiling libraries... no
checking for specified models... normal debug
checking for default model... normal
checking if you want to have a library-prefix... auto
checking for PATH separator... :
checking if you want to build a separate terminfo library... no
checking if you want to build a separate tic library... no
checking for default loader flags...
checking for an rpath option... -Wl,-rpath,
checking if release/abi version should be used for shared libs... auto
checking which /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/emcc option to use... -fPIC
checking if you want to link with the GPM mouse library... maybe
checking for gpm.h... no
checking if you want to use PCRE2 for regular-expressions... no
checking if you want to disable library suffixes... no
checking if you wish to append extra suffix to header/library paths...
checking if you wish to install ncurses overwriting curses... no
checking if external terminfo-database is used... yes
checking which terminfo source-file will be installed... ${top_srcdir}/misc/terminfo.src
checking whether to use hashed database instead of directory/tree... no
checking for list of fallback descriptions...
checking if you want modern xterm or antique... xterm-new
checking if xterm backspace sends BS or DEL... BS
checking for list of terminfo directories... /nix/store/bdim2m1gy20269x6q54b5pzr3d4wx5hh-ncurses-6.2/share/terminfo
checking for default terminfo directory... /nix/store/bdim2m1gy20269x6q54b5pzr3d4wx5hh-ncurses-6.2/share/terminfo
checking if big-core option selected... yes
checking if big-strings option selected... yes
checking if you want termcap-fallback support... no
checking if ~/.terminfo is wanted... yes
checking if you want to use restricted environment when running as root... yes
checking for unistd.h... yes
checking for remove... yes
checking for unlink... yes
checking if link/symlink functions work... symlink
checking if tic should use symbolic links... no
checking if tic should use hard links... no
checking if you want broken-linker support code... no
checking if tputs should process BSD-style prefix padding... no
checking if the POSIX test-macros are already defined... no
checking if this is the GNU C library... no
checking if _XOPEN_SOURCE really is set... yes
checking if SIGWINCH is defined... yes
checking for nl_langinfo and CODESET... yes
checking if you want wide-character code... no
checking whether to enable _LP64 definition in curses.h... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGE_FILES value needed for large files... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for fseeko... yes
checking whether to use struct dirent64... no
checking if you want tparm not to use X/Open fixed-parameter list... yes
checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... no
checking for X11 rgb file... ${exec_prefix}/lib/X11/rgb.txt
checking for type of bool... auto
checking for alternate terminal capabilities file... Caps
checking for type of chtype... uint32_t
checking for type of ospeed... short
checking for type of mmask_t... uint32_t
checking for size CCHARW_MAX... 5
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... (cached) yes
checking for signed char... yes
checking size of signed char... 1
checking if you want to use signed Boolean array in term.h... no
checking for type of tparm args... intptr_t
checking if RCS identifiers should be compiled-in... no
checking format of man-pages... normal
checking for manpage renaming... no
checking if manpage aliases will be installed... yes
checking if manpage symlinks should be used... yes
checking for manpage tbl... no
checking if you want to build with function extensions... yes
checking if you want to build with SCREEN extensions... yes
checking if you want to build with terminal-driver... no
checking for extended use of const keyword... yes
checking if you want to use extended colors... yes
configure: WARNING: This option applies only to wide-character library
checking if you want to use extended mouse encoding... yes
checking if you want to use extended putwin/screendump... yes
checking if you want $NCURSES_NO_PADDING code... yes
checking if you want SIGWINCH handler... yes
checking if you want user-definable terminal capabilities like termcap... yes
checking if you want to link with the pthread library... no
checking if you want reentrant code... no
checking if you want opaque curses-library structures... no
checking if you want opaque form-library structures... no
checking if you want opaque menu-library structures... no
checking if you want opaque panel-library structures... no
checking if you want all development code... no
checking if you want hard-tabs code... no
checking if you want limited support for xmc... no
checking if you do not want to assume colors are white-on-black... yes
checking if you want hashmap scrolling-optimization code... yes
checking if you want colorfgbg code... no
checking if you want interop bindings... yes
checking if you want experimental safe-sprintf code... no
checking if you want wgetch-events code... no
checking if you want to see long compiling messages... yes
checking if you want to install stripped executables... yes
checking if install accepts -p option... yes
checking if install needs to be told about ownership... no
checking if you want to see compiler warnings...
configure: checking for /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/emcc __attribute__ directives...
... scanf
... printf
... unused
... noreturn
checking if you want to work around bogus compiler/loader warnings... no
checking if you want to enable runtime assertions... no
checking if you want to use dmalloc for testing... no
checking if you want to use dbmalloc for testing... no
checking if you want to use valgrind for testing... no
checking if you want to perform memory-leak testing... no
checking whether to add trace feature to all models... no
checking if we want to use GNAT projects... yes
checking for gettimeofday... yes
checking if -lm needed for math functions... no
checking for ANSI C header files... (cached) yes
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking whether time.h and sys/time.h may both be included... yes
checking for regcomp... yes
checking for regular-expression headers... regex.h
checking for fcntl.h... yes
checking for getopt.h... yes
checking for limits.h... yes
checking for locale.h... yes
checking for math.h... yes
checking for poll.h... yes
checking for sys/bsdtypes.h... no
checking for sys/ioctl.h... yes
checking for sys/param.h... yes
checking for sys/poll.h... yes
checking for sys/select.h... yes
checking for sys/time.h... yes
checking for sys/times.h... yes
checking for ttyent.h... no
checking for unistd.h... (cached) yes
checking for wctype.h... yes
checking for unistd.h... (cached) yes
checking for getopt.h... (cached) yes
checking for header declaring getopt variables... unistd.h
checking if external environ is declared... no
checking if external environ exists... yes
checking for getenv... yes
checking for putenv... yes
checking for setenv... yes
checking for strdup... yes
checking if getenv returns consistent values... yes
checking if sys/time.h works with sys/select.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for signal global datatype... volatile sig_atomic_t
checking if unsigned literals are legal... yes
checking if external errno is declared... yes
checking if external errno exists... no
checking if data-only library module links... yes
checking for getcwd... yes
checking for getegid... yes
checking for geteuid... yes
checking for getopt... yes
checking for getttynam... no
checking for issetugid... yes
checking for localeconv... yes
checking for poll... yes
checking for putenv... (cached) yes
checking for remove... (cached) yes
checking for select... yes
checking for setbuf... yes
checking for setbuffer... yes
checking for setenv... (cached) yes
checking for setvbuf... yes
checking for sigaction... yes
checking for sigvec... no
checking for strdup... (cached) yes
checking for strstr... yes
checking for sysconf... yes
checking for tcgetpgrp... yes
checking for times... yes
checking for tsearch... yes
checking for vsnprintf... yes
checking for isascii... yes
checking whether sigaction needs _POSIX_SOURCE... no
checking if nanosleep really works... yes
checking for termio.h... no
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for sys/ioctl.h... (cached) yes
checking for sys/termio.h... no
checking whether termios.h needs _POSIX_SOURCE... no
checking for tcgetattr... yes
checking for vsscanf function or workaround... vsscanf
checking for unistd.h... (cached) yes
checking for working mkstemp... yes
checking whether setvbuf arguments are reversed...
yes
checking for intptr_t... yes
checking for ssize_t... yes
checking for type sigaction_t... no
checking declaration of size-change... yes
checking for memmove... yes
checking for posix_openpt... yes
checking if poll really works... no
checking for va_copy... yes
checking for pid_t... yes
checking for unistd.h... (cached) yes
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... (cached) yes
checking for working vfork... (cached) yes
checking if fopen accepts explicit binary mode... yes
checking for openpty in -lutil... no
checking for openpty header... pty.h
checking if we should include stdbool.h... yes
checking for builtin bool type... no
checking if we already have C++ library... yes
checking whether /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/em++ understands -c and -o together... yes
checking how to run the C++ preprocessor... /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/em++ -E
checking for typeinfo... yes
checking for iostream... yes
checking if iostream uses std-namespace... yes
checking if we should include stdbool.h... (cached) yes
checking for builtin bool type... yes
checking for size of bool... unsigned char
checking for special defines needed for etip.h... none
checking if /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/em++ accepts parameter initialization... no
checking if /nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/em++ accepts static_cast... yes
checking for gnat... no
checking for gnatmake... no
checking for gprconfig... no
checking for gprbuild... no
checking for library subsets... ticlib+termlib+ext_tinfo+base+ext_funcs
checking default library suffix...
checking default library-dependency suffix... .a
checking default object directory... objects
checking c++ library-dependency suffix... .a
checking if linker supports switching between static/dynamic... yes
checking where we will install curses.h... ${prefix}/include/ncurses
checking for src modules... ncurses progs panel menu form
checking for defines to add to ncurses6-config script...
package: ncurses
checking for linker search path... /nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/x86_64-unknown-linux-gnu/lib /nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/lib
configure: creating ./config.status
config.status: creating include/MKterm.h.awk
config.status: creating include/curses.head
config.status: creating include/ncurses_dll.h
config.status: creating include/termcap.h
config.status: creating include/unctrl.h
config.status: creating man/Makefile
config.status: creating include/Makefile
config.status: creating ncurses/Makefile
config.status: creating progs/Makefile
config.status: creating panel/Makefile
config.status: creating menu/Makefile
config.status: creating form/Makefile
config.status: creating test/Makefile
config.status: creating misc/Makefile
config.status: creating c++/Makefile
config.status: creating misc/run_tic.sh
config.status: creating misc/ncurses-config
config.status: creating man/ncurses6-config.1
config.status: creating Makefile
config.status: creating include/ncurses_cfg.h
Appending rules for normal model (ncurses: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for debug model (ncurses: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for normal model (progs: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for debug model (progs: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for normal model (panel: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for debug model (panel: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for normal model (menu: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for debug model (menu: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for normal model (form: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for debug model (form: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for normal model (test: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for debug model (test: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for normal model (c++: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for debug model (c++: ticlib+termlib+ext_tinfo+base+ext_funcs)
creating headers.sh
** Configuration summary for NCURSES 6.2 20200212:
extended funcs: yes
xterm terminfo: xterm-new
bin directory: /nix/store/bdim2m1gy20269x6q54b5pzr3d4wx5hh-ncurses-6.2/bin
lib directory: /nix/store/bdim2m1gy20269x6q54b5pzr3d4wx5hh-ncurses-6.2/lib
include directory: /nix/store/bdim2m1gy20269x6q54b5pzr3d4wx5hh-ncurses-6.2/include/ncurses
man directory: /nix/store/bdim2m1gy20269x6q54b5pzr3d4wx5hh-ncurses-6.2/share/man
terminfo directory: /nix/store/bdim2m1gy20269x6q54b5pzr3d4wx5hh-ncurses-6.2/share/terminfo
** Include-directory is not in a standard location
building
make: make
cd man && make DESTDIR="" RPATH_LIST="/nix/store/bdim2m1gy20269x6q54b5pzr3d4wx5hh-ncurses-6.2/lib" all
make[1]: Entering directory '/build/ncurses-6.2/man'
/nix/store/dpjnjrqbgbm8a5wvi1hya01vd8wyvsq4-bash-4.4-p23/bin/bash ./MKterminfo.sh ./terminfo.head ./../include/Caps ./../include/Caps-ncurses ./terminfo.tail >terminfo.5
make[1]: Leaving directory '/build/ncurses-6.2/man'
cd include && make DESTDIR="" RPATH_LIST="/nix/store/bdim2m1gy20269x6q54b5pzr3d4wx5hh-ncurses-6.2/lib" all
make[1]: Entering directory '/build/ncurses-6.2/include'
cat curses.head >curses.h
AWK=gawk /nix/store/dpjnjrqbgbm8a5wvi1hya01vd8wyvsq4-bash-4.4-p23/bin/bash ./MKkey_defs.sh ./Caps ./Caps-ncurses >>curses.h
/nix/store/dpjnjrqbgbm8a5wvi1hya01vd8wyvsq4-bash-4.4-p23/bin/bash -c 'if test "chtype" = "cchar_t" ; then cat ./curses.wide >>curses.h ; fi'
cat ./curses.tail >>curses.h
/nix/store/dpjnjrqbgbm8a5wvi1hya01vd8wyvsq4-bash-4.4-p23/bin/bash ./MKhashsize.sh ./Caps ./Caps-ncurses >hashsize.h
AWK=gawk /nix/store/dpjnjrqbgbm8a5wvi1hya01vd8wyvsq4-bash-4.4-p23/bin/bash ./MKncurses_def.sh ./ncurses_defs >ncurses_def.h
AWK=gawk /nix/store/dpjnjrqbgbm8a5wvi1hya01vd8wyvsq4-bash-4.4-p23/bin/bash ./MKparametrized.sh ./Caps ./Caps-ncurses >parametrized.h
touch config.h
gawk -f MKterm.h.awk ./Caps ./Caps-ncurses > term.h
/nix/store/dpjnjrqbgbm8a5wvi1hya01vd8wyvsq4-bash-4.4-p23/bin/bash ./edit_cfg.sh ../include/ncurses_cfg.h term.h
** edit: HAVE_TCGETATTR 1
** edit: HAVE_TERMIOS_H 1
** edit: HAVE_TERMIO_H 0
** edit: BROKEN_LINKER 0
make[1]: Leaving directory '/build/ncurses-6.2/include'
cd ncurses && make DESTDIR="" RPATH_LIST="/nix/store/bdim2m1gy20269x6q54b5pzr3d4wx5hh-ncurses-6.2/lib" all
make[1]: Entering directory '/build/ncurses-6.2/ncurses'
gawk -f ./tinfo/MKcodes.awk bigstrings=1 ../include/Caps ../include/Caps-ncurses >codes.c
/nix/store/z59kccbpzv245560qbxkfhsk5k40ivql-emscripten-2.0.27/bin/emcc -o make_hash -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I. -I../include -I./../include -DHAVE_CONFIG_H -I../ncurses -I. -I../include -DNDEBUG -Qunused-arguments ./tinfo/make_hash.c
/nix/store/dpjnjrqbgbm8a5wvi1hya01vd8wyvsq4-bash-4.4-p23/bin/bash -e ./tinfo/MKcaptab.sh gawk 1 ./tinfo/MKcaptab.awk ../include/Caps ../include/Caps-ncurses > comp_captab.c
./tinfo/MKcaptab.sh: line 74: ./make_hash: Permission denied
make[1]: *** [Makefile:264: comp_captab.c] Error 126
make[1]: Leaving directory '/build/ncurses-6.2/ncurses'
make: *** [Makefile:120: all] Error 2
emmake: error: 'make' failed (returned 2)
builder for '/nix/store/8a8dvm7hc5l3wd69ad0fy654vx2dvdid-ncurses-6.2.drv' failed with exit code 1
error: build of '/nix/store/8a8dvm7hc5l3wd69ad0fy654vx2dvdid-ncurses-6.2.drv' failed
Steps To Reproduce
emscripten.nix:
with (import <nixpkgs> { });
let
stdenv = emscriptenStdenv;
in
mkShell {
packages = [
cmake
ninja
];
buildInputs = [
emscripten
(ncurses.override { stdenv = stdenv; })
];
}
$ nix-shell emscripten.nix
Notify maintainers
@qknight @matthewbauer
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
Describe the bug
Building 'ncurses' overrided with 'emscriptenStdenv' fails and outputs the following logs.
Steps To Reproduce
emscripten.nix:
Notify maintainers
@qknight @matthewbauer
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.