[Solved] Compile error on 15.05 release in gdate.c

after https://forum.openwrt.org/t/solved-how-to-compile-15-05-release-build-dependency-please-install-git-git-core-1-6-5-message solved, the next problem is:

make V=s produce error:

...
gdate.c: In function 'g_date_strftime':
gdate.c:2497:7: error: format not a string literal, format string not checked [-Werror=format-nonliteral]
       tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
       ^~~~~~
cc1: some warnings being treated as errors
Makefile:1386: recipe for target 'libglib_2_0_la-gdate.lo' failed
make[10]: *** [libglib_2_0_la-gdate.lo] Error 1
...

some info about it is in https://bbs.nextthing.co/t/buildroot-failing-with-gdate-c/10775.

What is the best way to handle it?

Try the solution in the link you posted.

To downgrade to gcc-5 in Ubuntu:

sudo apt --fix-broken install
sudo dpkg --configure -a
sudo apt-get update
sudo apt-get upgrade
sudo apt-get remove gcc-7 g++-7
sudo apt-get remove gcc-6 g++-6
sudo apt-get install gcc-5 g++-5
sudo apt autoremove
sudo unlink /usr/bin/gcc
sudo unlink /usr/bin/g++
sudo ln -s /usr/bin/g++-5 /usr/bin/g++
sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc
gcc --version

in make menuconfig select Oolite v8.0 32 MB profile. Solved.

  • The next problem:

    ~/Oolite8/openwrt$ make V=s
    ......................
    make[3]: Entering directory '/home/andrei/Oolite8/openwrt/tools/automake'
    ((cd /home/andrei/Oolite8/openwrt/build_dir/host/automake-1.15; AUTOM4TE=/home/andrei/Oolite8/openwrt/staging_dir/host/bin/autom4te AUTOCONF=/home/andrei/Oolite8/openwrt/staging_dir/host/bin/autoconf AUTOMAKE=/home/andrei/Oolite8/openwrt/staging_dir/host/bin/automake ACLOCAL=/home/andrei/Oolite8/openwrt/staging_dir/host/bin/aclocal AUTOHEADER=/home/andrei/Oolite8/openwrt/staging_dir/host/bin/autoheader LIBTOOLIZE=/home/andrei/Oolite8/openwrt/staging_dir/host/bin/libtoolize LIBTOOL=/home/andrei/Oolite8/openwrt/staging_dir/host/bin/libtool M4=/home/andrei/Oolite8/openwrt/staging_dir/host/bin/m4 AUTOPOINT=true STAGING_DIR="" ./bootstrap.sh)
    Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/${ <-- HERE ([^ \t=:+{}]+)}/ at ./bin/automake.tmp line 3938.
    Makefile:50: recipe for target '/home/andrei/Oolite8/openwrt/build_dir/host/automake-1.15/.configured' failed
    make[3]: *** [/home/andrei/Oolite8/openwrt/build_dir/host/automake-1.15/.configured] Error 255
    make[3]: Leaving directory '/home/andrei/Oolite8/openwrt/tools/automake'
    tools/Makefile:122: recipe for target 'tools/automake/compile' failed
    make[2]: *** [tools/automake/compile] Error 2
    make[2]: Leaving directory '/home/andrei/Oolite8/openwrt'
    tools/Makefile:121: recipe for target '/home/andrei/Oolite8/openwrt/staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy' failed
    make[1]: *** [/home/andrei/Oolite8/openwrt/staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy] Error 2
    make[1]: Leaving directory '/home/andrei/Oolite8/openwrt'
    /home/andrei/Oolite8/openwrt/include/toplevel.mk:181: recipe for target 'world' failed
    make: *** [world] Error 2
    ~/Oolite8/openwrt$

downgrade automake:

~/Oolite8/openwrt$ sudo apt-get install automake1.11
~/Oolite8/openwrt$ sudo unlink /usr/bin/automake
~/Oolite8/openwrt$ sudo ln -s /usr/bin/automake-1.11 /usr/bin/automake
~/Oolite8/openwrt$ automake --version

still the same problem. Bring automake back.
Overwrite ./tools/automake dir with one from snapshot. Solved.

The next problem after Make V=s:

mipsel-openwrt-linux-uclibc-gcc -c libc/sysdeps/linux/common/sendfile.c -o libc/sysdeps/linux/common/sendfile.os -include ./include/libc-symbols.h -Wall -Wstrict-prototypes -Wstrict-aliasing -funsigned-char -fno-builtin -fno-asm --std=gnu99 -ffunction-sections -fdata-sections -Wno-unused-but-set-variable -Os -pipe -mmt -mips32r2 -mtune=1004kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ggdb -fno-stack-protector -nostdinc -I./include -I./include -I. -I./libc/sysdeps/linux -I./libc/sysdeps/linux/mips  -Os -funit-at-a-time -fmerge-all-constants -fstrict-aliasing -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce -mno-split-addresses -I./libpthread/nptl -I./libpthread/nptl -I./libpthread/nptl/sysdeps/unix/sysv/linux/mips/ -I./libpthread/nptl/sysdeps/unix/sysv/linux/mips -I./libpthread/nptl/sysdeps/mips -I./libpthread/nptl/sysdeps/mips -I./libpthread/nptl/sysdeps/unix/sysv/linux -I./libpthread/nptl/sysdeps/unix/sysv/linux -I./libpthread/nptl/sysdeps/pthread -I./libpthread/nptl/sysdeps/pthread/bits -I./libpthread/nptl/sysdeps/generic -I./ldso/ldso/mips -I./ldso/include -I./libc/sysdeps/linux/common -I/home/andrei/Oolite8/openwrt/build_dir/toolchain-mipsel_1004kc+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/linux-dev/include/ -isystem /home/andrei/Oolite8/openwrt/staging_dir/toolchain-mipsel_1004kc+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/initial/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.8.3/include-fixed -isystem /home/andrei/Oolite8/openwrt/staging_dir/toolchain-mipsel_1004kc+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/initial/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.8.3/include -DNDEBUG -D__USE_STDIO_FUTEXES__ -fPIC     -MT libc/sysdeps/linux/common/sendfile.os -MD -MP -MF libc/sysdeps/linux/common/.sendfile.os.dep
In file included from <command-line>:0:0:
libc/sysdeps/linux/common/sendfile.c:20:23: error: conflicting types for 'sendfile64'
 strong_alias(sendfile,sendfile64)
                       ^
././include/libc-symbols.h:191:26: note: in definition of macro '_strong_alias'
   extern __typeof (name) aliasname __attribute__ ((alias (#name)));
                          ^
libc/sysdeps/linux/common/sendfile.c:20:1: note: in expansion of macro 'strong_alias'
 strong_alias(sendfile,sendfile64)
 ^
In file included from libc/sysdeps/linux/common/sendfile.c:12:0:
./include/sys/sendfile.h:46:16: note: previous declaration of 'sendfile64' was here
 extern ssize_t sendfile64 (int __out_fd, int __in_fd, __off64_t *__offset,
                ^
Makerules:359: recipe for target 'libc/sysdeps/linux/common/sendfile.os' failed
make[4]: *** [libc/sysdeps/linux/common/sendfile.os] Error 1
make[4]: Leaving directory '/home/andrei/Oolite8/openwrt/build_dir/toolchain-mipsel_1004kc+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/uClibc-0.9.33.2'
Makefile:41: recipe for target '/home/andrei/Oolite8/openwrt/build_dir/toolchain-mipsel_1004kc+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/uClibc-0.9.33.2/.built' failed
make[3]: *** [/home/andrei/Oolite8/openwrt/build_dir/toolchain-mipsel_1004kc+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/uClibc-0.9.33.2/.built] Error 2
make[3]: Leaving directory '/home/andrei/Oolite8/openwrt/toolchain/uClibc'
toolchain/Makefile:81: recipe for target 'toolchain/uClibc/compile' failed
make[2]: *** [toolchain/uClibc/compile] Error 2
make[2]: Leaving directory '/home/andrei/Oolite8/openwrt'
toolchain/Makefile:80: recipe for target '/home/andrei/Oolite8/openwrt/staging_dir/toolchain-mipsel_1004kc+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/stamp/.toolchain_install' failed
make[1]: *** [/home/andrei/Oolite8/openwrt/staging_dir/toolchain-mipsel_1004kc+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/stamp/.toolchain_install] Error 2
make[1]: Leaving directory '/home/andrei/Oolite8/openwrt'
/home/andrei/Oolite8/openwrt/include/toplevel.mk:181: recipe for target 'world' failed
make: *** [world] Error 2

Which version of Ubuntu are you using?

EDIT: Just to point out, I took the Oolite source package, integrated the profiles and DTS files into the LEDE trunk code and successfully built the final image with default configuration. I used Debian 8.

Ubuntu 17.10

I try to go different ways and I have created different topics. In this topic I try to compile Oolite source based on 15.05 release. The progress you can see. Your way is to create Oolite profile in the trunk (trunk means snapshot?). Is LEDE the same now as openwrt self?

My topic for create Oolite profile is: https://forum.openwrt.org/t/solved-how-to-add-ramips-mt7621-oolite-8-0-2-dev-1-1-15-board-profile. Please check it. I have marked it as solved because I can compile it, but a .bin still do not works, I get no IP address, so I am still on testing.

Alright, I see now. The thought I was after is that you might be using a build environment which is not supported directly. Ubuntu 17.10 is not listed as a "known to work" environment, in so far as OpenWrt is considered, so I thought that perhaps your troubles compiling the source arise from there. Since Oolite source tree is based on 15.05, I thought it only logical that the build environment constraints apply there as well.

Yes, trunk means snapshot. And yes, LEDE is nowadays called OpenWrt. The two projects have been distinct for quite some time so my mind hasn't yet adjusted to regard them as the same =)