Can not build crosstoll-NG by manual from esp8266-wiki Ubuntu 18.04 x64
Evgsurf opened this issue · 1 comments
Hello.
I try to build theToolchain.
Go step by step:
cd /opt/Espressif
git clone -b lx106 git://github.com/jcmvbkbc/crosstool-NG.git
cd crosstool-NG
./bootstrap && ./configure --prefix=`pwd`
next is make - failed
zconf.hash.c:163:1: error: conflicting types for ‘kconf_id_lookup’
kconf_id_lookup (register const char *str, register size_t len)
^~~~~~~~~~~~~~~
zconf.hash.c:34:25: note: previous declaration of ‘kconf_id_lookup’ was here
static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
^~~~~~~~~~~~~~~
Makefile:95: recipe for target 'zconf.tab.o' failed
Well, I remove directory crosstool-NG and try to use branch lx106-g++
git clone -b lx106-g++ git://github.com/jcmvbkbc/crosstool-NG.git
./bootstrap && ./configure --prefix=`pwd` && make
Done! Go next steps
make install
./ct-ng xtensa-lx106-elf
Done, next step
./ct-ng build
Failed!
Check log file -
Not at this location: "http://www.multiprecision.org/mpc/download/mpc-1.0.2"
Well, change file ./lib/ct-ng.1.20.0/scripts/build/companion_libs/140-mpc.sh URL to https://ftp.gnu.org/gnu/mpc/
Try again .... long long time ... Failed!
[INFO ] Installing final compiler
[ERROR] cfns.gperf:101:1: error: 'const char* libc_name_p(const char*, unsigned int)' redeclared inline with 'gnu_inline' attribute
[ERROR] make[2]: *** [cp/except.o] Error 1
[ERROR] make[1]: *** [all-gcc] Error 2
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing final compiler'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR] >> called from: do_cc_core_backend[scripts/build/cc/gcc.sh@483]
[ERROR] >> called from: do_cc_for_host[scripts/build/cc/gcc.sh@595]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@638]
I have not ideas what to do :(
I use UBUNTU 18.04 x64
I found the solution here jcmvbkbc/crosstool-NG#46
The problem is that this code (cfns.h:125):
#ifdef __GNUC__
__inline
#ifdef __GNUC_STDC_INLINE__
__attribute__ ((__gnu_inline__))
#endif
#endif
probably applies both __inline and gnu_inline attributes.
You can see in the function above in that file that this code should look like this:
#ifdef __GNUC__
__inline
#else // this makes only one attribute applied
#ifdef __GNUC_STDC_INLINE__
__attribute__ ((__gnu_inline__))
#endif
#endif