-->
Page 1 of 3

build esp8266 corss compiler fail on Mac OS Yosemite

PostPosted: Tue Feb 10, 2015 4:58 am
by niceskylei
hi,all:
I had try serval time to build esp8266 corss compiler on Mac OS Yosemite follow the http://tuanpm.net/post/109019196894/esp8266-development-kit-on-mac-os-yosemite-and,unluckly encounter errors.
first time build error:
Code: Select all[INFO ]  Installing binutils for host
[ERROR]    /Volumes/ESPTools/esp-open-sdk/crosstool-NG/.build/src/binutils-2.24/gas/as.c:224:14: error: use of undeclared identifier 'TARGET_ALIAS'
[ERROR]    /Volumes/ESPTools/esp-open-sdk/crosstool-NG/.build/src/binutils-2.24/gas/as.c:635:5: error: use of undeclared identifier 'TARGET_ALIAS'
[ERROR]    /Volumes/ESPTools/esp-open-sdk/crosstool-NG/.build/src/binutils-2.24/gas/as.c:648:40: error: use of undeclared identifier 'TARGET_ALIAS'
[ERROR]    /Volumes/ESPTools/esp-open-sdk/crosstool-NG/.build/src/binutils-2.24/gas/as.c:649:44: error: use of undeclared identifier 'TARGET_CANONICAL'
[ERROR]    /Volumes/ESPTools/esp-open-sdk/crosstool-NG/.build/src/binutils-2.24/gas/as.c:650:43: error: use of undeclared identifier 'TARGET_CPU'
[ERROR]    make[7]: *** [as.o] Error 1
[ERROR]    make[6]: *** [all-recursive] Error 1
[ERROR]    make[5]: *** [all] Error 2
[ERROR]    make[4]: *** [all-gas] Error 2
[ERROR]    make[3]: *** [all] Error 2
[ERROR]   
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing binutils for host'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@216]
[ERROR]  >>        called from: do_binutils_backend[scripts/build/binutils/binutils.sh@233]
[ERROR]  >>        called from: do_binutils_for_host[scripts/build/binutils/binutils.sh@98]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@638]
[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: 7:45.99)
[07:46] / make[2]: *** [build] Error 1
make[1]: *** [_toolchain] Error 2
make: *** [/esptools/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc] Error 2


rebuild error:
Code: Select allmake -C crosstool-NG -f ../Makefile _toolchain
./ct-ng xtensa-lx106-elf
  CONF  config/config.in
#
# configuration saved
#

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

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"
sed -r -i.org s%CT_PREFIX_DIR=.*%CT_PREFIX_DIR="/esptools/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
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20150210.172739
[INFO ]  Building environment variables
[00:01] / stat: cannot read file system information for '%Lp': No such file or directory
[ERROR] 
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoForceRmdir[scripts/functions@460]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@238]
[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: 0:00.43)
[00:01] / make[2]: *** [build] Error 1
make[1]: *** [_toolchain] Error 2
make: *** [/esptools/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc] Error 2

I had fix secend build error,by modify "scripts/functions" file.
the first build error still can't fix it. follow the instructions I had installed binutils,but why still install binutils when make?how do I config it?

Re: build esp8266 corss compiler fail on Mac OS Yosemite

PostPosted: Tue Feb 10, 2015 7:46 pm
by williamjf77
i had to use grep and gperf installed through macports grep=/.…… and gperf=/.…before make

Re: build esp8266 corss compiler fail on Mac OS Yosemite

PostPosted: Tue Feb 10, 2015 10:13 pm
by niceskylei
williamjf77 wrote:i had to use grep and gperf installed through macports grep=/.…… and gperf=/.…before make


I don't understand,would you tell me the detail instuctions?

Re: build esp8266 corss compiler fail on Mac OS Yosemite

PostPosted: Wed Feb 11, 2015 9:05 am
by williamjf77
I think osx uses the built in versions of grep and gperf so I had to point the build to use the gnu versions installed through ma ports , there is a tutorial somewhere that worked for me , I'll try to find it , but try using $grep=/path/to/grep before you run the build