Problem with installing root using macport

_ROOT Version:6.18/00
_Platform:MacOX 10.13.6

Dear experts,

I recently had some trouble with installing root using macport. The installation went OK, but when I open root, I got the following:

  LC_ALL=C clang++-mp-8.0  -O2 -DNDEBUG -xc++ -E -v /dev/null 2>&1 >/dev/null | awk '/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}' | GREP_OPTIONS= grep -E "(c|g)\+\+"
Results was:
With exit code 256
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
input_line_3:37:10: fatal error: 'string' file not found
#include <string>
  | Welcome to ROOT 6.18/00         |
  |                               (c) 1995-2019, The ROOT Team |
  | Built for macosx64 on Jul 10 2019, 14:38:00                |
  | From tag , 25 June 2019                                    |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |

input_line_7:1:10: fatal error: 'iostream' file not found
#include <iostream>

I have searched the forum and tried several things. I did xcode-select --install and 'sudo xcodebuild -license. Here is some more diagnostic information:
$ echo | LC_ALL=C clang++ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fno-common -Wcast-qual -fno-strict-aliasing -xc++ -E -v - 2>&1

Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/
 "/Applications/" -cc1 -triple x86_64-apple-macosx10.13.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -E -disable-free -disable-llvm-verifier -discard-value-names -main-file-name - -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -relaxed-aliasing -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -dwarf-column-info -debugger-tuning=lldb -target-linker-version 409.12 -v -resource-dir /Applications/ -D _DEBUG -D _GNU_SOURCE -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -stdlib=libc++ -O3 -Wcast-qual -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/tjyang -ferror-limit 19 -fmessage-length 169 -fvisibility-inlines-hidden -stack-protector 1 -fblocks -fencode-extended-block-signature -fno-rtti -fobjc-runtime=macosx-10.13.0 -fmax-type-align=16 -fno-common -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o - -x c++ -
clang -cc1 version 10.0.0 (clang-1000.11.45.5) default target x86_64-apple-darwin17.7.0
ignoring nonexistent directory "/usr/include/c++/v1"
#include "..." search starts here:
#include <...> search starts here:
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
# 1 "<stdin>"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 387 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "<stdin>" 2

$ echo | LC_ALL=C clang++ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fno-common -Wcast-qual -fno-strict-aliasing -xc++ -E -v - 2>&1 >/dev/null | awk ‘/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}’ | grep -E “(c|g)++”

$ which clang++

$ which awk

$ which grep

I used port to install root many times before and never had a problem until recently. Thanks for any insights and suggestions.


@amadio can you give a hand here? Thanks!

This is the real clang you have to use in MacPorts. What is the output of the commands using this clang? That is, what is the output of the command shown below?

Thanks for your reply. This command does not return anything.

I did sudo port install clang-8.0 and the problem is solved. Thank you so much for the help.

Then that’s the problem. This command should return the path to the include directories where ROOT can find system headers. Can you please try each part of the command and show the output here, without redirecting to /dev/null?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.