Closed Bad-ptr closed 8 months ago
(looking at the Makefile it's not needed) This can be resolved with script:
add_to_path=''
find /opt/nodemcu-firmware/tools/toolchains/esp8266-linux-x86_64-*/bin \
| while read -r ffile
do
if [ -d "$ffile" ]
then
continue
fi
dir=`dirname "$ffile"`
add_to_path="$dir"
file=`basename "$ffile"`
nfile=`echo "$file"|cut -b 18-`
if [ -n "$nfile" ]
then
cp "$dir/$file" "$dir/$nfile"
fi
done
export PATH="${add_to_path}:${PATH}"
Explanation:
This error "as: unrecognized option '--text-section-literals'" happens because it tries to use 'system' assembler, while it must use assember for esp8266.
To resolve this we go to /opt/nodemcu-firmware/tools/toolchains/esp8266-linux-x86_64-*/bin
, and strip the starting part xtensa-lx106-elf-
of all files in the directory. Then we add this directory to PATH.
But then I get:
nodemcu.c:25:22: fatal error: platform.h: No such file or directory
lnodemcu.c:25:22: fatal error: platform.h: No such file or directory
loadlib.c:63:19: fatal error: dlfcn.h: No such file or directory
May be now it needs the 'system' compilers, not for esp ones.
OK, looks like if I run (just build command, rather than /bin/bash and then build from inside)
docker run --rm --name 'nmcu-build' -it -v ~/Projects/nodemcu-firmware/nodemcu-firmware:/opt/nodemcu-firmware marcelstoer/nodemcu-build build
Then build succeeds.
Expected behavior
OK, build completed
Actual behavior