Open supergis opened 9 years ago
I'm not Mac user, and I can't see anything obvious to suggest here. The following report from a guy who successfully built the toolchain using ct-ng on Mac can probably give some clues: http://www.esp8266.com/viewtopic.php?f=9&t=224&start=30#p1111
I got it working like this (using Homebrew) on OS X Yosemite:
1) Create a 100GB* case sensitive disk image with Disk Utility, I called it DiskImage (make sure there are no spaces in the name).
*If you create a "Sparse Bundle Disk Image" it'll only use as much space as required, so you can create a much bigger partition than you have free space on your disk.
2) Run this:
cd /Volumes/DiskImage
git clone -b lx106 git://github.com/jcmvbkbc/crosstool-NG.git
cd crosstool-NG
brew tap homebrew/versions
brew tap homebrew/dupes
brew install autoconf automake libtool coreutils wget gawk binutils libelf gcc49 grep
export PATH="$(brew --prefix grep)/bin:$(brew --prefix coreutils)/libexec/gnubin:$PATH"
./bootstrap
CC=$(brew --prefix gcc49)/bin/gcc-4.9 ./configure --prefix=/Volumes/DiskImage
NO_GETTEXT=1 make
make install
./ct-ng xtensa-lx106-elf
./ct-ng build
I had to apply a patch found here before it would build
Paste the following code into a file called osx-offsetof.patch
diff --git a/kconfig/zconf.gperf b/kconfig/zconf.gperf
index c9e690e..d758a2a 100644
--- a/kconfig/zconf.gperf
+++ b/kconfig/zconf.gperf
@@ -7,6 +7,15 @@
%pic
%struct-type
+%{
+# ifndef offsetof
+# include <stddef.h>
+# ifndef offsetof
+# define offsetof(st, m) ((size_t)(&((st *)0)->m))
+# endif
+# endif
+%}
+
struct kconf_id;
static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
Then run
patch -p1 < ./osx-offsetof.patch
Can you pleas pack your complete compiler folder for mac and send it to me?
I am Build crosstool-NG on Mac OS X-Yosemite. run make got error as follow: GEN 'config/configure.in' GEN 'paths.mk' GEN 'paths.sh' LD 'conf' Undefined symbols for architecture x86_64: "_libintl_bindtextdomain", referenced from: _main in conf.o "_libintl_gettext", referenced from: _conf_parse in zconf.tab.o _conf_read_simple in zconf.tab.o _conf_write in zconf.tab.o _get_prompt_str in zconf.tab.o _get_symbol_str in zconf.tab.o _get_relations_str in zconf.tab.o _menu_get_ext_help in zconf.tab.o ... "_libintl_setlocale", referenced from: _main in conf.o "_libintl_textdomain", referenced from: _main in conf.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make[2]: * [conf] Error 1 make[1]: * [build-lib-kconfig] Error 2 make: *\ [build] Error 2
would you can help me?