akira-okumura / RHEA

高エネルギー宇宙物理学のための ROOT 入門 – ROOT for High-Energy Astrophysics (RHEA)
27 stars 2 forks source link

Mac OSX El Capitan (10.11.4) で ROOT 6.06.02 のソースをコンパイルできなかった例 #7

Closed pn11 closed 6 years ago

pn11 commented 8 years ago

症状

./configure を使う方法でソースからコンパイルしたところ、make が途中で止まった (error messageは以下)。 Mac OSX El Capitan (10.11.4)で、clangのversionは700.0.72 。

解決法

エラーメッセージでググッて出てきた以下のページに解決法が載っていた。

Root 6 Macosx El Capitan - RootTalk

xcode-select --install 

をしてから

./configure
make

をするとうまく行った。El Capitanで同じ症状の人は試してみてください。

エラーメッセージ

In file included from input_line_1:1:
In file included from In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/newinput_line_1::671:
:
In file included from In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new::2367:
:
In file included from /Users/oka/roots/root-6.06.02/etc/cling/lib/clang/3.7.0/include/unistd.h/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config::823::
15:/Users/oka/roots/root-6.06.02/etc/cling/lib/clang/3.7.0/include/unistd.h :In file included from 8fatal error:input_line_1: :151: :

      In file included from 'unistd.h'fatal error/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new: : 67file:
 In file included from
not/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config       :'unistd.h'found23 file:

 not/Users/oka/roots/root-6.06.02/etc/cling/lib/clang/3.7.0/include/unistd.h :found8:
15: fatal error:
      'unistd.h' file not #include_next <unistd.h>
found              ^

#include_next <unistd.h>
              ^
#include_next <unistd.h>
              ^
In file included from input_line_1:1:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:67:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:23:
/Users/oka/roots/root-6.06.02/etc/cling/lib/clang/3.7.0/include/unistd.h:8:15: fatal error:
      'unistd.h' file not found
#include_next <unistd.h>
              ^
In file included from In file included from input_line_4In file included from input_line_4:input_line_4In file included from ::111input_line_4:
::
:
1/Users/oka/roots/root-6.06.02/etc/cling/lib/clang/3.7.0/include/assert.h/Users/oka/roots/root-6.06.02/etc/cling/lib/clang/3.7.0/include/assert.h/Users/oka/roots/root-6.06.02/etc/cling/lib/clang/3.7.0/include/assert.h:
:::888:/Users/oka/roots/root-6.06.02/etc/cling/lib/clang/3.7.0/include/assert.h:::15158::: 15 15:fatal error:fatal error : :  fatal error
:
            'assert.h'fatal error'assert.h':  file
 file      not
'assert.h'not        'assert.h'foundfile   foundfile
 not
not  foundfound

#include_next <assert.h>#include_next <assert.h>

#include_next <assert.h>              ^#include_next <assert.h>
              ^

              ^              ^

Error: Error loading the default header files.
Error: Error loading the default header files.
Error: Error loading the default header files.
Error: Error loading the default header files.
make: *** [core/metautils/src/G__std__forward_list.cxx] Error 1
make: *** Waiting for unfinished jobs....
make: *** [core/metautils/src/G__std__list.cxx] Error 1
make: *** [core/metautils/src/G__std__vector.cxx] Error 1
make: *** [core/base/src/G__Core.cxx] Error 1

clang のバージョン ( xcode-select --install する前)

$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin15.

clangのバージョン ( xcode-select --install したあと)

$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin15.4.0