Closed conkerkh closed 4 years ago
I have the same problem. Any ideas how it can be fixed? or what is causing it?
This is caused by ncurses which on OSX lacks some functions which are used by nconf. Basically you need to disable compilation of nconf (which is not really necessary).
Thanks, solved it by using Xcode 9.2
How did you solve it? Care to share?
Download Xcode v 9.2 from apple developer web site. Maybe higher versions will work too, but I used 9.2
sudo xcode-select --switch /Applications/Xcode-9.2.app/Contents/Developer
hello how did you install xcode 9.2 on 10.14 ??
Same error. Any news on this?
xcode 9.2 did not solve the problem for me
Any news how to solve it?
Installing XCode 9.2 from Apple and applying sudo xcode-select --switch /Applications/<where-ever-you-put-it>/Contents/Developer
as @megagosha suggested worked on my Mac OS X 10.14.1.
I strongly suggest to switch back to the original xcode location afterwards.
This is caused by ncurses which on OSX lacks some functions which are used by nconf. Basically you need to disable compilation of nconf (which is not really necessary).
@conkerkh how to disable nconf compilation?
@conkerkh Yeah i also cannot find how to disable nconf. I problably google wrong, and don't know where to find it in documentation.
Banging my head on this now ... thanks for the tip on ncurses ... nconf ... not sure I would have gotten that -
brew install ncurses
The version directory to ncurses may vary ...
cd esp-open-sdk/crosstool-NG
The patch -
diff --git a/kconfig/Makefile b/kconfig/Makefile
index ee838aa3..4aec3579 100644
--- a/kconfig/Makefile
+++ b/kconfig/Makefile
@@ -48,8 +48,8 @@ mconf: LDFLAGS += $(NCURSES_LDFLAGS)
nconf_SRC = nconf.c nconf.gui.c
nconf_OBJ = $(patsubst %.c,%.o,$(nconf_SRC))
nconf_DEP = $(patsubst %.c,%.dep,$(nconf_SRC))
-$(nconf_OBJ) $(nconf_DEP): CFLAGS += $(INTL_CFLAGS) -I/usr/include/ncurses
-nconf: LDFLAGS += -lmenu -lpanel $(LIBS)
+$(nconf_OBJ) $(nconf_DEP): CFLAGS += $(INTL_CFLAGS) -I/usr/local/Cellar/ncurses/6.1/include
+nconf: LDFLAGS += -lmenu -lpanel $(LIBS) -L/usr/local/Cellar/ncurses/6.1/lib
# These are generated files:
ALL_OBJS = $(sort $(COMMON_OBJ) $(LX_OBJ) $(conf_OBJ) $(mconf_OBJ) $(nconf_OBJ))
Helpful top level Makefile patch for esp-open-sdk, provided that /usr/local/bin/sed@ -> gsed - adjust as needed.
diff --git a/Makefile b/Makefile
index 1177ee7..835f604 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,7 @@ TOP = $(PWD)
SHELL = /bin/bash
PATCH = patch -b -N
UNZIP = unzip -q -o
+SED = /usr/local/bin/sed
VENDOR_SDK_ZIP = $(VENDOR_SDK_ZIP_$(VENDOR_SDK))
VENDOR_SDK_DIR = $(VENDOR_SDK_DIR_$(VENDOR_SDK))
@@ -98,8 +99,8 @@ ifeq ($(STANDALONE),y)
@echo "Installing vendor SDK libs into toolchain sysroot"
@cp -Rf sdk/lib/* $(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr/lib/
@echo "Installing vendor SDK linker scripts into toolchain sysroot"
- @sed -e 's/\r//' sdk/ld/eagle.app.v6.ld | sed -e s@../ld/@@ >$(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr/lib/eagle.app.v6.ld
- @sed -e 's/\r//' sdk/ld/eagle.rom.addr.v6.ld >$(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr/lib/eagle.rom.addr.v6.ld
+ @${SED} -e 's/\r//' sdk/ld/eagle.app.v6.ld | ${SED} -e s@../ld/@@ >$(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr/lib/eagle.app.v6.ld
+ @${SED} -e 's/\r//' sdk/ld/eagle.rom.addr.v6.ld >$(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr/lib/eagle.rom.addr.v6.ld
endif
clean: clean-sdk
@@ -133,8 +134,8 @@ crosstool-NG/.built: crosstool-NG/ct-ng
_toolchain:
./ct-ng xtensa-lx106-elf
- sed -r -i.org s%CT_PREFIX_DIR=.*%CT_PREFIX_DIR="$(TOOLCHAIN)"% .config
- sed -r -i s%CT_INSTALL_DIR_RO=y%"#"CT_INSTALL_DIR_RO=y% .config
+ ${SED} -r -i.org s%CT_PREFIX_DIR=.*%CT_PREFIX_DIR="$(TOOLCHAIN)"% .config
+ ${SED} -r -i s%CT_INSTALL_DIR_RO=y%"#"CT_INSTALL_DIR_RO=y% .config
cat ../crosstool-config-overrides >> .config
./ct-ng build
Then ...
make STANDALONE=y
... still compiling but wanted to post this before I forget.
edit - update ... woot !
Xtensa toolchain is built, to use it:
export PATH=/Volumes/esp8266/esp-open-sdk/xtensa-lx106-elf/bin:$PATH
Espressif ESP8266 SDK is installed, its libraries and headers are merged with the toolchain
I'm still not able to create code that runs on the ESP8266 from this build ... so I blew it away, and started from scratch - and can't get it work on macOS ... it's crosstools-NG that is having a problem ... and this would explain it :
macOS is no longer supported : http://crosstool-ng.github.io/2018/11/26/macos.html
I'm trying on FreeBSD ... and having similar problems. This repo also looks dead too ... did Expressif stop supporting the 8266 with the ESP32 taking off ?
Will fork and make a pull request at sometime later (and thinking about making some binary packages/releases) - but for the frustrated like myself ...
esp-open-sdk patches - MacOS 10.14.x :
diff --git a/Makefile b/Makefile
index 1177ee7..12f7ee3 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,7 @@ TOP = $(PWD)
SHELL = /bin/bash
PATCH = patch -b -N
UNZIP = unzip -q -o
+SED = /usr/local/bin/sed
VENDOR_SDK_ZIP = $(VENDOR_SDK_ZIP_$(VENDOR_SDK))
VENDOR_SDK_DIR = $(VENDOR_SDK_DIR_$(VENDOR_SDK))
@@ -98,8 +99,8 @@ ifeq ($(STANDALONE),y)
@echo "Installing vendor SDK libs into toolchain sysroot"
@cp -Rf sdk/lib/* $(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr/lib/
@echo "Installing vendor SDK linker scripts into toolchain sysroot"
- @sed -e 's/\r//' sdk/ld/eagle.app.v6.ld | sed -e s@../ld/@@ >$(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr/lib/eagle.app.v6.ld
- @sed -e 's/\r//' sdk/ld/eagle.rom.addr.v6.ld >$(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr/lib/eagle.rom.addr.v6.ld
+ @${SED} -e 's/\r//' sdk/ld/eagle.app.v6.ld | sed -e s@../ld/@@ >$(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr/lib/eagle.app.v6.ld
+ @${SED} -e 's/\r//' sdk/ld/eagle.rom.addr.v6.ld >$(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr/lib/eagle.rom.addr.v6.ld
endif
clean: clean-sdk
@@ -133,8 +134,8 @@ crosstool-NG/.built: crosstool-NG/ct-ng
_toolchain:
./ct-ng xtensa-lx106-elf
- sed -r -i.org s%CT_PREFIX_DIR=.*%CT_PREFIX_DIR="$(TOOLCHAIN)"% .config
- sed -r -i s%CT_INSTALL_DIR_RO=y%"#"CT_INSTALL_DIR_RO=y% .config
+ ${SED} -r -i.org s%CT_PREFIX_DIR=.*%CT_PREFIX_DIR="$(TOOLCHAIN)"% .config
+ ${SED} -r -i s%CT_INSTALL_DIR_RO=y%"#"CT_INSTALL_DIR_RO=y% .config
cat ../crosstool-config-overrides >> .config
./ct-ng build
diff --git a/crosstool-NG b/crosstool-NG
--- a/crosstool-NG
+++ b/crosstool-NG
@@ -1 +1 @@
-Subproject commit 37b07f6fbea2e5d23434f7e91614528f839db056
+Subproject commit 37b07f6fbea2e5d23434f7e91614528f839db056-dirty
esp-open-sdk/crosstool-NG patches
diff --git a/kconfig/Makefile b/kconfig/Makefile
index ee838aa3..4aec3579 100644
--- a/kconfig/Makefile
+++ b/kconfig/Makefile
@@ -48,8 +48,8 @@ mconf: LDFLAGS += $(NCURSES_LDFLAGS)
nconf_SRC = nconf.c nconf.gui.c
nconf_OBJ = $(patsubst %.c,%.o,$(nconf_SRC))
nconf_DEP = $(patsubst %.c,%.dep,$(nconf_SRC))
-$(nconf_OBJ) $(nconf_DEP): CFLAGS += $(INTL_CFLAGS) -I/usr/include/ncurses
-nconf: LDFLAGS += -lmenu -lpanel $(LIBS)
+$(nconf_OBJ) $(nconf_DEP): CFLAGS += $(INTL_CFLAGS) -I/usr/local/Cellar/ncurses/6.1/include
+nconf: LDFLAGS += -lmenu -lpanel $(LIBS) -L/usr/local/Cellar/ncurses/6.1/lib
# These are generated files:
ALL_OBJS = $(sort $(COMMON_OBJ) $(LX_OBJ) $(conf_OBJ) $(mconf_OBJ) $(nconf_OBJ))
helper script - cd esp-open-sdk
and sh ~/helper.sh
... (note the patches above ... specific to map to the GNU and not the BSD versions of sed and patch ... the scripts in crosstool-NG uses non-portable flags to this common unix tools )
#!/bin/sh
OS=`uname`
FREEBSD=0
MACOS=0
case ${OS} in
FreeBSD)
FREEBSD=1
;;
Darwin)
MACOS=1
;;
*)
esac
# install dependent packages
if [ ${FREEBSD} = 1 ]; then
sudo pkg install git autoconf automake bash bison bzip2 cloog expat flex gawk gcc gerf git gmp gperf gsed gpatch help2man isl libexpat libtool makeinfo mpc mpfr ncurses patch py27-serial sed texinfo textinfo unrar unzip wget
elif [ ${MACOS} = 1 ]; then
brew install autoconf automake binutils cloog expat gawk gettext gmp gnu-sed gperftools help2man isl libelf libiconv libtool mpc mpfr ncurses ppl unrar wget
fi
# setup PATH
if [ ${FREEBSD} = 1 ]; then
export PATH="$PATH:/usr/local/bin"
elif [ ${MACOS} = 1 ]; then
export PATH="$PATH:/usr/local/Cellar/binutils/2.31.1_2/bin:/usr/local/Cellar/ncurses/6.1/bin:/usr/local/Cellar/gpatch/2.7.6/bin"
fi
# call make
if [ ${FREEBSD} = 1 ]; then
gmake STANDALONE=n
elif [ ${MACOS} = 1 ]; then
make STANDALONE=n
fi
@daviddpd Thanks for the patch. Any idea why Mojave causes this?
@daviddpd Thanks for the patch. Any idea why Mojave causes this?
No idea why it breaks cross the macOS version ... but I would blame esp-open-sdk more as being extremely GNU/Linux specific - hard coded patches and non-portable flags on *NIX tools - not a portable set of Makefiles.
I've hacked in 2.2.1 support and will try 3.0.0 support as well. If I can stay on my project, I will fork this, and make some binary releases, maybe investigate how to get into home-brew packages - as Espressif et al have seem to given up on the ESP8266 platform.
@daviddpd Thanks for the patch. Any idea why Mojave causes this?
No idea why it breaks cross the macOS version ... but I would blame esp-open-sdk more as being extremely GNU/Linux specific - hard coded patches and non-portable flags on *NIX tools - not a portable set of Makefiles.
I've hacked in 2.2.1 support and will try 3.0.0 support as well. If I can stay on my project, I will fork this, and make some binary releases, maybe investigate how to get into home-brew packages - as Espressif et al have seem to given up on the ESP8266 platform.
Very true. I can help you test if you need.
@daviddpd I tried your solution but I needed to set /usr/bin/sed
instead of /usr/local/bin/sed
(not found) but then on make using your helper script I'm getting:
/usr/bin/sed -r -i.org s%CT_PREFIX_DIR=.*%CT_PREFIX_DIR="/Volumes/case-sensitive/esp-open-sdk/xtensa-lx106-elf"% .config
/usr/bin/sed: illegal option -- r
As the macOS version of sed
doesn't support -r
alias but -E
.
Do you know what I'm doing differently?
I'm running on macOS 10.14.2 (18C54)
with Xcode Version 10.1 (10B61)
.
I installed again sed brew install gnu-sed --with-default-names
and specified the path to the sed
in my case to /usr/local/opt/gnu-sed/libexec/gnubin/sed
which fixed my previous issue ↑
But I'm still getting an error:
Now configured for "xtensa-lx106-elf"
/usr/local/opt/gnu-sed/libexec/gnubin/sed -r -i.org s%CT_PREFIX_DIR=.*%CT_PREFIX_DIR="/Volumes/case-sensitive/esp-open-sdk/xtensa-lx106-elf"% .config
/usr/local/opt/gnu-sed/libexec/gnubin/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 20190106.172242
[INFO ] Building environment variables
[INFO ] =================================================================
[INFO ] Retrieving needed toolchain components' tarballs
[INFO ] Retrieving needed toolchain components' tarballs: done in 1.00s (at 00:07)
[INFO ] =================================================================
[INFO ] Extracting and patching toolchain components
[INFO ] Extracting and patching toolchain components: done in 138.00s (at 02:25)
[INFO ] =================================================================
[INFO ] Installing ncurses for build
[ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR] make[4]: *** [clear] Error 1
[ERROR] make[3]: *** [all] Error 2
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing ncurses for build'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@216]
[ERROR] >> called from: do_ncurses_backend[scripts/build/companion_libs/220-ncurses.sh@151]
[ERROR] >> called from: do_ncurses_for_build[scripts/build/companion_libs/220-ncurses.sh@35]
[ERROR] >> called from: do_companion_libs_for_build[scripts/build/companion_libs.sh@29]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@646]
[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/crosstool-ng-1.22.0-60-g37b07f6f-dirty/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 3:03.00)
[03:04] / make[2]: *** [build] Error 1
make[1]: *** [_toolchain] Error 2
make: *** [crosstool-NG/.built] Error 2
Thanks @daviddpd for your help ... but I'm still blocked by this error ... Can you help me, please? Thanks again
[ALL ] clang: warning: argument unused during compilation: '--param max-inline-insns-single=1200' [-Wunused-command-line-argument]
[ALL ] ld: warning: ignoring file ../lib/libncurses.a, file was built for archive which is not the architecture being linked (x86_64): ../lib/libncurses.a
[ALL ] Undefined symbols for architecture x86_64:
[ALL ] "_cur_term", referenced from:
[ALL ] _main in clear.o
[ALL ] "_setupterm", referenced from:
[ALL ] _main in clear.o
[ALL ] "_tigetstr", referenced from:
[ALL ] _main in clear.o
[ALL ] "_tputs", referenced from:
[ALL ] _main in clear.o
[ALL ] ld: symbol(s) not found for architecture x86_64
[ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR] make[4]: [clear] Error 1
[ALL ] make[4]: Waiting for unfinished jobs....
[ERROR] make[3]: *** [all] Error 2
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing ncurses for build'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@216]
[ERROR] >> called from: do_ncurses_backend[scripts/build/companion_libs/220-ncurses.sh@151]
[ERROR] >> called from: do_ncurses_for_build[scripts/build/companion_libs/220-ncurses.sh@35]
[ERROR] >> called from: do_companion_libs_for_build[scripts/build/companion_libs.sh@29]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@646]
[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/crosstool-ng-1.22.0-60-g37b07f6f-dirty/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 0:36.00)
Ok - the best way to do this is to fork it ... so I forked and branched it, cleaned up and pushed my patches.
git clone -b macos-10-14-sdk221 git@github.com:daviddpd/esp-open-sdk.git
I updated the readme as well, and the directions for macOS - but don't have the branch in the readme ...
<< install homebrew / http://brew.sh >>
<< create case-sensetive hfs+ disk image and mount as /Volumes/esp8266 >>
cd /Volumes/esp8266
git clone --recursive -b macos-10-14-sdk221 git@github.com:daviddpd/esp-open-sdk.git
cd esp-open-sdk
make clean
./esp-open-sdk-mac-bsd.sh
If you have issue, please send the last ~50-100 lines of both standard out and of the esp-open-sdk/build.log to my email (listed in my GitHub profile).
Thanks David! Same error again ... I'm sending you a mail with some logs ...
Thanks David, works for me
Hello, thanks for the patch! However, I cannot clone the repository with "git clone --recursive -b macos-10-14-sdk221 git@github.com:daviddpd/esp-open-sdk.git". I get an error about my public key:
Cloning into 'esp-open-sdk'... Warning: Permanently added the RSA host key for IP address 'x.x.x.x' to the list of known hosts. git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
@ingframin git clone --recursive -b macos-10-14-sdk221 https://github.com/daviddpd/esp-open-sdk.git
Or make sure you have added your ssh-key to your agent and GitHub account - but that is GitHub usage/user issue, not a code/project - see GitHub's help pages - https://help.github.com/articles/connecting-to-github-with-ssh/
I've had two people that still get this error (see your build.log) :
[ALL ] ld: warning: ignoring file ../lib/libncurses.a, file was built for archive which is not the architecture being linked (x86_64): ../lib/libncurses.a
For some reason ... clang/gcc is outputting the wrong binary code ... or the linker thinks it's wrong. At least one person resolved this with re-installing Xcode and all its command line unix tools/add-ons.
I did:
sudo rm -rf /Applications/Xcode.app/
sudo rm -rf /Library/Developer/CommandLineTools
Installed from the app store fresh Xcode 10.1
and then:
xcode-select --install
But still after making all of the steps https://github.com/pfalcon/esp-open-sdk/issues/342#issuecomment-452400514 I have the same issue https://github.com/pfalcon/esp-open-sdk/issues/342#issuecomment-453448846
@daviddpd yessss, it finally completed the process with your fork, thanks for all the input! ;)
I finally fixed all of the issues and it worked for me :)
In my case, I needed for some reason uninstall all of the brew libs used by esp-open-sdk.
I also needed to fix the search paths for the ar
and ranlib
. The same as described here https://stackoverflow.com/questions/22107616/static-library-built-for-archive-which-is-not-the-architecture-being-linked-x86 .
After running for the first time ./esp-open-sdk-mac-bsd.sh
, I needed to make symbolic link to sed
:
ln -s /usr/local/opt/gnu-sed/libexec/gnubin/sed /usr/local/bin/sed
and then run it again.
@daviddpd I am still getting issues after following the steps above. Below is my current output from build.log. Any ideas as to what I am doing wrong?
[ALL ] x86_64-build_apple-darwin18.2.0-gcc -DHAVE_CONFIG_H -I. -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs -I../include -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/../include -D_DARWIN_C_SOURCE -DNDEBUG -O2 -g -no-cpp-precomp --param max-inline-insns-single=1200 -c /Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/tic.c -o ../objects/tic.o
[ALL ] x86_64-build_apple-darwin18.2.0-gcc -DHAVE_CONFIG_H -I. -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs -I../include -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/../include -D_DARWIN_C_SOURCE -DNDEBUG -O2 -g -no-cpp-precomp --param max-inline-insns-single=1200 -c /Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/transform.c -o ../objects/transform.o
[ALL ] x86_64-build_apple-darwin18.2.0-gcc -DHAVE_CONFIG_H -I. -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs -I../include -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/../include -D_DARWIN_C_SOURCE -DNDEBUG -O2 -g -no-cpp-precomp --param max-inline-insns-single=1200 -c /Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/tset.c -o ../objects/tset.o
[ALL ] x86_64-build_apple-darwin18.2.0-gcc ../objects/clear.o -L../lib -Wl,-search_paths_first -DHAVE_CONFIG_H -I. -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs -I../include -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/../include -D_DARWIN_C_SOURCE -DNDEBUG -O2 -g -no-cpp-precomp --param max-inline-insns-single=1200 -lncurses -o clear
[ALL ] clang: warning: argument unused during compilation: '--param max-inline-insns-single=1200' [-Wunused-command-line-argument]
[ALL ] clang: warning: argument unused during compilation: '--param max-inline-insns-single=1200' [-Wunused-command-line-argument]
[ALL ] clang: warning: argument unused during compilation: '--param max-inline-insns-single=1200' [-Wunused-command-line-argument]
[ALL ] ld: warning: ignoring file ../lib/libncurses.a, file was built for archive which is not the architecture being linked (x86_64): ../lib/libncurses.a
[ALL ] x86_64-build_apple-darwin18.2.0-gcc -DHAVE_CONFIG_H -I. -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs -I../include -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/../include -D_DARWIN_C_SOURCE -DNDEBUG -O2 -g -no-cpp-precomp --param max-inline-insns-single=1200 -c /Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/dump_entry.c -o ../objects/dump_entry.o
[ALL ] x86_64-build_apple-darwin18.2.0-gcc -DHAVE_CONFIG_H -I. -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs -I../include -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/../include -D_DARWIN_C_SOURCE -DNDEBUG -O2 -g -no-cpp-precomp --param max-inline-insns-single=1200 -c /Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/tput.c -o ../objects/tput.o
[ALL ] Undefined symbols for architecture x86_64:
[ALL ] "_cur_term", referenced from:
[ALL ] _main in clear.o
[ALL ] "_setupterm", referenced from:
[ALL ] _main in clear.o
[ALL ] "_tigetstr", referenced from:
[ALL ] _main in clear.o
[ALL ] "_tputs", referenced from:
[ALL ] _main in clear.o
[ALL ] ld: symbol(s) not found for architecture x86_64
[ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR] make[4]: *** [clear] Error 1
[ALL ] make[4]: *** Waiting for unfinished jobs....
[ALL ] clang: warning: argument unused during compilation: '--param max-inline-insns-single=1200' [-Wunused-command-line-argument]
[ALL ] clang: warning: argument unused during compilation: '--param max-inline-insns-single=1200' [-Wunused-command-line-argument]
[ERROR] make[3]: *** [all] Error 2
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing ncurses for build'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@216]
[ERROR] >> called from: do_ncurses_backend[scripts/build/companion_libs/220-ncurses.sh@151]
[ERROR] >> called from: do_ncurses_for_build[scripts/build/companion_libs/220-ncurses.sh@35]
[ERROR] >> called from: do_companion_libs_for_build[scripts/build/companion_libs.sh@29]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@646]
[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/crosstool-ng-1.22.0-60-g37b07f6f-dirty/B - Known issues.txt'```
@daviddpd I am still getting issues after following the steps above. Below is my current output from build.log. Any ideas as to what I am doing wrong?
[ ... ] [ALL ] ld: warning: ignoring file ../lib/libncurses.a, file was built for archive which is not the architecture being linked (x86_64): ../lib/libncurses.a [ ... ] [ALL ] Undefined symbols for architecture x86_64: [ ... ] [ALL ] ld: symbol(s) not found for architecture x86_64 [ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation)
I wish I knew why this was happening ... this is the ncurses that is included in crosstools-NG, which is ironically, not needed (because its being handled with home-brew's installed binary package) ... but calls into a bigger issue - I think, for some reason, Xcode and gcc is mis-installed or corrupt. It's emitting bad code or code for the wrong architecture. Attempt to completely remove and re-install Xcode, and reinstall the command line tools. Of course reboot ... do a clean checkout from git hub ... maybe reinstall all the home-brew tools. And re-try.
@jahumes Try this https://github.com/pfalcon/esp-open-sdk/issues/342#issuecomment-453988759 I also had a lot of issues with ncurses
but this helped me.
I needed for some reason uninstall all of the brew libs used by esp-open-sdk
How did you do that? Get the list of which libs are used by esp-open-sdk etc.
The list is in the readme https://github.com/pfalcon/esp-open-sdk#macos and also you can verify with the @daviddpd script https://github.com/daviddpd/esp-open-sdk/blob/421e0b3e18f28b636a66b6429cdd3c10282c3447/esp-open-sdk-mac-bsd.sh
@daviddpd I am still getting issues after following the steps above. Below is my current output from build.log. Any ideas as to what I am doing wrong?
[ALL ] x86_64-build_apple-darwin18.2.0-gcc -DHAVE_CONFIG_H -I. -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs -I../include -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/../include -D_DARWIN_C_SOURCE -DNDEBUG -O2 -g -no-cpp-precomp --param max-inline-insns-single=1200 -c /Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/tic.c -o ../objects/tic.o [ALL ] x86_64-build_apple-darwin18.2.0-gcc -DHAVE_CONFIG_H -I. -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs -I../include -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/../include -D_DARWIN_C_SOURCE -DNDEBUG -O2 -g -no-cpp-precomp --param max-inline-insns-single=1200 -c /Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/transform.c -o ../objects/transform.o [ALL ] x86_64-build_apple-darwin18.2.0-gcc -DHAVE_CONFIG_H -I. -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs -I../include -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/../include -D_DARWIN_C_SOURCE -DNDEBUG -O2 -g -no-cpp-precomp --param max-inline-insns-single=1200 -c /Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/tset.c -o ../objects/tset.o [ALL ] x86_64-build_apple-darwin18.2.0-gcc ../objects/clear.o -L../lib -Wl,-search_paths_first -DHAVE_CONFIG_H -I. -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs -I../include -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/../include -D_DARWIN_C_SOURCE -DNDEBUG -O2 -g -no-cpp-precomp --param max-inline-insns-single=1200 -lncurses -o clear [ALL ] clang: warning: argument unused during compilation: '--param max-inline-insns-single=1200' [-Wunused-command-line-argument] [ALL ] clang: warning: argument unused during compilation: '--param max-inline-insns-single=1200' [-Wunused-command-line-argument] [ALL ] clang: warning: argument unused during compilation: '--param max-inline-insns-single=1200' [-Wunused-command-line-argument] [ALL ] ld: warning: ignoring file ../lib/libncurses.a, file was built for archive which is not the architecture being linked (x86_64): ../lib/libncurses.a [ALL ] x86_64-build_apple-darwin18.2.0-gcc -DHAVE_CONFIG_H -I. -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs -I../include -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/../include -D_DARWIN_C_SOURCE -DNDEBUG -O2 -g -no-cpp-precomp --param max-inline-insns-single=1200 -c /Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/dump_entry.c -o ../objects/dump_entry.o [ALL ] x86_64-build_apple-darwin18.2.0-gcc -DHAVE_CONFIG_H -I. -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs -I../include -I/Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/../include -D_DARWIN_C_SOURCE -DNDEBUG -O2 -g -no-cpp-precomp --param max-inline-insns-single=1200 -c /Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/src/ncurses-6.0/progs/tput.c -o ../objects/tput.o [ALL ] Undefined symbols for architecture x86_64: [ALL ] "_cur_term", referenced from: [ALL ] _main in clear.o [ALL ] "_setupterm", referenced from: [ALL ] _main in clear.o [ALL ] "_tigetstr", referenced from: [ALL ] _main in clear.o [ALL ] "_tputs", referenced from: [ALL ] _main in clear.o [ALL ] ld: symbol(s) not found for architecture x86_64 [ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation) [ERROR] make[4]: *** [clear] Error 1 [ALL ] make[4]: *** Waiting for unfinished jobs.... [ALL ] clang: warning: argument unused during compilation: '--param max-inline-insns-single=1200' [-Wunused-command-line-argument] [ALL ] clang: warning: argument unused during compilation: '--param max-inline-insns-single=1200' [-Wunused-command-line-argument] [ERROR] make[3]: *** [all] Error 2 [ERROR] [ERROR] >> [ERROR] >> Build failed in step 'Installing ncurses for build' [ERROR] >> called in step '(top-level)' [ERROR] >> [ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@216] [ERROR] >> called from: do_ncurses_backend[scripts/build/companion_libs/220-ncurses.sh@151] [ERROR] >> called from: do_ncurses_for_build[scripts/build/companion_libs/220-ncurses.sh@35] [ERROR] >> called from: do_companion_libs_for_build[scripts/build/companion_libs.sh@29] [ERROR] >> called from: main[scripts/crosstool-NG.sh@646] [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/crosstool-ng-1.22.0-60-g37b07f6f-dirty/B - Known issues.txt'```
I also hade the same problem and as indicated by @nonameplum it's related brew installs. Brew will install the tools in /usr/local/opt/binutils/bin and put first in PATH and this will shadow the path to the equivalent Xcode tools in /usr/bin. I installed these dependencies myself before running from @daviddpd fork. To solve it I simply changed my PATH after the build failed, re-run make, and then finally I was able to compile the SDK!
@daviddpd Thanks for your work!
I'm running Xcode 10.1 and macOS 10.14.3
Thanks to all of you for your contributions to this thread. After trying for hours I was finally able to successfully build the sdk.
I wrote down all the errors I encountered along the way and which of your hints helped me. I hope this will help the next person to do this in much shorter time and maybe someone can use this to improve the build script. 😉
create case-sensitive volume
sudo hdiutil create ~/Documents/esp8266.dmg -volname "esp8266" -size 10g -fs "Case-sensitive HFS+"
sudo hdiutil mount ~/Documents/esp8266.dmg
cd /Volumes/esp8266
Note: the -volname
argument is wrong in @daviddpd's README
clone @daviddpd's branch
git clone --recursive -b macos-10-14-sdk221 git@github.com:daviddpd/esp-open-sdk.git
cd esp-open-sdk
Note: as he says in this comment https://github.com/pfalcon/esp-open-sdk/issues/342#issuecomment-452400514, the branch name is not included in the README instruction
run the build script with patches
make clean
./esp-open-sdk-mac-bsd.sh
Error: This fails with the following error:
...
checking for gobjcopy... no
checking for objcopy... no
configure: error: missing required tool: gobjcopy objcopy
make[1]: *** [_ct-ng] Error 1
make: *** [crosstool-NG/ct-ng] Error 2
This occurs, when binutils, installed by brew, is not available in the path. There is an instruction in esp-open-sdk-mac-bsd.sh
which is meant to do that, but that does not seem to work. I think it fails, because it references an exact version instead of the symlink and a newer version was installed.
Solution:
# brew info will show an instruction to permanently add binutils to the path
# we just do it temporarily
brew info binutils
export PATH="/usr/local/opt/binutils/bin:$PATH"
Note: this causes the problem mentioned in this comment https://github.com/pfalcon/esp-open-sdk/issues/342#issuecomment-468391431 for a later stage, that's why I wrote "temporarily"
reset the patches and run the build script again
rm -rf crosstool-NG/
git submodule update --init --recursive
make clean
./esp-open-sdk-mac-bsd.sh
Error: It fails again, with the following error:
...
Now configured for "xtensa-lx106-elf"
/usr/local/bin/sed -r -i.org s%CT_PREFIX_DIR=.*%CT_PREFIX_DIR="/Volumes/esp8266/esp-open-sdk/xtensa-lx106-elf"% .config
/bin/bash: /usr/local/bin/sed: No such file or directory
make[1]: *** [_toolchain] Error 127
make: *** [crosstool-NG/.built] Error 2
Solution: create the missing symlink, as explained here https://github.com/pfalcon/esp-open-sdk/issues/342#issuecomment-453988759
ln -s /usr/local/opt/gnu-sed/libexec/gnubin/sed /usr/local/bin/sed
reset the patches and run the build script again
rm -rf crosstool-NG/
git submodule update --init --recursive
make clean
./esp-open-sdk-mac-bsd.sh
potential error: This happened to me the first time but not when I repeated all the steps to write this down. The following error may occur:
[INFO ] Retrieving needed toolchain components' tarballs
[INFO ] Retrieving needed toolchain components' tarballs: done in 98.00s (at 01:40)
[INFO ] =================================================================
[INFO ] Extracting and patching toolchain components
[01:42] / gzip: /Volumes/esp8266/esp-open-sdk/crosstool-NG/.build/tarballs/expat-2.1.0.tar.gz: not in gzip format
Solution: There is another GitHub issue about this problem: https://github.com/pfalcon/esp-open-sdk/issues/307#issuecomment-368207036 Download the expat tarball manually and delete the build files
cd crosstool-NG/.build/tarballs
rm expat-2.1.0.tar.gz
wget https://github.com/libexpat/libexpat/releases/download/R_2_1_0/expat-2.1.0.tar.gz
cd ../src
rm .expat-2.1.0.*
rm -r expat-2.1.0/
cd ../../..
Note: If you do not delete those files before continuing, the follwing error will occur:
[ERROR] The 'expat-2.1.0' sources were partially extracted.
[ERROR] Please remove first:
[ERROR] - the source dir for 'expat-2.1.0', in '/Volumes/esp8266/esp-open-sdk/crosstool-NG/.build/src'
[ERROR] - the file '/Volumes/esp8266/esp-open-sdk/crosstool-NG/.build/src/.expat-2.1.0.extracting'
[ERROR] I'll stop now to avoid any carnage...
This time, do not reset anything, just run the build script again
./esp-open-sdk-mac-bsd.sh
Error: (this was the last one 😉)
[INFO ] Installing ncurses for build
[ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR] make[4]: *** [clear] Error 1
[ERROR] make[3]: *** [all] Error 2
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing ncurses for build'
[ERROR] >> called in step '(top-level)'
Solution: Reset the $PATH
so that brew binutils is removed from it, as mentioned in this comment https://github.com/pfalcon/esp-open-sdk/issues/342#issuecomment-468391431
I think the easiest way to do this is to open a new terminal window/tab (if the path was only modified temporarily)
Again, do not reset anything, just run the build script again
./esp-open-sdk-mac-bsd.sh
enjoy and build whatever awesome thing you wanted to build in the first place 😊
@phibo23 thank you for this solution! Its work for me)
@phibo23 thanks this worked for me too!
From Australia, bit of an ESP noob, but am creating a localised version of this project to make Homekit compatible Australian-approved smart switches: (if successful, ill fork I guess?)
https://github.com/Gruppio/Sonoff-Homekit
(requires switching of both Active and Neutral, which a Sonoff doesn't)
smart switch is the Bunnings 'Brilliant' Smart Wifi Plug
Edit, it didn't work, errors at installing cross-gdb saying
[ERROR] configure: error: python is missing or unusable
[ERROR] make[4]: *** [configure-gdb] Error 1
[ERROR] make[3]: *** [all] Error 2
edit 2: fixed by removing plain homebrew python, and installing python by using pyenv, then setting version to 2.7.16.. the build.log file in the cross-gdb-something dir had a build.log and it explicitly said it looked for python 2.7
Followed the above comment.
Ran into an issue on step after step 4.
clang: error: linker command failed with exit code 1 (use -v to see invocation) make: [nconf] Error 1 make: [build-lib-kconfig] Error 2 make: [build] Error 2 make[1]: [_ct-ng] Error 2 make: *** [crosstool-NG/ct-ng] Error 2
root was: ld: warning: directory not found for option '-L/usr/local/Cellar/ncurses/6.1/lib'
I did this temp workaround (as couldn't get hold of 6.1 via brew): sudo ln -s /usr/local/Cellar/ncurses/6.2/lib /usr/local/Cellar/ncurses/6.1
which solved for that part :)
Get a failure now at step 7: [INFO ] Performing some trivial sanity checks [INFO ] Build started 20201211.010207 [INFO ] Building environment variables [INFO ] ================================================================= [INFO ] Retrieving needed toolchain components' tarballs [INFO ] Retrieving needed toolchain components' tarballs: done in 0.00s (at 00:04) [INFO ] ================================================================= [INFO ] Extracting and patching toolchain components [INFO ] Extracting and patching toolchain components: done in 0.00s (at 00:04) [INFO ] ================================================================= [INFO ] Installing ncurses for build [INFO ] Installing ncurses for build: done in 38.00s (at 00:42) [INFO ] ================================================================= [INFO ] Installing GMP for host [ERROR] configure: error: could not find a working compiler, see config.log for details [ERROR] [ERROR] >> [ERROR] >> Build failed in step 'Installing GMP for host' [ERROR] >> called in step '(top-level)' [ERROR] >> [ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@216] [ERROR] >> called from: do_gmp_backend[scripts/build/companion_libs/100-gmp.sh@92] [ERROR] >> called from: do_gmp_for_host[scripts/build/companion_libs/100-gmp.sh@62] [ERROR] >> called from: do_companion_libs_for_host[scripts/build/companion_libs.sh@36] [ERROR] >> called from: main[scripts/crosstool-NG.sh@646] [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/crosstool-ng-1.22.0-60-g37b07f6f-dirty/B - Known issues.txt' [ERROR] [ERROR] (elapsed: 0:58.00) [00:59] / make[2]: [build] Error 1 make[1]: [_toolchain] Error 2 make: *** [crosstool-NG/.built] Error 2
@daviddpd @phibo23 any help would be much appreciated.
@daviddpd @phibo23
This is the (tail) excerpt from the crostool-NG/build.log file :
[INFO ] Installing ncurses for build: done in 29.00s (at 00:32)
[INFO ] =================================================================
[INFO ] Installing GMP for host
[DEBUG] Entering '/Volumes/esp8266/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/build/build-gmp-host-x86_64-build_apple-darwin19.6.0'
[EXTRA] Configuring GMP
[DEBUG] ==> Executing: 'CFLAGS=-O2 -g -pipe -fexceptions' 'LDFLAGS= ' '/Volumes/esp8266/esp-open-sdk/crosstool-NG/.build/src/gmp-6.0.0a/configure' '--build=x86_64-build_apple-darwin19.6.0' '--host=x86_64-build_apple-darwin19.6.0' '--prefix=/Volumes/esp8266/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools' '--enable-fft' '--enable-cxx' '--disable-shared' '--enable-static' ''
[CFG ] configure: WARNING: you should use --build, --host, --target
[CFG ] checking build system type... x86_64-build_apple-darwin19.6.0
[CFG ] checking host system type... x86_64-build_apple-darwin19.6.0
[CFG ] checking for a BSD-compatible install... /Volumes/esp8266/esp-open-sdk/crosstool-NG/.build/tools/bin/install -c
[CFG ] checking whether build environment is sane... yes
[CFG ] checking for a thread-safe mkdir -p... /Volumes/esp8266/esp-open-sdk/crosstool-NG/.build/src/gmp-6.0.0a/install-sh -c -d
[CFG ] checking for gawk... gawk
[CFG ] checking whether make sets $(MAKE)... yes
[CFG ] checking whether to enable maintainer-specific portions of Makefiles... no
[CFG ] checking ABI=64
[CFG ] checking compiler gcc -O2 -g -pipe -fexceptions -I/usr/local/opt/readline/include... no, long long reliability test 1
[CFG ] checking whether cc is gcc... yes
[CFG ] checking compiler cc -O2 -g -pipe -fexceptions -I/usr/local/opt/readline/include... no, long long reliability test 1
[CFG ] checking ABI=x32
[CFG ] checking compiler gcc -O2 -g -pipe -fexceptions -I/usr/local/opt/readline/include... no, long long reliability test 1
[CFG ] checking whether cc is gcc... yes
[CFG ] checking compiler cc -O2 -g -pipe -fexceptions -I/usr/local/opt/readline/include... no, long long reliability test 1
[CFG ] checking ABI=32
[CFG ] checking compiler gcc -O2 -g -pipe -fexceptions -I/usr/local/opt/readline/include... no, long long reliability test 1
[CFG ] checking compiler icc -O2 -g -pipe -fexceptions -I/usr/local/opt/readline/include... no
[CFG ] checking whether cc is gcc... yes
[CFG ] checking compiler cc -O2 -g -pipe -fexceptions -I/usr/local/opt/readline/include... no, long long reliability test 1
[ERROR] configure: error: could not find a working compiler, see config.log for details
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing GMP for host'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@216]
[ERROR] >> called from: do_gmp_backend[scripts/build/companion_libs/100-gmp.sh@92]
[ERROR] >> called from: do_gmp_for_host[scripts/build/companion_libs/100-gmp.sh@62]
[ERROR] >> called from: do_companion_libs_for_host[scripts/build/companion_libs.sh@36]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@646]
[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/crosstool-ng-1.22.0-60-g37b07f6f-dirty/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 0:48.00)
This is the excerpt from the config.log:
configure:6193: gcc -o conftest -g -O2 -I/usr/local/opt/readline/include -L/usr/local/opt/readline/lib conftest.c -lncursesw >&5 ld: library not found for -lncursesw clang: error: linker command failed with exit code 1 (use -v to see invocation) configure:6193: $? = 1 configure: failed program was: | / confdefs.h / | #define PACKAGE_NAME "crosstool-NG" | #define PACKAGE_TARNAME "crosstool-ng" | #define PACKAGE_VERSION "crosstool-ng-1.22.0-60-g37b07f6f-dirty" | #define PACKAGE_STRING "crosstool-NG crosstool-ng-1.22.0-60-g37b07f6f-dirty" | #define PACKAGE_BUGREPORT "crossgcc@sourceware.org" | #define PACKAGE_URL "" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_MALLOC 1 | #define HAVE_STDLIB_H 1 | #define HAVE_REALLOC 1 | #define HAVE_ALLOCA_H 1 | #define HAVE_ALLOCA 1 | #define HAVE_LIBINTL_H 1 | #define HAVE_NCURSES_H 1 | / end confdefs.h. /
Any ideas?
Thanks.
Solved these issues by moving to Docker (Ubuntu) and building/make within that. :)
Hi, sorry for not responding. I am in no way an expert in any of the tools involved and my popular post above was just my compilation of solutions I found when I was hacking on a small project over a year ago. 😉 I am happy that you found a new approach to solve your problem 👍
Hey together, I had the same issues like above. I'm running a MAC with M1 core and Monterey (12.3.1). After digging and digging and following your suggestions I finally reached a where I cannot proceed. I need some help. I get now the following error/s:
cp -f 1000-mforce-l32.patch crosstool-NG/local-patches/gcc/4.8.5/ /Library/Developer/CommandLineTools/usr/bin/make -C crosstool-NG -f ../Makefile _toolchain ./ct-ng xtensa-lx106-elf ./ct-ng:26: /Volumes/esp8266/esp-open-sdk/crosstool-NG/lib/crosstool-ng-1.22.0-60-g37b07f6f-dirty/paths.mk: No such file or directory ./ct-ng:114: /Volumes/esp8266/esp-open-sdk/crosstool-NG/lib/crosstool-ng-1.22.0-60-g37b07f6f-dirty/config/config.mk: No such file or directory ./ct-ng:115: /Volumes/esp8266/esp-open-sdk/crosstool-NG/lib/crosstool-ng-1.22.0-60-g37b07f6f-dirty/kconfig/kconfig.mk: No such file or directory ./ct-ng:116: /Volumes/esp8266/esp-open-sdk/crosstool-NG/lib/crosstool-ng-1.22.0-60-g37b07f6f-dirty/steps.mk: No such file or directory ./ct-ng:117: /Volumes/esp8266/esp-open-sdk/crosstool-NG/lib/crosstool-ng-1.22.0-60-g37b07f6f-dirty/samples/samples.mk: No such file or directory ./ct-ng:118: /Volumes/esp8266/esp-open-sdk/crosstool-NG/lib/crosstool-ng-1.22.0-60-g37b07f6f-dirty/scripts/scripts.mk: No such file or directory make[2]: *** No rule to make target
/Volumes/esp8266/esp-open-sdk/crosstool-NG/lib/crosstool-ng-1.22.0-60-g37b07f6f-dirty/scripts/scripts.mk'. Stop.
make[1]: [_toolchain] Error 2
make: [crosstool-NG/.built] Error 2`
I do not understand where the lib directory comes into this compilation. There is none in my cross tool-ng. Maybe one of you has an idea, am I missing something ?
@ialidigital maybe you can give a rough summary how you did it with docker ? This could also be a suitable solution for me.
Thanks a lot for you support.
Attached log below, I can't figure this one out I'm compiling on case-sensitive volume on MacOS Mojave getting same error all the time. All the packages are installed with brew.