You can chat about native SDK questions and issues here.

User avatar
By matthias
#79816 I tried to compile the esp-open-sdk an encountered the same issue that is explained here (and should be fixed for about two years for gcc 6.1):
https://github.com/micropython/micropython/issues/2106

However, I am using this gcc version: gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)

Can anybody help me?

Here is the output I am seeing:


Code: Select all
Now configured for "xtensa-lx106-elf"
make[2]: Verzeichnis „/home/matthias/esp-open-sdk/crosstool-NG“ wird verlassen
sed -r -i.org s%CT_PREFIX_DIR=.*%CT_PREFIX_DIR="/home/matthias/esp-open-sdk/xtensa-lx106-elf"% .config
sed -r -i s%CT_INSTALL_DIR_RO=y%"#"CT_INSTALL_DIR_RO=y% .config
cat ../crosstool-config-overrides >> .config
./ct-ng build
make[2]: Verzeichnis „/home/matthias/esp-open-sdk/crosstool-NG“ wird betreten
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20190102.020509
[INFO ]  Building environment variables
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[INFO ]  Retrieving needed toolchain components' tarballs: done in 118.08s (at 02:00)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[INFO ]  Extracting and patching toolchain components: done in 144.58s (at 04:24)
[INFO ]  =================================================================
[INFO ]  Installing ncurses for build
[INFO ]  Installing ncurses for build: done in 109.20s (at 06:14)
[INFO ]  =================================================================
[INFO ]  Installing GMP for host
[INFO ]  Installing GMP for host: done in 110.20s (at 08:04)
[INFO ]  =================================================================
[INFO ]  Installing MPFR for host
[INFO ]  Installing MPFR for host: done in 99.98s (at 09:44)
[INFO ]  =================================================================
[INFO ]  Installing ISL for host
[INFO ]  Installing ISL for host: done in 107.98s (at 11:32)
[INFO ]  =================================================================
[INFO ]  Installing CLooG for host
[INFO ]  Installing CLooG for host: done in 18.80s (at 11:51)
[INFO ]  =================================================================
[INFO ]  Installing MPC for host
[INFO ]  Installing MPC for host: done in 45.75s (at 12:36)
[INFO ]  =================================================================
[INFO ]  Installing expat for host
[INFO ]  Installing expat for host: done in 14.87s (at 12:51)
[INFO ]  =================================================================
[INFO ]  Installing binutils for host
[INFO ]  Installing binutils for host: done in 253.26s (at 17:05)
[INFO ]  =================================================================
[INFO ]  Installing C library headers & start files
[INFO ]  Installing C library headers & start files: done in 0.27s (at 17:05)
[INFO ]  =================================================================
[INFO ]  Installing pass-2 core C gcc compiler
[INFO ]  Installing pass-2 core C gcc compiler: done in 941.52s (at 32:46)
[INFO ]  =================================================================
[INFO ]  Installing C library
[INFO ]  Installing C library: done in 88.99s (at 34:15)
[INFO ]  =================================================================
[INFO ]  Installing final gcc compiler
[ERROR]    collect2: error: ld returned 1 exit status
[ERROR]    make[4]: *** [cc1plus] Error 1
[ERROR]    make[3]: *** [all-gcc] Error 2
[ERROR]   
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing final gcc compiler'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_gcc_core_backend[scripts/build/cc/100-gcc.sh@545]
[ERROR]  >>        called from: do_gcc_for_host[scripts/build/cc/100-gcc.sh@671]
[ERROR]  >>        called from: do_cc_for_host[scripts/build/cc.sh@56]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@646]
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      'share/doc/crosstool-ng/crosstool-ng-1.22.0-60-g37b07f6f/B - Known issues.txt'
[ERROR]   
[ERROR]  (elapsed: 50:07.33)
[50:07] / ct-ng:152: die Regel für Ziel „build“ scheiterte
make[2]: *** [build] Fehler 2
make[2]: Verzeichnis „/home/matthias/esp-open-sdk/crosstool-NG“ wird verlassen
../Makefile:135: die Regel für Ziel „_toolchain“ scheiterte
make[1]: *** [_toolchain] Fehler 2
make[1]: Verzeichnis „/home/matthias/esp-open-sdk/crosstool-NG“ wird verlassen
Makefile:130: die Regel für Ziel „crosstool-NG/.built“ scheiterte
make: *** [crosstool-NG/.built] Fehler 2


User avatar
By quackmore
#79943 I'm using the same compiler version and I can build the toolchain without any issue

here are the details, give them a check

Code: Select all$ uname -a
Linux _______ 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux
...
$ gcc --version
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
...
$ make STANDALONE=n
Makefile:186: warning: overriding recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
Makefile:181: warning: ignoring old recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
make -C crosstool-NG -f ../Makefile _ct-ng
make[1]: Entering directory '/linux-data/test/esp-open-sdk/crosstool-NG'
../Makefile:186: warning: overriding recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
../Makefile:181: warning: ignoring old recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
./bootstrap
Running autoconf...
Done. You may now run:
    ./configure
./configure --prefix=`pwd`
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking whether sed understands -r -i -e... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for gobjcopy... no
checking for objcopy... objcopy
checking for absolute path to objcopy... /usr/bin/objcopy
checking for gobjdump... no
checking for objdump... objdump
checking for absolute path to objdump... /usr/bin/objdump
checking for greadelf... no
checking for readelf... readelf
checking for absolute path to readelf... /usr/bin/readelf
checking for gperf... gperf
checking for absolute path to gperf... /usr/bin/gperf
checking for bison... bison
checking for flex... flex
checking for makeinfo... makeinfo
checking for cut... cut
checking for stat... stat
checking for readlink... readlink
checking for wget... wget
checking for tar... tar
checking for gzip... gzip
checking for bzip2... bzip2
checking for help2man... help2man
checking for gpatch... no
checking for patch... patch
checking for absolute path to patch... /usr/bin/patch
checking for bash >= 3.1... /bin/bash
checking for GNU awk... /usr/bin/gawk
checking for GNU make >= 3.80... /usr/bin/make
checking whether /usr/bin/make sets $(MAKE)... yes
checking for make 3.81... no
checking for GNU libtool >= 1.5.26... /usr/bin/libtool
checking for GNU libtoolize >= 1.5.26... /usr/bin/libtoolize
checking for GNU automake >= 1.10... /usr/bin/automake
checking for the type used in gperf declarations... unsigned int
checking for xz... xz
checking for cvs... cvs
checking for svn... no
checking for inline... inline
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking whether gettext is declared... yes
checking for library containing bindtextdomain... none required
checking ncurses/ncurses.h usability... no
checking ncurses/ncurses.h presence... no
checking for ncurses/ncurses.h... no
checking ncurses/curses.h usability... no
checking ncurses/curses.h presence... no
checking for ncurses/curses.h... no
checking ncursesw/curses.h usability... no
checking ncursesw/curses.h presence... no
checking for ncursesw/curses.h... no
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for library containing initscr... -lncurses
checking for library containing tgetent... none required
configure: creating ./config.status
config.status: creating Makefile
make MAKELEVEL=0
make: Entering directory '/linux-data/test/esp-open-sdk/crosstool-NG'
  SED    'ct-ng'
  SED    'scripts/crosstool-NG.sh'
  SED    'scripts/saveSample.sh'
  SED    'scripts/showTuple.sh'
  GEN    'config/configure.in'
  GEN    'paths.mk'
  GEN    'paths.sh'
  DEP    'nconf.gui.dep'
  DEP    'nconf.dep'
  DEP    'lxdialog/yesno.dep'
  DEP    'lxdialog/util.dep'
  DEP    'lxdialog/textbox.dep'
  DEP    'lxdialog/menubox.dep'
  DEP    'lxdialog/inputbox.dep'
  DEP    'lxdialog/checklist.dep'
  DEP    'mconf.dep'
  DEP    'conf.dep'
  BISON  'zconf.tab.c'
  GPERF  'zconf.hash.c'
  LEX    'zconf.lex.c'
  DEP    'zconf.tab.dep'
  CC     'zconf.tab.o'
  CC     'conf.o'
  LD     'conf'
  CC     'lxdialog/checklist.o'
  CC     'lxdialog/inputbox.o'
  CC     'lxdialog/menubox.o'
  CC     'lxdialog/textbox.o'
  CC     'lxdialog/util.o'
  CC     'lxdialog/yesno.o'
  CC     'mconf.o'
  LD     'mconf'
  CC     'nconf.o'
  CC     'nconf.gui.o'
  LD     'nconf'
  SED    'docs/ct-ng.1'
  GZIP   'docs/ct-ng.1.gz'
make: Leaving directory '/linux-data/test/esp-open-sdk/crosstool-NG'
make install MAKELEVEL=0
make: Entering directory '/linux-data/test/esp-open-sdk/crosstool-NG'
  GEN    'config/configure.in'
  GEN    'paths.mk'
  GEN    'paths.sh'
  INST    'ct-ng'
  INSTDIR 'config/'
  INSTDIR 'contrib/'
  INSTDIR 'patches/'
  INSTDIR 'scripts/'
  INST    'steps.mk'
  INST    'paths'
  INSTDIR 'samples/'
  INST    'kconfig/'
  INST    'docs/*.txt'
  INST    'ct-ng.1.gz'

For auto-completion, do not forget to install 'ct-ng.comp' into
your bash completion directory (usually /etc/bash_completion.d)
make: Leaving directory '/linux-data/test/esp-open-sdk/crosstool-NG'
make[1]: Leaving directory '/linux-data/test/esp-open-sdk/crosstool-NG'
cp -f 1000-mforce-l32.patch crosstool-NG/local-patches/gcc/4.8.5/
make -C crosstool-NG -f ../Makefile _toolchain
make[1]: Entering directory '/linux-data/test/esp-open-sdk/crosstool-NG'
../Makefile:186: warning: overriding recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
../Makefile:181: warning: ignoring old recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
./ct-ng xtensa-lx106-elf
make[2]: Entering directory '/linux-data/test/esp-open-sdk/crosstool-NG'
  IN    config.gen/arch.in
  IN    config.gen/kernel.in
  IN    config.gen/cc.in
  IN    config.gen/binutils.in
  IN    config.gen/libc.in
  CONF  config/config.in
#
# configuration written to .config
#
***********************************************************

Initially reported by: Max Filippov <jcmvbkbc@gmail.com>
URL: http://www.esp8266.com/viewtopic.php?f=9&t=224

***********************************************************

WARNING! This sample may enable experimental features.
         Please be sure to review the configuration prior
         to building and using your toolchain!
Now, you have been warned!

***********************************************************

Now configured for "xtensa-lx106-elf"
make[2]: Leaving directory '/linux-data/test/esp-open-sdk/crosstool-NG'
sed -r -i.org s%CT_PREFIX_DIR=.*%CT_PREFIX_DIR="/linux-data/test/esp-open-sdk/xtensa-lx106-elf"% .config
sed -r -i s%CT_INSTALL_DIR_RO=y%"#"CT_INSTALL_DIR_RO=y% .config
cat ../crosstool-config-overrides >> .config
./ct-ng build
make[2]: Entering directory '/linux-data/test/esp-open-sdk/crosstool-NG'

[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20190108.182041
[INFO ]  Building environment variables
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[INFO ]  Retrieving needed toolchain components' tarballs: done in 278.38s (at 04:40)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[INFO ]  Extracting and patching toolchain components: done in 69.25s (at 05:49)
[INFO ]  =================================================================
[INFO ]  Installing ncurses for build
[INFO ]  Installing ncurses for build: done in 51.73s (at 06:41)
[INFO ]  =================================================================
[INFO ]  Installing GMP for host
[INFO ]  Installing GMP for host: done in 66.11s (at 07:47)
[INFO ]  =================================================================
[INFO ]  Installing MPFR for host
[INFO ]  Installing MPFR for host: done in 51.98s (at 08:39)
[INFO ]  =================================================================
[INFO ]  Installing ISL for host
[INFO ]  Installing ISL for host: done in 53.03s (at 09:32)
[INFO ]  =================================================================
[INFO ]  Installing CLooG for host
[INFO ]  Installing CLooG for host: done in 10.66s (at 09:43)
[INFO ]  =================================================================
[INFO ]  Installing MPC for host
[INFO ]  Installing MPC for host: done in 26.94s (at 10:10)
[INFO ]  =================================================================
[INFO ]  Installing expat for host
[INFO ]  Installing expat for host: done in 12.23s (at 10:22)
[INFO ]  =================================================================
[INFO ]  Installing binutils for host
[INFO ]  Installing binutils for host: done in 118.85s (at 12:21)
[INFO ]  =================================================================
[INFO ]  Installing C library headers & start files
[INFO ]  Installing C library headers & start files: done in 0.20s (at 12:21)
[INFO ]  =================================================================
[INFO ]  Installing pass-2 core C gcc compiler
[INFO ]  Installing pass-2 core C gcc compiler: done in 524.56s (at 21:06)
[INFO ]  =================================================================
[INFO ]  Installing C library
[INFO ]  Installing C library: done in 63.65s (at 22:09)
[INFO ]  =================================================================
[INFO ]  Installing final gcc compiler
[INFO ]  Installing final gcc compiler: done in 641.05s (at 32:50)
[INFO ]  =================================================================
[INFO ]  Installing cross-gdb
[INFO ]  Installing cross-gdb: done in 270.39s (at 37:21)
[INFO ]  =================================================================
[INFO ]  Cleaning-up the toolchain's directory
[INFO ]    Stripping all toolchain executables
[INFO ]  Cleaning-up the toolchain's directory: done in 1.64s (at 37:22)
[INFO ]  Build completed at 20190108.185803
[INFO ]  (elapsed: 37:22.49)
[INFO ]  Finishing installation (may take a few seconds)...