pfalcon / esp-open-sdk

Free and open (as much as possible) integrated SDK for ESP8266/ESP8285 chips
1.97k stars 622 forks source link

Compilation error due to non case-sensitivity on Windows 7 #127

Open luboxing opened 8 years ago

luboxing commented 8 years ago

As I am compiling the tool chain with make STANDALONE=y, I got the following error:

... make[2]: Entering directory '/cygdrive/d/GitRep/esp-open-sdk/crosstool-NG' [INFO ] Performing some trivial sanity checks [ERROR] Your file system in '/cygdrive/d/GitRep/esp-open-sdk/crosstool-NG/.build' is not case-sensitive! [ERROR] [ERROR] >> [ERROR] >> Build failed in step '(top-level)' [ERROR] >> [ERROR] >> Error happened in: CT_Abort[scripts/functions@331] [ERROR] >> called from: CT_TestAndAbort[scripts/functions@351] [ERROR] >> called from: main[scripts/crosstool-NG.sh@93] [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/ct-ng.1.20.0/B - Known issues.txt' [ERROR] [ERROR](elapsed: 24222475:14.81) [00:01] / ct-ng:148: recipe for target 'build' failed make[2]: * [build] Error 1 make[2]: Leaving directory '/cygdrive/d/GitRep/esp-open-sdk/crosstool-NG' ../Makefile:107: recipe for target '_toolchain' failed make[1]: * [_toolchain] Error 2 make[1]: Leaving directory '/cygdrive/d/GitRep/esp-open-sdk/crosstool-NG' Makefile:104: recipe for target '/cygdrive/d/GitRep/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc' failed make: *\ [/cygdrive/d/GitRep/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc] Error 2

I made a change (set to 0) to the registry setting in Windows 7 to enable case-sensitivity:

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session Manager/kernel/obcaseinsensitive/obcaseinsensitive

and make clean.

Then I rerun make STANDALONE=y, the problem still persists.

Any ideas? Bo

MJLHThomassen commented 8 years ago

I ran into the same problem and have a solution for that.

If you read https://cygwin.com/cygwin-ug-net/using-specialnames.html carefully, then it also notes another thing besides the Windows Registry key:

/cygdrive paths are case-insensitive by default. The reason is that the native Windows %PATH% environment variable is not always using the correct case for all paths in it. As a result, if you use case-sensitivity on the /cygdrive prefix, your shell might claim that it can't find Windows commands like attrib or net. To ease the pain, the /cygdrive path is case-insensitive by default and you have to use the "posix=1" setting explicitly in /etc/fstab or /etc/fstab.d/$USER to switch it to case-sensitivity, or you have to make sure that the native Win32 %PATH% environment variable is using the correct case for all paths throughout.

Open the file /etc/fstab and set posix=1 then save the file, then open a new cywin shell and run make again.

Edit the fstab file using vi or nano, or navigating to your cygdrive via Windows explorer and editing the file using notepad. t works for me (atleast, its now building, so i might run into another problem along the lines, but it does fix this problem for crosstool-NG)