meta-toolkit / meta

A Modern C++ Data Sciences Toolkit
https://meta-toolkit.org
MIT License
693 stars 235 forks source link

macOS make command error (probably ICU problem) #212

Open saltfishzzh opened 5 years ago

saltfishzzh commented 5 years ago

Hi, I am trying to setup meta toolkit on macOS 10.14.6. I followed the instructions and the issue here: https://github.com/meta-toolkit/meta/issues/191#issuecomment-354575135 Then the configuration worked but the make command still fails. The error message is:

-- [download 100% complete]

-- verifying file...
       file='/Users/zhuohao/Documents/meta/deps/icu-63.1/icu4c-63_1-src.tgz'
-- Downloading... done
-- extracting...
     src='/Users/zhuohao/Documents/meta/deps/icu-63.1/icu4c-63_1-src.tgz'
     dst='/Users/zhuohao/Documents/meta/build/deps/icu-63.1/src/ExternalICU'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[  1%] No patch step for 'ExternalICU'
[  1%] No update step for 'ExternalICU'
[  1%] Performing configure step for 'ExternalICU'
checking for ICU version numbers... release 63.1, library 63.1, unicode version 11.0
checking build system type... x86_64-apple-darwin18.7.0
checking host system type... x86_64-apple-darwin18.7.0
checking whether to build debug libraries... no
checking whether to build release libraries... yes
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/Users/zhuohao/Documents/meta/build/deps/icu-63.1/src/ExternalICU-build':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
make[2]: *** [deps/icu-63.1/src/ExternalICU-stamp/ExternalICU-configure] Error 1
make[1]: *** [CMakeFiles/ExternalICU.dir/all] Error 2
make: *** [all] Error 2

Is it something wrong with the ICU version 63.1? I also tried the develop branch but no luck.

xiaoxianma commented 4 years ago

I got a pretty much same error with icu-58.2.

checking whether we are cross compiling... configure: error: in /Users/wsun/workdir/github/meta/build/deps/icu-58.2/src/ExternalICU-build': configure: error: cannot run C compiled programs. If you meant to cross compile, use--host'. See `config.log' for more details make[2]: [deps/icu-58.2/src/ExternalICU-stamp/ExternalICU-configure] Error 1 make[1]: [CMakeFiles/ExternalICU.dir/all] Error 2 make: *** [all] Error 2

NikaHsn commented 4 years ago

I get the same error with macOS 10.15.3 and icu-58.2

error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
make[2]: *** [deps/icu-58.2/src/ExternalICU-stamp/ExternalICU-configure] Error 1
make[1]: *** [CMakeFiles/ExternalICU.dir/all] Error 2
make: *** [all] Error 2

Have you found a workaround or fix for this?

stefandevai commented 4 years ago

Hi! I found a workaround for this problem. In my case, the deps/meta-cmake was set to an ancient commit, that's why this problem wasn't fixed there. So from the root meta directory I did:

cd deps/meta-cmake git pull

And then run cmake again on the build directory with the updated meta-cmake.

madcato commented 4 years ago

I tried version 58.3, because version 58.2 seems to be unavailable. But the problem persists.

checking for ICU version numbers... release 58.3, library 58.3, unicode version 9.0
checking build system type... x86_64-apple-darwin19.5.0
checking host system type... x86_64-apple-darwin19.5.0
checking whether to build debug libraries... no
checking whether to build release libraries... yes
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in 'XXXX/meta/build/deps/icu-58.2/src/ExternalICU-build':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use '--host'.
See 'config.log' for more details
make[2]: *** [deps/icu-58.2/src/ExternalICU-stamp/ExternalICU-configure] Error 1
make[1]: *** [CMakeFiles/ExternalICU.dir/all] Error 2
make: *** [all] Error 2

Trying @stefandevai solution didn't work for me.

Metadope commented 4 years ago

@madcato

https://github.com/unicode-org/icu/releases/download/release-58-2/icu4c-58_2-src.tgz