Unable to build HEAD version 17.01.0

Well I got a tad further but still no joy. The last few lines are this:

/bin/mkdir -p '/home/user/devel/git/lede/v17.01.0/staging_dir/host/share/info'
/usr/bin/install -c -m 644 ./doc/libtool.info ./doc/libtool.info-1 ./doc/libtool.info-2 '/home/user/devel/git/lede/v17.01.0/staging_dir/host/share/info'
install-info --info-dir='/home/user/devel/git/lede/v17.01.0/staging_dir/host/share/info' '/home/user/devel/git/lede/v17.01.0/staging_dir/host/share/info/libtool.info'
/bin/mkdir -p '/home/user/devel/git/lede/v17.01.0/staging_dir/host/include/libltdl'
/usr/bin/install -c -m 644 libltdl/libltdl/lt_system.h libltdl/libltdl/lt_error.h libltdl/libltdl/lt_dlloader.h '/home/user/devel/git/lede/v17.01.0/staging_dir/host/include/libltdl'
/bin/mkdir -p '/home/user/devel/git/lede/v17.01.0/staging_dir/host/share/man/man1'
/usr/bin/install -c -m 644 ./doc/libtool.1 ./doc/libtoolize.1 '/home/user/devel/git/lede/v17.01.0/staging_dir/host/share/man/man1'
make[7]: Leaving directory '/home/user/devel/git/lede/v17.01.0/build_dir/host/libtool-2.4'
make[6]: Leaving directory '/home/user/devel/git/lede/v17.01.0/build_dir/host/libtool-2.4'
make[5]: Leaving directory '/home/user/devel/git/lede/v17.01.0/build_dir/host/libtool-2.4'
make[4]: Leaving directory '/home/user/devel/git/lede/v17.01.0/build_dir/host/libtool-2.4'
/home/user/devel/git/lede/v17.01.0/staging_dir/host/bin/sed -i -e 's,(hardcode_into_libs)=yes,\1=no,g' /home/user/devel/git/lede/v17.01.0/staging_dir/host/bin/libtool
cp -fpR /home/user/devel/git/lede/v17.01.0/staging_dir/host/bin/libtool /home/user/devel/git/lede/v17.01.0/staging_dir/host/bin/libtool-ucxx
/home/user/devel/git/lede/v17.01.0/staging_dir/host/bin/sed -i -e 's,-lstdc++,-luClibc++,g' /home/user/devel/git/lede/v17.01.0/staging_dir/host/bin/libtool-ucxx
mkdir -p /home/user/devel/git/lede/v17.01.0/staging_dir/host/stamp
touch /home/user/devel/git/lede/v17.01.0/build_dir/host/libtool-2.4/.built
touch /home/user/devel/git/lede/v17.01.0/staging_dir/host/stamp/.libtool_installed
make[3]: Leaving directory '/home/user/devel/git/lede/v17.01.0/tools/libtool'
make[2]: Leaving directory '/home/user/devel/git/lede/v17.01.0'
tools/Makefile:146: recipe for target '/home/user/devel/git/lede/v17.01.0/staging_dir/target-mipsel_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny' failed
make[1]: *** [/home/user/devel/git/lede/v17.01.0/staging_dir/target-mipsel_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny] Error 2
make[1]: Leaving directory '/home/user/devel/git/lede/v17.01.0'
Build failed - please re-run with -j1 to see the real error message
/home/user/devel/git/lede/v17.01.0/include/toplevel.mk:199: recipe for target 'world' failed
make: *** [world] Error 1

Same error makes me suspicious that the build tool is broken somehow. Even though it was taken from the git-stable version. Any thoughts?

What is your buildhost? Like in your first example, also in this second one the build breaks building host parts. Either tools or some package's host part.

Something neutral like Ubuntu 16.10 x64. (I have seen problems trying to build with 32-bit Ubuntu.)
Make sure you build with non-root account
Make sure that you have installed the prerequisites as they vary a bit by the nature of the buildhost.

and then ask on the forum.

ok well here it is with -j1 as well. Though like before I did actually follow the dev instructions and run the build with

make -j1 V=s 2>&1 | tee build-v1.log | grep -i error

I would upload the entire log but it is 1.5mb so here are the last few lines and something else I noticed which could explain the inconsistency.

tail -n 25 lede-failed-build-j1.log
make[3]: Entering directory '/home/user/devel/git/lede/v17.01.0/tools/libressl'
CFLAGS="-O2 -I/home/user/devel/git/lede/v17.01.0/staging_dir/host/include -I/home/user/devel/git/lede/v17.01.0/staging_dir/host/usr/include -fpic" CPPFLAGS="-I/home/user/devel/git/lede/v17.01.0/staging_dir/host/include -I/home/user/devel/git/lede/v17.01.0/staging_dir/host/usr/include " CXXFLAGS="" LDFLAGS="-L/home/user/devel/git/lede/v17.01.0/staging_dir/host/lib -L/home/user/devel/git/lede/v17.01.0/staging_dir/host/usr/lib " make -C /home/user/devel/git/lede/v17.01.0/build_dir/host/libressl-2.5.1
make[4]: Entering directory '/home/user/devel/git/lede/v17.01.0/build_dir/host/libressl-2.5.1'
Making all in crypto
make[5]: Entering directory '/home/user/devel/git/lede/v17.01.0/build_dir/host/libressl-2.5.1/crypto'
/usr/bin/env bash ../libtool --mode=compile gcc -std=gnu99 -DPACKAGE_NAME="libressl" -DPACKAGE_TARNAME="libressl" -DPACKAGE_VERSION="2.5.1" -DPACKAGE_STRING="libressl\ 2.5.1" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="libressl" -DVERSION="2.5.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DHAVE_SYMLINK=1 -DHAVE_ERR_H=1 -DHAVE_ASPRINTF=1 -DHAVE_INET_NTOP=1 -DHAVE_INET_PTON=1 -DHAVE_MEMMEM=1 -DHAVE_STRNDUP=1 -DHAVE_STRNLEN=1 -DHAVE_STRSEP=1 -DHAVE_TIMEGM=1 -DHAVE_ACCEPT4=1 -DHAVE_PIPE2=1 -DHAVE_POLL=1 -DHAVE_SOCKETPAIR=1 -DHAVE_GETAUXVAL=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAS_GNU_WARNING_LONG=1 -DSIZEOF_TIME_T=8 -I. -I../include -I../include/compat -DLIBRESSL_INTERNAL -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS= -I../crypto/asn1 -I../crypto/bn -I../crypto/evp -I../crypto/modes -I../crypto -DLIBRESSL_INTERNAL -DOPENSSL_NO_HW_PADLOCK -DOPENSSLDIR="/home/user/devel/git/lede/v17.01.0/staging_dir/host/etc/ssl" -DAES_ASM -DBSAES_ASM -DVPAES_ASM -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DMD5_ASM -DGHASH_ASM -DRSA_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DWHIRLPOOL_ASM -DOPENSSL_CPUID_OBJ -I/home/user/devel/git/lede/v17.01.0/staging_dir/host/include -I/home/user/devel/git/lede/v17.01.0/staging_dir/host/usr/include -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -I/home/user/devel/git/lede/v17.01.0/staging_dir/host/include -I/home/user/devel/git/lede/v17.01.0/staging_dir/host/usr/include -fpic -Wall -std=gnu99 -fno-strict-aliasing -fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-all -DHAVE_GNU_STACK -MT aes/libcrypto_la-aes-elf-x86_64.lo -MD -MP -MF aes/.deps/libcrypto_la-aes-elf-x86_64.Tpo -c -o aes/libcrypto_la-aes-elf-x86_64.lo test -f 'aes/aes-elf-x86_64.S' || echo './'aes/aes-elf-x86_64.S
libtool: compile: gcc -std=gnu99 -DPACKAGE_NAME="libressl" -DPACKAGE_TARNAME="libressl" -DPACKAGE_VERSION="2.5.1" "-DPACKAGE_STRING="libressl 2.5.1"" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="libressl" -DVERSION="2.5.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DHAVE_SYMLINK=1 -DHAVE_ERR_H=1 -DHAVE_ASPRINTF=1 -DHAVE_INET_NTOP=1 -DHAVE_INET_PTON=1 -DHAVE_MEMMEM=1 -DHAVE_STRNDUP=1 -DHAVE_STRNLEN=1 -DHAVE_STRSEP=1 -DHAVE_TIMEGM=1 -DHAVE_ACCEPT4=1 -DHAVE_PIPE2=1 -DHAVE_POLL=1 -DHAVE_SOCKETPAIR=1 -DHAVE_GETAUXVAL=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAS_GNU_WARNING_LONG=1 -DSIZEOF_TIME_T=8 -I. -I../include -I../include/compat -DLIBRESSL_INTERNAL -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS= -I../crypto/asn1 -I../crypto/bn -I../crypto/evp -I../crypto/modes -I../crypto -DLIBRESSL_INTERNAL -DOPENSSL_NO_HW_PADLOCK -DOPENSSLDIR="/home/user/devel/git/lede/v17.01.0/staging_dir/host/etc/ssl" -DAES_ASM -DBSAES_ASM -DVPAES_ASM -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DMD5_ASM -DGHASH_ASM -DRSA_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DWHIRLPOOL_ASM -DOPENSSL_CPUID_OBJ -I/home/user/devel/git/lede/v17.01.0/staging_dir/host/include -I/home/user/devel/git/lede/v17.01.0/staging_dir/host/usr/include -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -I/home/user/devel/git/lede/v17.01.0/staging_dir/host/include -I/home/user/devel/git/lede/v17.01.0/staging_dir/host/usr/include -fpic -Wall -std=gnu99 -fno-strict-aliasing -fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-all -DHAVE_GNU_STACK -MT aes/libcrypto_la-aes-elf-x86_64.lo -MD -MP -MF aes/.deps/libcrypto_la-aes-elf-x86_64.Tpo -c aes/aes-elf-x86_64.S -o aes/libcrypto_la-aes-elf-x86_64.o
gcc-4.8: error: 2.5.1": No such file or directory
Makefile:3636: recipe for target 'aes/libcrypto_la-aes-elf-x86_64.lo' failed
make[5]: *** [aes/libcrypto_la-aes-elf-x86_64.lo] Error 1
make[5]: Leaving directory '/home/user/devel/git/lede/v17.01.0/build_dir/host/libressl-2.5.1/crypto'
Makefile:453: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/home/user/devel/git/lede/v17.01.0/build_dir/host/libressl-2.5.1'
Makefile:27: recipe for target '/home/user/devel/git/lede/v17.01.0/build_dir/host/libressl-2.5.1/.built' failed
make[3]: *** [/home/user/devel/git/lede/v17.01.0/build_dir/host/libressl-2.5.1/.built] Error 2
make[3]: Leaving directory '/home/user/devel/git/lede/v17.01.0/tools/libressl'
tools/Makefile:148: recipe for target 'tools/libressl/compile' failed
make[2]: *** [tools/libressl/compile] Error 2
make[2]: Leaving directory '/home/user/devel/git/lede/v17.01.0'
tools/Makefile:146: recipe for target '/home/user/devel/git/lede/v17.01.0/staging_dir/target-mipsel_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny' failed
make[1]: *** [/home/user/devel/git/lede/v17.01.0/staging_dir/target-mipsel_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny] Error 2
make[1]: Leaving directory '/home/user/devel/git/lede/v17.01.0'
/home/user/devel/git/lede/v17.01.0/include/toplevel.mk:199: recipe for target 'world' failed
make: *** [world] Error 2

However looking through the log file carefully I noticed another error which might be significant.

make[3]: Entering directory '/home/user/devel/git/lede/v17.01.0/tools/mklibs'
mkdir -p /home/user/devel/git/lede/v17.01.0/dl
SHELL= flock /home/user/devel/git/lede/v17.01.0/tmp/.mklibs_0.1.35.tar.gz.flock -c ' /home/user/devel/git/lede/v17.01.0/scripts/download.pl "/home/user/devel/git/lede/
v17.01.0/dl" "mklibs_0.1.35.tar.gz" "ccb1023dc1729c5a37ca6c3eca8e4bac3491116763c8820dfce8eea4845c8567" "" "http://ftp.de.debian.org/debian/pool/main/m/mklibs/" '
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404 Not Found
Download failed.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^M100 24121 100 24121 0 0 40588 0 --:--:-- --:--:-- --:--:-- 40539
. /home/user/devel/git/lede/v17.01.0/include/shell.sh; gzip -dc /home/user/devel/git/lede/v17.01.0/dl/mklibs_0.1.35.tar.gz | tar -C /home/user/devel/git/lede/v17.01.0/build_dir/host/mklibs-0.1.35/.. -xf -
[ ! -d ./src/ ] || cp -fpR ./src/* /home/user/devel/git/lede/v17.01.0/build_dir/host/mklibs-0.1.35

I assume that something was not downloaded in and around the mklibs section and rather than bailing and stopping it marches right along. That cannot be good.

For the record I am running Debian 8 on a AMD FX(tm)-8120 Eight-Core Processor with kernel 4.9.0-1-amd64 and gcc version 4.8.4 and 16Gb Memory.

Help is of course appreciated. But if it is a problem of sources not being downloaded then there is probably not a lot you can do about it. But the error messages could be a little more forthcoming.

Thanks

try to build stable "lede-17.01" branch first.

unstable branch changes every day, so mirrors may be not up-to-date

You are reading it wrong. Download from the main site ftp.de.debian.org failed, so it tried one of the predefined LEDE mirrors and downloaded quite correctly the 24121 byte sized tar.gz file. Just check.you dl directory.

But that looks like a argument quoting error. It has failed to interpret "libressl 2.5.1" as one item and tries 2.5.1"

It is quite similar as you had in the other thread about 17.01.0-rc2 (as there you had 2.5.0" )

Pure guess, but somehow the shell passes argument brokenly or libtool understands them brokenly. Your locale? Something strange in any case. Solving that may be difficult.

Easiest might be to try something else than debian 8.

EDIT:
and when your are debugging, you need to avoid parallel compiling like pasman1 said, as the module failing may not be shown last. Like your first log example that shows nothing relevant. Always use -j 1 to see the failing error easily and properly as the end.

try to build stable "lede-17.01" branch first.

unstable branch changes every day, so mirrors may be not up-to-date

I am building 17.01 That is in the title of my post. I was merely making the point that 17.02 or 17.01 I appear to get the same error.

Ahh ok.. well just jumped out at me and make me wonder.

Pure guess, but somehow the shell passes argument brokenly or libtool understands them brokenly. Your locale? Something strange in any case. Solving that may be difficult.

Hmmm there is nothing unusual in the shell. Just a plain bash shell as a normal user.

Easiest might be to try something else than debian 8.

Ok I'll bite, what is the recommended build platform then? Though if you tied to only one platform to build against one has to wonder about the portability of the build system.

Thanks.

I'm on Debian 9, and it works just fine. Any modern 64 bit Linux should do; don't go too bleeding edge though.

Edit: Debian 8 should work fine as well, BTW. Like @hnyman suggests you might have some weird environment variables messing things up...

On ubuntu-mate 16.04, 16.10 works fine too (for mips_32 and mips_24kc).

Edit: Debian 8 should work fine as well, BTW. Like @hnyman suggests you might have some weird environment variables messing things up...

I think you might be right. I built it on another Debian 9 machine and it seems to work. But something else confuses me the resultant image is named lede-ramips-mt7688-LinkIt7688-squashfs-sysupgrade.bin

Why is it named sysupgrade? And is the default image config the same as the one I have already tried from this official download page.

I basically want to be able to compile the same image so I can work on enabling some device drivers and making everything work. Thus far everything seems to work save the sound chip which apparently has been listed as broken in OpenWRT and LEDE. I want to see if I can fix that.

Thanks for your help at least I have a build environment that works now.