ROOT 6.10/08 on macOS High Sierra compiling macro example

I am following the ROOT Primer, compiling the macro1.C Compile a Macro with ACLiC I get a lot of errors:

/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:115:82: error: use of undeclared identifier ‘labs’; did you mean ‘abs’?
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:115:44: note: ‘abs’ declared here
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:117:81: error: use of undeclared identifier 'llabs’
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:120:35: error: unknown type name 'ldiv_t’
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:120:95: error: use of undeclared identifier ‘ldiv’; did you mean ‘div’?
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:120:42: note: ‘div’ declared here
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:122:34: error: unknown type name 'lldiv_t’
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:122:94: error: use of undeclared identifier 'lldiv’
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);}
^
In file included from /Users/juan/Dropbox/UMSNH/PhD/codes/2. procesamiento de datos/macro1_C_ACLiC_dict.cxx:9:
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:74:64: error: use of undeclared identifier 'strchr’
char* __libcpp_strchr(const char* __s, int __c) {return (char*)strchr(__s, __c);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:81:75: error: use of undeclared identifier ‘strpbrk’
char* __libcpp_strpbrk(const char* __s1, const char* __s2) {return (char*)strpbrk(__s1, __s2);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:88:65: error: use of undeclared identifier ‘strrchr’; did you mean
’strchr’?
char* __libcpp_strrchr(const char* __s, int __c) {return (char*)strrchr(__s, __c);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:76:13: note: ‘strchr’ declared here
const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:95:49: error: unknown type name 'size_t’
void* __libcpp_memchr(const void* __s, int __c, size_t __n) {return (void*)memchr(__s, __c, __n);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:97:46: error: unknown type name 'size_t’
const void* memchr(const void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:99:46: error: unknown type name ‘size_t’
void* memchr( void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:102:74: error: use of undeclared identifier ‘strstr’; did you mean
’strchr’?
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:78:13: note: ‘strchr’ declared here
char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:102:74: error: no matching function for call to 'strchr’
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:78:13: note: candidate disabled:
char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:102:81: error: cannot initialize a parameter of type 'char ’ with an
lvalue of type 'const char '
char
__libcpp_strstr(const char
__s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
^~~~
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:78:32: note: passing argument to parameter ‘__s’ here
char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);}

What is the content of your macro?

// Builds a graph with errors, displays it and saves it as
// image. First, include some header files
// (not necessary for Cling)

#include "TCanvas.h"
#include "TROOT.h"
#include "TGraphErrors.h"
#include "TF1.h"
#include "TLegend.h"
#include "TArrow.h"
#include "TLatex.h"

void macro1(){
    // The values and the errors on the Y axis
    const int n_points=10;
    double x_vals[n_points]=
            {1,2,3,4,5,6,7,8,9,10};
    double y_vals[n_points]=
            {6,12,14,20,22,24,35,45,44,53};
    double y_errs[n_points]=
            {5,5,4.7,4.5,4.2,5.1,2.9,4.1,4.8,5.43};

    // Instance of the graph
    TGraphErrors graph(n_points,x_vals,y_vals,nullptr,y_errs);
    graph.SetTitle("Measurement XYZ;lenght [cm];Arb.Units");

    // Make the plot estetically better
    graph.SetMarkerStyle(kOpenCircle);
    graph.SetMarkerColor(kBlue);
    graph.SetLineColor(kBlue);

    // The canvas on which we'll draw the graph
    auto  mycanvas = new TCanvas();

    // Draw the graph !
    graph.DrawClone("APE");

    // Define a linear function
    TF1 f("Linear law","[0]+x*[1]",.5,10.5);
    // Let's make the funcion line nicer
    f.SetLineColor(kRed); f.SetLineStyle(2);
    // Fit it to the graph and draw it
    graph.Fit(&f);
    f.DrawClone("Same");

    // Build and Draw a legend
    TLegend leg(.1,.7,.3,.9,"Lab. Lesson 1");
    leg.SetFillColor(0);
    graph.SetFillColor(0);
    leg.AddEntry(&graph,"Exp. Points");
    leg.AddEntry(&f,"Th. Law");
    leg.DrawClone("Same");

    // Draw an arrow on the canvas
    TArrow arrow(8,8,6.2,23,0.02,"|>");
    arrow.SetLineWidth(2);
    arrow.DrawClone();

    // Add some text to the plot
    TLatex text(8.2,7.5,"#splitline{Maximum}{Deviation}");
    text.DrawClone();

    mycanvas->Print("graph_with_law.pdf");
}

int main(){
    macro1();
    }

I tried to copy, but for some reason was hidden by the system, please follow this link

I am seeing the same errors with 6-10-08 on macOS High Sierra, Xcode 9.0.1 even with a simple macro, e.g. test.C

//
#include <iostream>

void test(){

  std::cout << "Hello world!" << std::endl;

}

I’ve been using ACLiC for years – Is there an obvious configuration I am missing with 6.08.10 or with High Sierra/XCode?

  • Peter

With the same OS and XCode version, I do not see the problem. One likely cause would be file in the current directory (and/or the directory of the script) with has the same name as a C++ standard header (i.e. I have often see this with a file named ‘new’ for example).

Cheers,
Philippe.

If I run root macro.C everything goes right but if I run root macro.C+ (macro compilation) the errors appears

Try: root macro.C++

same result with root macro.C++

This is exactly the behavior I expect with stray mis-named files. What is the content of your current directory and the content of the directory containing the macro?

my current directory is the directory containing the macro and I just have the macro inside of it

[MacBook:rootexamples juan$ ls
macro1.C

Shouldn’t running with “++” or “+” create additional files (try “ls -al”)?

Yes it creates additional files

 [MacBook:rootexamples juan$ ls
macro1.C    	macro1_C.d	  macro1_C_ACLiC_dict_rdict.pcm       

Can you give us the output of

root.exe -b -l -q macro1.C++v

thanks,
Philippe.

root.exe -b -l -q macro1.C++v

Processing macro1.C++v...
Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/juan/rootexamples/./macro1_C.so
Info in <TMacOSXSystem::ACLiC>: looking for header in: /Users/juan/rootexamples/.:/Users/juan/rootexamples:.::$ROOTSYS/include:"/Applications/root_v6.10.08/etc":"/Applications/root_v6.10.08/etc/cling":"/Applications/root_v6.10.08/include":"/Library/Developer/CommandLineTools/usr/include/c++/v1":
Info in <ACLiC>: creating the dictionary files
Info in <ACLiC>: /Applications/root_v6.10.08/bin/rootcling -v0 "--lib-list-prefix=/Users/juan/rootexamples/macro1_C_ACLiC_map" -f "/Users/juan/rootexamples/macro1_C_ACLiC_dict.cxx" -c -p -I$ROOTSYS/include -I"/Applications/root_v6.10.08/etc" -I"/Applications/root_v6.10.08/etc/cling" -I"/Applications/root_v6.10.08/include" -I"/Library/Developer/CommandLineTools/usr/include/c++/v1" -D__ACLIC__  "/Users/juan/rootexamples/./macro1.C" "/Users/juan/rootexamples/macro1_C_ACLiC_linkdef.h"
Info in <ACLiC>: compiling the dictionary and script files
Info in <ACLiC>: cd "/Users/juan/rootexamples" ; c++ -c -O2 -DNDEBUG -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -std=c++11 -stdlib=libc++  -I$ROOTSYS/include -I"/Applications/root_v6.10.08/etc" -I"/Applications/root_v6.10.08/etc/cling" -I"/Applications/root_v6.10.08/include" -I"/Library/Developer/CommandLineTools/usr/include/c++/v1"   -D__ACLIC__ "/Users/juan/rootexamples/macro1_C_ACLiC_dict.cxx" ; c++ "/Users/juan/rootexamples/macro1_C_ACLiC_dict.o" -dynamiclib -Wl,-headerpad_max_install_names -m64 -single_module -Wl,-dead_strip_dylibs   "/usr/lib/libc++.dylib" "/Applications/root_v6.10.08/lib/libRint.so" "/Applications/root_v6.10.08/lib/libCore.so" "/usr/lib/libz.1.dylib" "/usr/lib/closure/libclosured.dylib" "/usr/lib/libsqlite3.dylib" "/usr/lib/libxml2.2.dylib" "/usr/lib/libnetwork.dylib" "/usr/lib/libapple_nghttp2.dylib" "/usr/lib/libenergytrace.dylib" "/usr/lib/libpcap.A.dylib" "/usr/lib/libboringssl.dylib" "/usr/lib/libusrtcp.dylib" "/usr/lib/libcoretls.dylib" "/usr/lib/libcoretls_cfhelpers.dylib" "/usr/lib/libapple_crypto.dylib" "/usr/lib/libxar.1.dylib" "/usr/lib/libarchive.2.dylib" "/usr/lib/libbz2.1.0.dylib" "/usr/lib/liblzma.5.dylib" "/usr/lib/libmecabra.dylib" "/usr/lib/libFosl_dynamic.dylib" "/usr/lib/libcompression.dylib" "/usr/lib/libiconv.2.dylib" "/usr/lib/libheimdal-asn1.dylib" "/usr/lib/libutil.dylib" "/usr/lib/libmarisa.dylib" "/usr/lib/libChineseTokenizer.dylib" "/usr/lib/libcmph.dylib" "/usr/lib/libxslt.1.dylib" "/usr/lib/libScreenReader.dylib" "/usr/lib/libate.dylib" "/Applications/root_v6.10.08/lib/libRIO.so" "/Applications/root_v6.10.08/lib/libThread.so" "/Applications/root_v6.10.08/lib/libCling.so" "/usr/lib/libncurses.5.4.dylib" "/Applications/root_v6.10.08/lib/libMathCore.so" "/Applications/root_v6.10.08/lib/libHist.so" "/Applications/root_v6.10.08/lib/libMatrix.so" "/Applications/root_v6.10.08/lib/libGpad.so" "/Applications/root_v6.10.08/lib/libGraf.so" -o "/Users/juan/rootexamples/./macro1_C.so"
In file included from /Users/juan/rootexamples/macro1_C_ACLiC_dict.cxx:8:
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:115:82: error: use of undeclared identifier 'labs'; did you mean 'abs'?
inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT {return  labs(__x);}
                                                                                 ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:115:44: note: 'abs' declared here
inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT {return  labs(__x);}
                                           ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:117:81: error: use of undeclared identifier 'llabs'
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
                                                                                ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:120:35: error: unknown type name 'ldiv_t'
inline _LIBCPP_INLINE_VISIBILITY  ldiv_t div(     long __x,      long __y) _NOEXCEPT {return  ldiv(__x, __y);}
                                  ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:120:95: error: use of undeclared identifier 'ldiv'; did you mean 'div'?
inline _LIBCPP_INLINE_VISIBILITY  ldiv_t div(     long __x,      long __y) _NOEXCEPT {return  ldiv(__x, __y);}
                                                                                              ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:120:42: note: 'div' declared here
inline _LIBCPP_INLINE_VISIBILITY  ldiv_t div(     long __x,      long __y) _NOEXCEPT {return  ldiv(__x, __y);}
                                         ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:122:34: error: unknown type name 'lldiv_t'
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);}
                                 ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:122:94: error: use of undeclared identifier 'lldiv'
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);}
                                                                                             ^
In file included from /Users/juan/rootexamples/macro1_C_ACLiC_dict.cxx:9:
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:74:64: error: use of undeclared identifier 'strchr'
char* __libcpp_strchr(const char* __s, int __c) {return (char*)strchr(__s, __c);}
                                                               ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:81:75: error: use of undeclared identifier 'strpbrk'
char* __libcpp_strpbrk(const char* __s1, const char* __s2) {return (char*)strpbrk(__s1, __s2);}
                                                                          ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:88:65: error: use of undeclared identifier 'strrchr'; did you mean 'strchr'?
char* __libcpp_strrchr(const char* __s, int __c) {return (char*)strrchr(__s, __c);}
                                                                ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:76:13: note: 'strchr' declared here
const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);}
            ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:95:49: error: unknown type name 'size_t'
void* __libcpp_memchr(const void* __s, int __c, size_t __n) {return (void*)memchr(__s, __c, __n);}
                                                ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:97:46: error: unknown type name 'size_t'
const void* memchr(const void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
                                             ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:99:46: error: unknown type name 'size_t'
      void* memchr(      void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
                                             ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:102:74: error: use of undeclared identifier 'strstr'; did you mean 'strchr'?
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
                                                                         ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:78:13: note: 'strchr' declared here
      char* strchr(      char* __s, int __c) {return __libcpp_strchr(__s, __c);}
            ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:102:74: error: no matching function for call to 'strchr'
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
                                                                         ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:78:13: note: candidate disabled: <no message provided>
      char* strchr(      char* __s, int __c) {return __libcpp_strchr(__s, __c);}
            ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:102:81: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'const char *'
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
                                                                                ^~~~
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:78:32: note: passing argument to parameter '__s' here
      char* strchr(      char* __s, int __c) {return __libcpp_strchr(__s, __c);}
                               ^
In file included from /Users/juan/rootexamples/macro1_C_ACLiC_dict.cxx:13:
In file included from /Applications/root_v6.10.08/include/TClass.h:24:
In file included from /Applications/root_v6.10.08/include/TDictionary.h:44:
In file included from /Applications/root_v6.10.08/include/TNamed.h:25:
In file included from /Applications/root_v6.10.08/include/TObject.h:17:
In file included from /Applications/root_v6.10.08/include/Rtypes.h:23:
/Applications/root_v6.10.08/include/RtypesCore.h:114:7: error: unknown type name 'size_t'; did you mean 'Size_t'?
const size_t    kBitsPerByte = 8;
      ^~~~~~
      Size_t
/Applications/root_v6.10.08/include/RtypesCore.h:83:24: note: 'Size_t' declared here
typedef float          Size_t;      //Attribute size (float)
                       ^
In file included from /Users/juan/rootexamples/macro1_C_ACLiC_dict.cxx:13:
In file included from /Applications/root_v6.10.08/include/TClass.h:24:
In file included from /Applications/root_v6.10.08/include/TDictionary.h:44:
In file included from /Applications/root_v6.10.08/include/TNamed.h:25:
In file included from /Applications/root_v6.10.08/include/TObject.h:17:
In file included from /Applications/root_v6.10.08/include/Rtypes.h:29:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/atomic:544:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstddef:48:9: error: no member named 'ptrdiff_t' in the global namespace
using ::ptrdiff_t;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstddef:49:9: error: no member named 'size_t' in the global namespace; did you mean 'Size_t'?
using ::size_t;
      ~~^
/Applications/root_v6.10.08/include/RtypesCore.h:83:24: note: 'Size_t' declared here
typedef float          Size_t;      //Attribute size (float)
                       ^
In file included from /Users/juan/rootexamples/macro1_C_ACLiC_dict.cxx:13:
In file included from /Applications/root_v6.10.08/include/TClass.h:24:
In file included from /Applications/root_v6.10.08/include/TDictionary.h:44:
In file included from /Applications/root_v6.10.08/include/TNamed.h:25:
In file included from /Applications/root_v6.10.08/include/TObject.h:17:
In file included from /Applications/root_v6.10.08/include/Rtypes.h:29:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/atomic:545:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:153:8: error: no member named 'int8_t' in the global namespace; did you mean 'Int_t'?
using::int8_t;
     ~~^
/Applications/root_v6.10.08/include/RtypesCore.h:41:24: note: 'Int_t' declared here
typedef int            Int_t;       //Signed integer 4 bytes (int)
                       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
clang: error: no such file or directory: '/Users/juan/rootexamples/macro1_C_ACLiC_dict.o'
Error in <ACLiC>: Compilation failed!
/Applications/root_v6.10.08/bin/rootcling -v0 --lib-list-prefix=/Users/juan/rootexamples/macro1_C_ACLiC_map -f /Users/juan/rootexamples/macro1_C_ACLiC_dict.cxx -c -p -I/Applications/root_v6.10.08/include -I/Applications/root_v6.10.08/etc -I/Applications/root_v6.10.08/etc/cling -I/Applications/root_v6.10.08/include -I/Library/Developer/CommandLineTools/usr/include/c++/v1 -D__ACLIC__ /Users/juan/rootexamples/./macro1.C /Users/juan/rootexamples/macro1_C_ACLiC_linkdef.h
 cd /Users/juan/rootexamples ; c++ -c -O2 -DNDEBUG -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -std=c++11 -stdlib=libc++  -I/Applications/root_v6.10.08/include -I/Applications/root_v6.10.08/etc -I/Applications/root_v6.10.08/etc/cling -I/Applications/root_v6.10.08/include -I/Library/Developer/CommandLineTools/usr/include/c++/v1   -D__ACLIC__ /Users/juan/rootexamples/macro1_C_ACLiC_dict.cxx ; c++ /Users/juan/rootexamples/macro1_C_ACLiC_dict.o -dynamiclib -Wl,-headerpad_max_install_names -m64 -single_module -Wl,-dead_strip_dylibs   /usr/lib/libc++.dylib /Applications/root_v6.10.08/lib/libRint.so /Applications/root_v6.10.08/lib/libCore.so /usr/lib/libz.1.dylib /usr/lib/closure/libclosured.dylib /usr/lib/libsqlite3.dylib /usr/lib/libxml2.2.dylib /usr/lib/libnetwork.dylib /usr/lib/libapple_nghttp2.dylib /usr/lib/libenergytrace.dylib /usr/lib/libpcap.A.dylib /usr/lib/libboringssl.dylib /usr/lib/libusrtcp.dylib /usr/lib/libcoretls.dylib /usr/lib/libcoretls_cfhelpers.dylib /usr/lib/libapple_crypto.dylib /usr/lib/libxar.1.dylib /usr/lib/libarchive.2.dylib /usr/lib/libbz2.1.0.dylib /usr/lib/liblzma.5.dylib /usr/lib/libmecabra.dylib /usr/lib/libFosl_dynamic.dylib /usr/lib/libcompression.dylib /usr/lib/libiconv.2.dylib /usr/lib/libheimdal-asn1.dylib /usr/lib/libutil.dylib /usr/lib/libmarisa.dylib /usr/lib/libChineseTokenizer.dylib /usr/lib/libcmph.dylib /usr/lib/libxslt.1.dylib /usr/lib/libScreenReader.dylib /usr/lib/libate.dylib /Applications/root_v6.10.08/lib/libRIO.so /Applications/root_v6.10.08/lib/libThread.so /Applications/root_v6.10.08/lib/libCling.so /usr/lib/libncurses.5.4.dylib /Applications/root_v6.10.08/lib/libMathCore.so /Applications/root_v6.10.08/lib/libHist.so /Applications/root_v6.10.08/lib/libMatrix.so /Applications/root_v6.10.08/lib/libGpad.so /Applications/root_v6.10.08/lib/libGraf.so -o /Users/juan/rootexamples/./macro1_C.so 
 cd /Users/juan/rootexamples ; c++ -c  -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -std=c++11 -stdlib=libc++  -I/Applications/root_v6.10.08/include -I/Applications/root_v6.10.08/etc -I/Applications/root_v6.10.08/etc/cling -I/Applications/root_v6.10.08/include -I/Library/Developer/CommandLineTools/usr/include/c++/v1   -D__ACLIC__ /Users/juan/rootexamples/macro1_C_ACLiC_dict.cxx; c++ /Users/juan/rootexamples/macro1_C_ACLiC_dict.o  -o /Users/juan/rootexamples/macro1_C_ACLiC_exec  /usr/lib/libc++.dylib /Applications/root_v6.10.08/lib/libRint.so /Applications/root_v6.10.08/lib/libCore.so /usr/lib/libz.1.dylib /usr/lib/closure/libclosured.dylib /usr/lib/libsqlite3.dylib /usr/lib/libxml2.2.dylib /usr/lib/libnetwork.dylib /usr/lib/libapple_nghttp2.dylib /usr/lib/libenergytrace.dylib /usr/lib/libpcap.A.dylib /usr/lib/libboringssl.dylib /usr/lib/libusrtcp.dylib /usr/lib/libcoretls.dylib /usr/lib/libcoretls_cfhelpers.dylib /usr/lib/libapple_crypto.dylib /usr/lib/libxar.1.dylib /usr/lib/libarchive.2.dylib /usr/lib/libbz2.1.0.dylib /usr/lib/liblzma.5.dylib /usr/lib/libmecabra.dylib /usr/lib/libFosl_dynamic.dylib /usr/lib/libcompression.dylib /usr/lib/libiconv.2.dylib /usr/lib/libheimdal-asn1.dylib /usr/lib/libutil.dylib /usr/lib/libmarisa.dylib /usr/lib/libChineseTokenizer.dylib /usr/lib/libcmph.dylib /usr/lib/libxslt.1.dylib /usr/lib/libScreenReader.dylib /usr/lib/libate.dylib /Applications/root_v6.10.08/lib/libRIO.so /Applications/root_v6.10.08/lib/libThread.so /Applications/root_v6.10.08/lib/libCling.so /usr/lib/libncurses.5.4.dylib /Applications/root_v6.10.08/lib/libMathCore.so /Applications/root_v6.10.08/lib/libHist.so /Applications/root_v6.10.08/lib/libMatrix.so /Applications/root_v6.10.08/lib/libGpad.so /Applications/root_v6.10.08/lib/libGraf.so -lm    -ldl

What does:

c++ -c -O2 -DNDEBUG -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -std=c++11 -stdlib=libc++  -I$ROOTSYS/include -I"/Applications/root_v6.10.08/etc" -I"/Applications/root_v6.10.08/etc/cling" -I"/Applications/root_v6.10.08/include" -I"/Library/Developer/CommandLineTools/usr/include/c++/v1"   -D__ACLIC__  macro1.C

prints?

In file included from macro1.C:5:
In file included from /Applications/root_v6.10.08/include/TCanvas.h:17:
In file included from /Applications/root_v6.10.08/include/TPad.h:16:
In file included from /Applications/root_v6.10.08/include/TVirtualPad.h:25:
In file included from /Applications/root_v6.10.08/include/TAttPad.h:16:
In file included from /Applications/root_v6.10.08/include/Rtypes.h:23:
/Applications/root_v6.10.08/include/RtypesCore.h:114:7: error: unknown type name 'size_t'; did you mean 'Size_t'?
const size_t    kBitsPerByte = 8;
      ^~~~~~
      Size_t
/Applications/root_v6.10.08/include/RtypesCore.h:83:24: note: 'Size_t' declared here
typedef float          Size_t;      //Attribute size (float)
                       ^
In file included from macro1.C:5:
In file included from /Applications/root_v6.10.08/include/TCanvas.h:17:
In file included from /Applications/root_v6.10.08/include/TPad.h:16:
In file included from /Applications/root_v6.10.08/include/TVirtualPad.h:25:
In file included from /Applications/root_v6.10.08/include/TAttPad.h:16:
In file included from /Applications/root_v6.10.08/include/Rtypes.h:29:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/atomic:544:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstddef:48:9: error: no member named 'ptrdiff_t' in the global namespace
using ::ptrdiff_t;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstddef:49:9: error: no member named 'size_t' in the global namespace; did you
      mean 'Size_t'?
using ::size_t;
      ~~^
/Applications/root_v6.10.08/include/RtypesCore.h:83:24: note: 'Size_t' declared here
typedef float          Size_t;      //Attribute size (float)
                       ^
In file included from macro1.C:5:
In file included from /Applications/root_v6.10.08/include/TCanvas.h:17:
In file included from /Applications/root_v6.10.08/include/TPad.h:16:
In file included from /Applications/root_v6.10.08/include/TVirtualPad.h:25:
In file included from /Applications/root_v6.10.08/include/TAttPad.h:16:
In file included from /Applications/root_v6.10.08/include/Rtypes.h:29:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/atomic:545:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:153:8: error: no member named 'int8_t' in the global namespace; did you
      mean 'Int_t'?
using::int8_t;
     ~~^
/Applications/root_v6.10.08/include/RtypesCore.h:41:24: note: 'Int_t' declared here
typedef int            Int_t;       //Signed integer 4 bytes (int)
                       ^
In file included from macro1.C:5:
In file included from /Applications/root_v6.10.08/include/TCanvas.h:17:
In file included from /Applications/root_v6.10.08/include/TPad.h:16:
In file included from /Applications/root_v6.10.08/include/TVirtualPad.h:25:
In file included from /Applications/root_v6.10.08/include/TAttPad.h:16:
In file included from /Applications/root_v6.10.08/include/Rtypes.h:29:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/atomic:545:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:154:8: error: no member named 'int16_t' in the global namespace
using::int16_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:155:8: error: no member named 'int32_t' in the global namespace
using::int32_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:156:8: error: no member named 'int64_t' in the global namespace
using::int64_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:158:8: error: no member named 'uint8_t' in the global namespace
using::uint8_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:159:8: error: no member named 'uint16_t' in the global namespace
using::uint16_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:160:8: error: no member named 'uint32_t' in the global namespace
using::uint32_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:161:8: error: no member named 'uint64_t' in the global namespace
using::uint64_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:163:8: error: no member named 'int_least8_t' in the global namespace
using::int_least8_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:164:8: error: no member named 'int_least16_t' in the global namespace
using::int_least16_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:165:8: error: no member named 'int_least32_t' in the global namespace
using::int_least32_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:166:8: error: no member named 'int_least64_t' in the global namespace
using::int_least64_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:168:8: error: no member named 'uint_least8_t' in the global namespace
using::uint_least8_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:169:8: error: no member named 'uint_least16_t' in the global namespace
using::uint_least16_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:170:8: error: no member named 'uint_least32_t' in the global namespace
using::uint_least32_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:171:8: error: no member named 'uint_least64_t' in the global namespace
using::uint_least64_t;
     ~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

Alright we getting there. Now can you send us the file macro1.E created by

c++ -O2 -DNDEBUG -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -std=c++11 -stdlib=libc++  -I$ROOTSYS/include -I"/Applications/root_v6.10.08/etc" -I"/Applications/root_v6.10.08/etc/cling" -I"/Applications/root_v6.10.08/include" -I"/Library/Developer/CommandLineTools/usr/include/c++/v1"   -D__ACLIC__  macro1.C  -E -o macro1.E

Thanks,
Philippe.

Sure macro1.E.zip (233.3 KB)

More progress; yours is different than mine. Let’s try to understand the differences.
Can you send me the output of

ls -l /Library/Developer/CommandLineTools/usr/include/c++/v1/stddef.h /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stddef.h /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include/stddef.h

and

cat $ROOTSYS/include/compiledata.h

thanks,
Philippe.