[<<][nixos][>>][..]
Sun Oct 27 08:03:17 EDT 2019

do i really want this?

yes.
i guess i need to put in the time then.

the problem should be simple: a library is not found.

ok now menuconfig builds

but the other error is still there:

make[1]: Entering directory '/home/tom/exo/br/target/i586/build/host-ncurses-6.0/progs'
make[1]: *** No rule to make target '../include/curses.h', needed by '../obj_s/tic.o'.  Stop.
make[1]: Leaving directory '/home/tom/exo/br/target/i586/build/host-ncurses-6.0/progs'
make: *** [package/pkg-generic.mk:250: /home/tom/exo/br/target/i586/build/host-ncurses-6.0/.stamp_built] Error 2
make: Leaving directory '/home/tom/exo/deps/buildroot'


I think it should be creating that file but somehow it doesn't.


Why is it trying to build host ncurses actually?

Maybe removing ncurses entirely will fix the problem?

No, same problem.

I have no other option than to dig into the ncurses build to find out
what exactly is going wrong here.

Definte the problem: curses.h.in is not turned into curses.h
At least, that is what the code seems to expect.

I would expect that during configuration, this file is generated.

Probably at the end of configure.in

AC_OUTPUT( \
	include/MKterm.h.awk \
	include/curses.head:include/curses.h.in \
...

So waht is that include/curses.head about?

First, what does that ":" syntax mean?

I think that it meands to generated curses.head instead of default curses.h
If I create a link it should work then.

So why is this file named curses.head?

config.status: creating include/curses.head

	@ test "$(include_dir)" = "$(prefix)/include" || \
		echo '** Include-directory is not in a standard location'

so is there a curses.h file anywhere?

no

So wtf.

progs/Makefile.in refers to ../include/curses.h as deps
do that file should be there

it should be generated somewhere!

This mirror has the same config.head line:
https://github.com/mirror/ncurses/blob/master/configure.in

Why is config.head not referenced anywhere else?

The first command that is run is:

PATH=/home/tom/exo/br/target/i586/host/bin:/home/tom/exo/br/target/i586/host/sbin:/home/tom/exo/br/scripts/wrappers/bin:/home/tom/exo/br/buildroot/internal/host_output/host/bin:/home/tom/exo/br/buildroot/output/internal/host/bin:/run/wrappers/bin:/usr/bin:/usr/sbin PKG_CONFIG=/home/tom/exo/br/target/i586/host/bin/pkg-config PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR=/home/tom/exo/br/target/i586/host/lib/pkgconfig:/home/tom/exo/br/target/i586/host/share/pkgconfig /usr/bin/make -j1 -C /home/tom/exo/br/target/i586/build/host-ncurses-6.0 sources

So look at that build target.

No explicit target in top Makefile


So if I do this, then the curses.h gets generated (see below).  But
the command above for some reason is not doing anything.  It has that
"exo +" thing prefixed to it.  That's it.

So why is buildroot inserting that "echo +" ?
If I run that line manually it builds.


tom@panda:/i/phoo/home/tom/exo/br/target/i586/build/host-ncurses-6.0$ grep -re "Include-directory" *
Makefile:		echo '** Include-directory is not in a standard location'
Makefile.in:		echo '** Include-directory is not in a standard location'
tom@panda:/i/phoo/home/tom/exo/br/target/i586/build/host-ncurses-6.0$ ls sources
ls: cannot access 'sources': No such file or directory
tom@panda:/i/phoo/home/tom/exo/br/target/i586/build/host-ncurses-6.0$ make sources
cd include && make - DESTDIR="" RPATH_LIST="/home/tom/exo/br/target/i586/host/lib" sources
make[1]: Entering directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/include'
cat curses.head >curses.h
AWK=gawk /bin/sh ./MKkey_defs.sh ./Caps >>curses.h
/bin/sh -c 'if test "chtype" = "cchar_t" ; then cat ./curses.wide >>curses.h ; fi'
cat ./curses.tail >>curses.h
/bin/sh ./MKhashsize.sh ./Caps >hashsize.h
AWK=gawk /bin/sh ./MKncurses_def.sh ./ncurses_defs >ncurses_def.h
AWK=gawk /bin/sh ./MKparametrized.sh ./Caps >parametrized.h
touch config.h
gawk -f MKterm.h.awk ./Caps > term.h
/bin/sh ./edit_cfg.sh ../include/ncurses_cfg.h term.h
** edit: HAVE_TCGETATTR 1
** edit: HAVE_TERMIOS_H 1
** edit: HAVE_TERMIO_H 1
** edit: BROKEN_LINKER 0
make[1]: Leaving directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/include'
cd ncurses && make - DESTDIR="" RPATH_LIST="/home/tom/exo/br/target/i586/host/lib" sources
make[1]: Entering directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/ncurses'
gawk -f ./tinfo/MKcodes.awk bigstrings=1 ./../include/Caps >codes.c
/usr/bin/gcc -o make_hash -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I. -I../include -I./../include -DHAVE_CONFIG_H -I. -I../include -I/home/tom/exo/br/target/i586/host/include -D_GNU_SOURCE -DNDEBUG  -O2 -I/home/tom/exo/br/target/i586/host/include  --param max-inline-insns-single=1200 ./tinfo/make_hash.c -L/home/tom/exo/br/target/i586/host/lib -Wl,-rpath,/home/tom/exo/br/target/i586/host/lib   
/bin/sh -e ./tinfo/MKcaptab.sh gawk 1 ./tinfo/MKcaptab.awk ./../include/Caps > comp_captab.c
/bin/sh -e ./tty/MKexpanded.sh "/usr/bin/cpp" -DHAVE_CONFIG_H -I. -I../include -I/home/tom/exo/br/target/i586/host/include -D_GNU_SOURCE -DNDEBUG > expanded.c
/bin/sh -e ./tinfo/MKfallback.sh /home/tom/exo/br/target/i586/host/share/terminfo ../misc/terminfo.src /usr/bin/tic  >fallback.c
/bin/sh -e ./base/MKlib_gen.sh "/usr/bin/cpp -DHAVE_CONFIG_H -I. -I../include -I/home/tom/exo/br/target/i586/host/include -D_GNU_SOURCE -DNDEBUG" "gawk" generated <../include/curses.h >lib_gen.c
.. adding -P option to work around /usr/bin/cpp 6.3.0
AWK=gawk /bin/sh ./tinfo/MKkeys_list.sh ../include/Caps | sort >keys.list
gawk -f ./base/MKkeyname.awk bigstrings=1 keys.list > lib_keyname.c
/bin/sh -e ./base/MKlib_gen.sh "/usr/bin/cpp -DHAVE_CONFIG_H -I. -I../include -I/home/tom/exo/br/target/i586/host/include -D_GNU_SOURCE -DNDEBUG" "gawk" implemented <../include/curses.h >link_test.c
.. adding -P option to work around /usr/bin/cpp 6.3.0
gawk -f ./tinfo/MKnames.awk bigstrings=1 ./../include/Caps >names.c
echo | gawk -f ./base/MKunctrl.awk bigstrings=1 >unctrl.c
/usr/bin/gcc -o make_keys -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I. -I../include -I./../include -DHAVE_CONFIG_H -I. -I../include -I/home/tom/exo/br/target/i586/host/include -D_GNU_SOURCE -DNDEBUG  -O2 -I/home/tom/exo/br/target/i586/host/include  --param max-inline-insns-single=1200 ./tinfo/make_keys.c -L/home/tom/exo/br/target/i586/host/lib -Wl,-rpath,/home/tom/exo/br/target/i586/host/lib   
./make_keys keys.list > init_keytry.h
make[1]: Leaving directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/ncurses'
cd progs && make - DESTDIR="" RPATH_LIST="/home/tom/exo/br/target/i586/host/lib" sources
make[1]: Entering directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/progs'
/bin/sh ./MKtermsort.sh gawk ./../include/Caps >termsort.c
echo "#ifndef __TRANSFORM_H"					>transform.h
echo "#define __TRANSFORM_H 1"					>>transform.h
echo "#include <progs.priv.h>"					>>transform.h
echo "extern bool same_program(const char *, const char *);"	>>transform.h
/bin/sh -c 'if test -n "" ; then echo "#define SUFFIX_IGNORED \"\"">>transform.h; fi'
echo "#define PROG_CAPTOINFO \"`echo captoinfo|   sed 's/$//'|sed 's,x,x,'|sed 's/$//'`\""		>>transform.h
echo "#define PROG_INFOTOCAP \"`echo infotocap|   sed 's/$//'|sed 's,x,x,'|sed 's/$//'`\""		>>transform.h
echo "#define PROG_RESET     \"`echo reset|       sed 's/$//'|sed 's,x,x,'|sed 's/$//'`\""		>>transform.h
echo "#define PROG_INIT      \"`echo init|        sed 's/$//'|sed 's,x,x,'|sed 's/$//'`\""		>>transform.h
echo "#endif /* __TRANSFORM_H */"				>>transform.h
make[1]: Leaving directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/progs'
cd panel && make - DESTDIR="" RPATH_LIST="/home/tom/exo/br/target/i586/host/lib" sources
make[1]: Entering directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/panel'
rm -f ../include/panel.h
cp ./panel.h ../include/panel.h
make[1]: Leaving directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/panel'
cd menu && make - DESTDIR="" RPATH_LIST="/home/tom/exo/br/target/i586/host/lib" sources
make[1]: Entering directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/menu'
rm -f ../include/menu.h
cp ./menu.h ../include/menu.h
rm -f ../include/eti.h
cp ./eti.h ../include/eti.h
rm -f ../include/mf_common.h
cp ./mf_common.h ../include/mf_common.h
make[1]: Leaving directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/menu'
cd form && make - DESTDIR="" RPATH_LIST="/home/tom/exo/br/target/i586/host/lib" sources
make[1]: Entering directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/form'
rm -f ../include/form.h
cp ./form.h ../include/form.h
make[1]: Leaving directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/form'
cd test && make - DESTDIR="" RPATH_LIST="/home/tom/exo/br/target/i586/host/lib" sources
make[1]: Entering directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/test'
make[1]: Nothing to be done for 'sources'.
make[1]: Leaving directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/test'
cd misc && make - DESTDIR="" RPATH_LIST="/home/tom/exo/br/target/i586/host/lib" sources
make[1]: Entering directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/misc'
WHICH_XTERM=xterm-new \
XTERM_KBS=BS \
datadir=/home/tom/exo/br/target/i586/host/share \
/bin/sh ./gen_edit.sh >run_tic.sed
echo '** adjusting tabset paths'
** adjusting tabset paths
sed -f run_tic.sed ../misc/terminfo.src >terminfo.tmp
make[1]: Leaving directory '/net/10.1.3.2/phoo/rootfs/home/tom/exo/br/target/i586/build/host-ncurses-6.0/misc'



this is in: buildroot/package/ncurses/ncurses.mk

define HOST_NCURSES_BUILD_CMDS
	$(HOST_MAKE_ENV) $(MAKE1) -C $(@D) sources
	$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/progs tic
endef


What is MAKE1?

Ok so MAKE1 is for non-parallel builds.
Print those commands again to see what is actually going on.

Maybe the "echo +" is coming from elsewhere?


If I add this line it builds:

define HOST_NCURSES_BUILD_CMDS
	echo "MAKE1=$(MAKE1)"
	$(HOST_MAKE_ENV) $(MAKE1) -C $(@D) sources
	$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/progs tic
endef


Something weird is going on here.  I guess that line eats the "echo +" part.
Replaced it with this:

	echo "FIXME: this line is a nix build workaround"


No I did this!!!

tom@phoo:~/exo/deps/buildroot$ git diff
diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk
index e63b6e4aed..c92a78f3c6 100644
--- a/package/ncurses/ncurses.mk
+++ b/package/ncurses/ncurses.mk
@@ -140,6 +140,7 @@ NCURSES_POST_INSTALL_TARGET_HOOKS += NCURSES_TARGET_CLEANUP_TERMINFO
 # ourselves, and use that during installation.
 #
 define HOST_NCURSES_BUILD_CMDS
+	echo "FIXME: this line is a nix build workaround"
 	$(HOST_MAKE_ENV) $(MAKE1) -C $(@D) sources
 	$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/progs tic
 endef
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index a2a12e7b56..05f8b39486 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -247,6 +247,7 @@ $(BUILD_DIR)/%/.stamp_built::
 	@$(call step_start,build)
 	@$(call MESSAGE,"Building")
 	$(foreach hook,$($(PKG)_PRE_BUILD_HOOKS),$(call $(hook))$(sep))
+	echo +$($(PKG)_BUILD_CMDS)
 	+$($(PKG)_BUILD_CMDS)
 	$(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep))
 	@$(call step_end,build)




Wow... talking about shooting yourself in the foot.

Next issue is jack.



[Reply][About]
[<<][nixos][>>][..]