cd /var/tmp/portage/www-servers/nginx-1.17.3/work/njs-0.3.4/nginx/.. \
&& if [ -f build/Makefile ]; then make clean; fi \
&& CFLAGS="-O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches -I/usr/include -DNGX_HAVE_INET6=0" CC="x86_64-pc-linux-gnu-gcc" ./configure \
&& make
configuring for Linux 5.2.5-gentoo-x86_64 x86_64
checking for C compiler: x86_64-pc-linux-gnu-gcc
+ using GNU C compiler
+ gcc version 9.1.0 (Gentoo 9.1.0-r1 p1.1)
-n checking for GCC unsigned __int128 ...
found
-n checking for GCC __builtin_expect() ...
found
-n checking for GCC __builtin_unreachable() ...
found
-n checking for GCC __builtin_prefetch() ...
found
-n checking for GCC __builtin_clz() ...
found
-n checking for GCC __builtin_clzll() ...
found
-n checking for GCC __attribute__ visibility ...
found
-n checking for GCC __attribute__ malloc ...
found
-n checking for GCC __attribute__ aligned ...
found
-n checking for Address sanitizer ...
not found
-n checking for Memory sanitizer ...
not found
-n checking for NAN to uint conversion ...
0
-n checking for clock_gettime(CLOCK_MONOTONIC) ...
found
-n checking for struct tm.tm_gmtoff ...
found
-n checking for altzone ...
not found
-n checking for posix_memalign() ...
found
-n checking for getrandom() ...
found
-n checking for explicit_bzero() ...
found
-n checking for PCRE library ...
found
+ PCRE version: 8.43
-n checking for GNU readline library ...
found
creating build/Makefile
-n checking for expect ...
found
+ Expect version: expect version 5.45.4
make[2]: Entering directory '/var/tmp/portage/www-servers/nginx-1.17.3/work/njs-0.3.4'
build/Makefile:9: *** missing separator. Stop.
make[2]: Leaving directory '/var/tmp/portage/www-servers/nginx-1.17.3/work/njs-0.3.4'
make[1]: *** [objs/Makefile:960: /var/tmp/portage/www-servers/nginx-1.17.3/work/njs-0.3.4/nginx/../build/libnjs.a] Error 2
make[1]: Leaving directory '/var/tmp/portage/www-servers/nginx-1.17.3/work/nginx-1.17.3'
make: *** [Makefile:8: build] Error 2
and /var/tmp/portage/www-servers/nginx-1.17.3/work/njs-0.3.4/build/Makefile contains
# This file is auto-generated by configure
NJS_CC = x86_64-pc-linux-gnu-gcc
NJS_AR = ar
NJS_CFLAGS = -D_GNU_SOURCE -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-prototypes -Werror -g -O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches -I/usr/include -DNGX_HAVE_INET6=0
default: libnjs njs
-n NJS_LIB_INCS =
-n -Isrc
-n -Ibuild
NJS_LIB_OBJS = \
build/src/njs_diyfp.o \
build/src/njs_dtoa.o \
[...]
So it looks like NJS_LIB_INCS value iis broken.
I've just compiled it on Gentoo with no problems.
$ cat build/Makefile | grep 'NJS_LIB_INCS ='
NJS_LIB_INCS = -Isrc -Ibuild
Could you share the ebuild file you're using?
Heh, I am currently working on that bump :-)
It's the current ebuild with the following changes:
--- /var/db/repos/gentoo/www-servers/nginx/nginx-1.17.2.ebuild 2019-07-24 14:45:17.000000000 +0200
+++ nginx-1.17.3.ebuild 2019-08-13 21:18:11.746948161 +0200
@@ -17,8 +17,8 @@
GENTOO_DEPEND_ON_PERL="no"
# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license)
-DEVEL_KIT_MODULE_PV="0.3.0"
-DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1"
+DEVEL_KIT_MODULE_PV="0.3.1"
+DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}"
DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/archive/v${DEVEL_KIT_MODULE_PV}.tar.gz"
DEVEL_KIT_MODULE_WD="${WORKDIR}/ngx_devel_kit-${DEVEL_KIT_MODULE_PV}"
@@ -156,7 +156,7 @@
GEOIP2_MODULE_WD="${WORKDIR}/ngx_http_geoip2_module-${GEOIP2_MODULE_PV}"
# njs-module (https://github.com/nginx/njs, as-is)
-NJS_MODULE_PV="0.3.3"
+NJS_MODULE_PV="0.3.4"
NJS_MODULE_P="njs-${NJS_MODULE_PV}"
NJS_MODULE_URI="https://github.com/nginx/njs/archive/${NJS_MODULE_PV}.tar.gz"
NJS_MODULE_WD="${WORKDIR}/njs-${NJS_MODULE_PV}"
I am currently trying to reproduce on a second box.
@Whissi
Can you show please the following info:
which echo
file `which echo`
man echo
the issue is that your echo program does not support -n option.
Gotcha!
# ls -al /bin/sh
lrwxrwxrwx 1 root root 4 Jul 25 01:52 /bin/sh -> dash
When switching to bash, build failure is gone.
Hi @Whissi,
You may try the following patch: https://gist.github.com/46dd5e4e4911ce0d34cbb15445416da4
Patch works and allows me to build with /bin/sh -> dash, but shouldn't you change order? You are currently doing
building "echo" program
configuring for Linux 5.2.8-gentoo-x86_64 x86_64
checking for C compiler: x86_64-pc-linux-gnu-gcc
+ using GNU C compiler
+ gcc version 9.1.0 (Gentoo 9.1.0-r1 p1.1)
[...]
So in theory you should build echo not before you found a C compiler.
@Whissi
Good point, this can be improved. Currently there is a bit of "chicken and egg" problem with $CC and $echo variables in auto scripts.
So in theory you should build echo not before you found a C compiler.
In fact, auto/clang script only reports what is provided through $CC. But I nevertheless moved building "echo" program down to avoid confusion.
See this version: https://gist.github.com/d03c69d3ad579b47c0c1806b4f5b5ad8
Looks good (and it's still working), thank you!