Home | News | Documentation | Download

ROOT 6.10/08 on macOS High Sierra compiling macro example

Good point. I only tried a build from scratch.

OK - i just built 6.11.03 in my current environment and everything is fine (so I can get back to work). But i presume there are many others who are downloading the pro tarball and having similar issues. It’s nice to have a 300MB root installation vs. a 3.3GB install from source!

There is indeed some odd that we need to fix with that tar ball (i.e I see it too).

Cheers,
Philippe.

So, as I understand the only solution is to build the current version, not the tar.gz nor the dmg

@RobS after you update your XCode, Can you compile macros (macro1.C for example) without issues?

Hi @jdalvarez,

I see the same problem as you. When I try

$ root
root [0] .L macro1.C+

I receive the same errors as you did in your first post. It seems I was too quick to label this as solved in my thread.

So the .dmg is not usable in macOS High Sierra? We have no option but to build from source?

Thank you @RobS for reproducing the problem.

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

@vvassilev Did you get a change to take a look a this problem? (I.e. the dmg is not useable on some user’s system because of the include directory found/used by (T)Cling)

@pcanal, is this the zlib issue that we discussed privately or this is another case which is broken on high sierra?

@vvassilev It is slightly different. The zlib issue is break the ROOT build while this one has a successful ROOT build (packaged in the dmg file) that leads to failure when using ACLiC because (likely-cause) Cling remembers the ‘wrong’ system directories as shown in the .include command shown above.

@jdalvarez Just to double check, Did you do a call xcode-install (for the command line tool) after installing the XCode 9 update?

@jdalvarez replied that indeed xcode-install was run on the failing machine.

This issue can be easily resolved by executing a single command xcode-select --install.

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin17.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ xcode-select --install
xcode-select: note: install requested for command line developer tools
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin17.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Hi @oxon, I tried xcode-select --install and it doesn’t solve the problem:

$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
$ root -l
root [0] .L macro1.C+
Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/<user>/Desktop/tempWork/./macro1_C.so
In file included from /Users/<user>/Desktop/tempWork/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'?
  ...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 ...
                                           ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:117:81: error: 
      use of undeclared identifier 'llabs'
  ...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 __...
                                  ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:120:95: error: 
      use of undeclared identifier 'ldiv'; did you mean 'div'?
  ...ldiv_t div(     long __x,      long __y) _NOEXCEPT {return  ldiv(__x, __...
                                                                 ^
/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 __...
                                         ^
/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 __...
                                 ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:122:94: error: 
      use of undeclared identifier 'lldiv'
  ...lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, _...
                                                                 ^
In file included from /Users/<user>/Desktop/tempWork/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(__...
                                                               ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:81:75: error: 
      use of undeclared identifier 'strpbrk'
  ...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(...
                                                                ^
/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 (voi...
                                                ^
/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 __libcp...
                                             ^
/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 __libcp...
                                             ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:102:74: error: 
      use of undeclared identifier 'strstr'; did you mean 'strchr'?
  ...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* __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* __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/<user>/Desktop/tempWork/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/<user>/Desktop/tempWork/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/<user>/Desktop/tempWork/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/<user>/Desktop/tempWork/macro1_C_ACLiC_dict.o'
Error in <ACLiC>: Compilation failed!
root [1] .q

Can you launch /Applications/Xcode.app?

Yes, /Applications/Xcode.app launches without any problems.

Did you use “Software Update?”

Installing ROOT 6.12 solves the issue. Thanks for your suggestions!

1 Like

Excellent, thanks for confirming!