jmattsson / esp-toolchains

Releases of toolchains for ESP8266 and ESP32.
13 stars 8 forks source link

some thing wrong on Windows #1

Closed hanfengcan closed 5 years ago

hanfengcan commented 5 years ago

I try to build firmware use docker on windows.

it throw error like

tar -xJf /opt/nodemcu-firmware/cache/toolchain-esp8266-linux-x86_64-20181106.0.tar.xz -C /opt/nodemcu-firmware/tools/toolchains/
tar: esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/lib32: Cannot create symlink to 'lib': Read-only file system
tar: esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/lib: Cannot create symlink to 'sysroot/lib': Read-only file system
tar: esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/sysroot/lib32: Cannot create symlink to 'lib': Read-only file system
tar: esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/sysroot/lib/libg.a: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/sysroot/lib/libc.a': Operation not permitted
tar: esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/sysroot/usr/lib32: Cannot create symlink to 'lib': Read-only file system
tar: esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/sysroot/usr/lib64: Cannot create symlink to 'lib': Read-only file system
tar: esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/sysroot/lib64: Cannot create symlink to 'lib': Read-only file system
tar: esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/bin/ld.bfd: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/bin/ld': Operation not permitted
tar: esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/bin/g++: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/bin/c++': Operation not permitted
tar: esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/lib64: Cannot create symlink to 'lib': Read-only file system
tar: esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-nm: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/bin/nm': Operation not permitted
tar: esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-gcc-4.8.5: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-gcc': Operation not permitted
tar: esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-cc: Cannot create symlink to 'xtensa-lx106-elf-gcc': Read-only file system
tar: esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-objdump: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/bin/objdump': Operation not permitted
tar: esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-ar: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/bin/ar': Operation not permitted
tar: esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-strip: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/bin/strip': Operation not permitted
tar: esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-as: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/bin/as': Operation not permitted
tar: esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-objcopy: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/bin/objcopy': Operation not permitted
tar: esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-ld: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/bin/ld': Operation not permitted
tar: esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-ld.bfd: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/bin/ld': Operation not permitted
tar: esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-ranlib: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/xtensa-lx106-elf/bin/ranlib': Operation not permitted
tar: esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-c++: Cannot hard link to 'esp8266-linux-x86_64-20181106.0/bin/xtensa-lx106-elf-g++': Operation not permitted

I can success build firmwork with previous release.

hanfengcan commented 5 years ago

Maybe link dont work on windows file system.

I think that it should be copy file and rename instead of link

I use the docker on windows and share the file to linux

HHHartmann commented 5 years ago

works for me. Maybe you only have read access to the windows share in the docker image. Maybe try starting the docker with bash instead of build in the command. follow the following transcript

root@5bf86173dd80:/opt/nodemcu-firmware# touch testfile
root@5bf86173dd80:/opt/nodemcu-firmware# ls -l testfile
-rwxr-xr-x 1 root root 0 Dec  8 20:01 testfile
root@5bf86173dd80:/opt/nodemcu-firmware#

If you get any errors they might be a clue

hanfengcan commented 5 years ago

@HHHartmann I try to use the cmder and git-bash. but error.

my docker is docker toolbox

HHHartmann commented 5 years ago

@hanfengcan when you start the docker build there is a command like

docker run --rm -it  -v C:/Development/nodemcu-firmware:/opt/nodemcu-firmware marcelstoer/nodemcu-build build

replace the last build by bash and try then. To exit use the command exit

At some point you configured the shared drive for docker to use. Make sure the user can write to the network share.

hanfengcan commented 5 years ago

@HHHartmann

I login the vm and cp the firmware to vm file system.

and everything is OK