1

as Gentoo user I build everything from sources, but I have problem with building toolchain for esp8266. I came up with this script:

#!/bin/sh

# note: eselect python2 before, because of gcc

# prepare board
mkdir -p ~/Arduino/hardware/esp8266com
cd ~/Arduino/hardware/esp8266com
git clone --recursive --depth 1 https://github.com/esp8266/Arduino.git esp8266

# use system python3
mkdir esp8266/tools/python3
ln -s /usr/bin/python3 esp8266/tools/python3/python3

# build toolchain
cd ~/Arduino
git clone --recursive --depth 1 https://github.com/pfalcon/esp-open-sdk.git
cd esp-open-sdk
sed -i "193s/.*/                     |\$EGREP '^GNU bash, version (3\\.[1-9]|4|5)')/" crosstool-NG/configure.ac # add bash5 support
echo CT_DEBUG_gdb=n >> crosstool-config-overrides # don't build gdb
make STANDALONE=n

# "install" esp-open-sdk
ln -sf ~/Arduino/esp-open-sdk/xtensa-lx106-elf ~/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf

It builded successfully, but I get errors during building project:

(…)
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/python3/python3 /home/urhen/Arduino/hardware/esp8266com/esp8266/tools/makecorever.py --build_path /tmp/arduino_build_179995 --platform_path /home/urhen/Arduino/hardware/esp8266com/esp8266 --version unix-2.7.0-dev
fatal: No names found, cannot describe anything.
(…)
Linking everything together...
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc -CC -E -P -DVTABLES_IN_FLASH /home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/ld/eagle.app.v6.common.ld.h -o /tmp/arduino_build_179995/local.eagle.app.v6.common.ld
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc -fno-exceptions -Wl,-Map -Wl,/tmp/arduino_build_179995/sketch_apr19a.ino.map -g -Wall -Wextra -Os -nostdlib -Wl,--no-check-sections -u app_entry -u _printf_float -u _scanf_float -Wl,-static -L/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/lib -L/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/lib/NONOSDK22x_190703 -L/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/ld -L/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/lib -Teagle.flash.4m2m.ld -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -o /tmp/arduino_build_179995/sketch_apr19a.ino.elf -Wl,--start-group /tmp/arduino_build_179995/sketch/sketch_apr19a.ino.cpp.o /tmp/arduino_build_179995/core/core.a -lhal -lphy -lpp -lnet80211 -llwip2-536-feat -lwpa -lcrypto -lmain -lwps -lbearssl -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc -Wl,--end-group -L/tmp/arduino_build_179995
/tmp/arduino_build_179995/core/core.a(core_esp8266_main.cpp.o):(.text.app_entry+0x0): undefined reference to `app_entry_custom()'
/tmp/arduino_build_179995/core/core.a(core_esp8266_main.cpp.o): In function `app_entry':
/home/urhen/Arduino/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_main.cpp:318: undefined reference to `app_entry_custom()'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.

What am I missing?

Log:

/usr/share/arduino/arduino-builder -dump-prefs -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/urhen/Arduino/hardware -tools /usr/share/arduino/hardware/tools/avr -libraries /home/urhen/Arduino/libraries -fqbn=esp8266com:esp8266:d1_mini:xtal=80,vt=flash,exception=legacy,ssl=all,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=921600 -ide-version=10807 -build-path /tmp/arduino_build_418955 -warnings=all -prefs=build.warn_data_percentage=75 -verbose /tmp/untitled878766377.tmp/sketch_apr19a/sketch_apr19a.ino
/usr/share/arduino/arduino-builder -compile -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/urhen/Arduino/hardware -tools /usr/share/arduino/hardware/tools/avr -libraries /home/urhen/Arduino/libraries -fqbn=esp8266com:esp8266:d1_mini:xtal=80,vt=flash,exception=legacy,ssl=all,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=921600 -ide-version=10807 -build-path /tmp/arduino_build_418955 -warnings=all -prefs=build.warn_data_percentage=75 -verbose /tmp/untitled878766377.tmp/sketch_apr19a/sketch_apr19a.ino
Using board 'd1_mini' from platform in folder: /home/urhen/Arduino/hardware/esp8266com/esp8266
Using core 'esp8266' from platform in folder: /home/urhen/Arduino/hardware/esp8266com/esp8266
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/python3/python3 /home/urhen/Arduino/hardware/esp8266com/esp8266/tools/makecorever.py --build_path /tmp/arduino_build_418955 --platform_path /home/urhen/Arduino/hardware/esp8266com/esp8266 --version unix-2.7.0-dev
Detecting libraries used...
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -I/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/include -I/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/lwip2/include -I/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include -I/tmp/arduino_build_418955/core -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++11 -ffunction-sections -fdata-sections -fno-exceptions -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10807 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 -I/home/urhen/Arduino/hardware/esp8266com/esp8266/cores/esp8266 -I/home/urhen/Arduino/hardware/esp8266com/esp8266/variants/d1_mini /tmp/arduino_build_418955/sketch/sketch_apr19a.ino.cpp -o /dev/null
Generating function prototypes...
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -I/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/include -I/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/lwip2/include -I/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include -I/tmp/arduino_build_418955/core -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++11 -ffunction-sections -fdata-sections -fno-exceptions -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10807 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 -I/home/urhen/Arduino/hardware/esp8266com/esp8266/cores/esp8266 -I/home/urhen/Arduino/hardware/esp8266com/esp8266/variants/d1_mini /tmp/arduino_build_418955/sketch/sketch_apr19a.ino.cpp -o /tmp/arduino_build_418955/preproc/ctags_target_for_gcc_minus_e.cpp
/usr/bin/arduino-ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino_build_418955/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/python3/python3 /home/urhen/Arduino/hardware/esp8266com/esp8266/tools/signing.py --mode header --publickey /tmp/untitled878766377.tmp/sketch_apr19a/public.key --out /tmp/arduino_build_418955/core/Updater_Signing.h
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -I/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/include -I/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/lwip2/include -I/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include -I/tmp/arduino_build_418955/core -c -Wall -Wextra -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++11 -MMD -ffunction-sections -fdata-sections -fno-exceptions -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10807 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 -I/home/urhen/Arduino/hardware/esp8266com/esp8266/cores/esp8266 -I/home/urhen/Arduino/hardware/esp8266com/esp8266/variants/d1_mini /tmp/arduino_build_418955/sketch/sketch_apr19a.ino.cpp -o /tmp/arduino_build_418955/sketch/sketch_apr19a.ino.cpp.o
Compiling libraries...
Compiling core...
Using previously compiled file: /tmp/arduino_build_418955/core/cont.S.o
Using previously compiled file: /tmp/arduino_build_418955/core/umm_malloc/umm_info.c.o
Using previously compiled file: /tmp/arduino_build_418955/core/umm_malloc/umm_integrity.c.o
Using previously compiled file: /tmp/arduino_build_418955/core/umm_malloc/umm_local.c.o
Using previously compiled file: /tmp/arduino_build_418955/core/umm_malloc/umm_poison.c.o
Using previously compiled file: /tmp/arduino_build_418955/core/Esp-frag.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/core_esp8266_postmortem.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/WMath.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/heap.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/core_esp8266_sigma_delta.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/WString.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/libc_replacements.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/core_esp8266_si2c.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/gdb_hooks.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/core_esp8266_timer.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/spiffs_api.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/Stream.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/abi.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/Esp.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/Esp-version.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -I/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/include -I/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/lwip2/include -I/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include -I/tmp/arduino_build_418955/core -c -Wall -Wextra -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++11 -MMD -ffunction-sections -fdata-sections -fno-exceptions -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10807 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 -I/home/urhen/Arduino/hardware/esp8266com/esp8266/cores/esp8266 -I/home/urhen/Arduino/hardware/esp8266com/esp8266/variants/d1_mini /home/urhen/Arduino/hardware/esp8266com/esp8266/cores/esp8266/Updater.cpp -o /tmp/arduino_build_418955/core/Updater.cpp.o
Using previously compiled file: /tmp/arduino_build_418955/core/core_esp8266_spi_utils.cpp.o
[cut due to characters limit]
Using previously compiled file: /tmp/arduino_build_418955/core/Schedule.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/Esp-frag.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/Esp-version.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/Esp.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/FS.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/FSnoop.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/FunctionalInterrupt.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/HardwareSerial.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/IPAddress.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/MD5Builder.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/Print.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/Schedule.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/StackThunk.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/Stream.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/StreamString.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/Tone.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/Updater.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/WMath.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/WString.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/abi.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/base64.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/cbuf.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/cont.S.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/cont_util.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_app_entry_noextra4k.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_eboot_command.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_features.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_flash_utils.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_i2s.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_main.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_noniso.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_phy.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_postmortem.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_si2c.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_sigma_delta.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_spi_utils.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_timer.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_waveform.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_wiring.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_wiring_analog.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_wiring_digital.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_wiring_pulse.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_wiring_pwm.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/core_esp8266_wiring_shift.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/crc32.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/debug.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/flash_hal.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/gdb_hooks.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/heap.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/libb64/cdecode.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/libb64/cencode.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/libc_replacements.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/sntp-lwip2.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/spiffs/spiffs_cache.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/spiffs/spiffs_check.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/spiffs/spiffs_gc.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/spiffs/spiffs_hydrogen.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/spiffs/spiffs_nucleus.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/spiffs_api.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/sqrt32.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/time.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/uart.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/umm_malloc/umm_info.c.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/umm_malloc/umm_integrity.c.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/umm_malloc/umm_local.c.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/umm_malloc/umm_malloc.cpp.o
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru /tmp/arduino_build_418955/core/core.a /tmp/arduino_build_418955/core/umm_malloc/umm_poison.c.o
Linking everything together...
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc -CC -E -P -DVTABLES_IN_FLASH /home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/ld/eagle.app.v6.common.ld.h -o /tmp/arduino_build_418955/local.eagle.app.v6.common.ld
/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc -fno-exceptions -Wl,-Map -Wl,/tmp/arduino_build_418955/sketch_apr19a.ino.map -g -Wall -Wextra -Os -nostdlib -Wl,--no-check-sections -u app_entry -u _printf_float -u _scanf_float -Wl,-static -L/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/lib -L/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/lib/NONOSDK22x_190703 -L/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/ld -L/home/urhen/Arduino/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/lib -Teagle.flash.4m2m.ld -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -o /tmp/arduino_build_418955/sketch_apr19a.ino.elf -Wl,--start-group /tmp/arduino_build_418955/sketch/sketch_apr19a.ino.cpp.o /tmp/arduino_build_418955/core/core.a -lhal -lphy -lpp -lnet80211 -llwip2-536-feat -lwpa -lcrypto -lmain -lwps -lbearssl -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc -Wl,--end-group -L/tmp/arduino_build_418955
/tmp/arduino_build_418955/core/core.a(core_esp8266_main.cpp.o):(.text.app_entry+0x0): undefined reference to `app_entry_custom()'
/tmp/arduino_build_418955/core/core.a(core_esp8266_main.cpp.o): In function `app_entry':
/home/urhen/Arduino/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_main.cpp:318: undefined reference to `app_entry_custom()'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.

1 Answer 1

1

You did a shallow copy of the git repo:
The solution is to ensure that the initial clone of the repo in the build environment was not a shallow clone (i.e. the git clone command was not used with --depth, --shallow-since or --shallow-exclude parameters). so change your

git clone --recursive --depth 1 https://github.com/esp8266/Arduino.git esp8266
....
git clone --recursive --depth 1 https://github.com/pfalcon/esp-open-sdk.git

to

git clone --recursive https://github.com/esp8266/Arduino.git esp8266
.... 
git clone --recursive https://github.com/pfalcon/esp-open-sdk.git

and make sure your *.ino contains at least

 setup(){}

AND

loop(){}
5
  • 1
    This fixed "fatal: No names found, cannot describe anything.", but there are still "undefined reference to `app_entry_custom()'".
    – urhen
    Commented Apr 19, 2020 at 14:51
  • Can you now ADD the current error message to your question (edit it) - because error message have to be worked top down not bottom up -btw whats in the sketch apr*.ino? Are you using docker images? Commented Apr 19, 2020 at 15:47
  • apr*.ino is empty setup() and main(), I don't use docker.
    – urhen
    Commented Apr 19, 2020 at 17:53
  • See my edit in the answer Commented Apr 19, 2020 at 17:58
  • My *.ino is fine, this linker error mean that I lacking some shared object (I'm not sure if I can call it that in this case), but I have no clue which file it need and how to add it.
    – urhen
    Commented Apr 19, 2020 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.