Compiling 6.12.4 error

Hi,
I am trying to install root 6.12.4 on my mac

I have
10.13.2 (17C88)
and
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.3.0
Thread model: posix

I did the following

cd ROOT
cmake …/root-6.12.04/
make -j3

This is the error I got

/Users/alhroob/ROOT/include/TMathBase.h:131:10: note: include the header or explicitly provide a declaration for ‘std::abs’
/Users/alhroob/ROOT/include/TMathBase.h:141:18: error: expected unqualified-id
{ return std::signbit(a); }
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/math.h:184:5: note: expanded from macro ‘signbit’
( sizeof(x) == sizeof(float) ? __inline_signbitf((float)(x))
^
In file included from input_line_9:12:
In file included from /Users/alhroob/ROOT/include/TApplication.h:30:
In file included from /Users/alhroob/ROOT/include/TQObject.h:41:
In file included from /Users/alhroob/ROOT/include/TList.h:25:
In file included from /Users/alhroob/ROOT/include/TSeqCollection.h:25:
In file included from /Users/alhroob/ROOT/include/TCollection.h:29:
In file included from /Users/alhroob/ROOT/include/TString.h:26:
/Users/alhroob/ROOT/include/TMathBase.h:144:18: error: expected unqualified-id
{ return std::signbit(a); }
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/math.h:184:5: note: expanded from macro ‘signbit’
( sizeof(x) == sizeof(float) ? __inline_signbitf((float)(x))
^
In file included from input_line_9:12:
In file included from /Users/alhroob/ROOT/include/TApplication.h:30:
In file included from /Users/alhroob/ROOT/include/TQObject.h:41:
In file included from /Users/alhroob/ROOT/include/TList.h:25:
In file included from /Users/alhroob/ROOT/include/TSeqCollection.h:25:
In file included from /Users/alhroob/ROOT/include/TCollection.h:29:
In file included from /Users/alhroob/ROOT/include/TString.h:26:
/Users/alhroob/ROOT/include/TMathBase.h:147:18: error: expected unqualified-id
{ return std::signbit(a); }
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/math.h:184:5: note: expanded from macro ‘signbit’
( sizeof(x) == sizeof(float) ? __inline_signbitf((float)(x))
^
Error: /Users/alhroob/ROOT/core/rootcling_stage1/src/rootcling_stage1: compilation failure (/Users/alhroob/ROOT/lib/libCore41483fa3e1_dictUmbrella.h)
make[2]: *** [core/base/G__Core.cxx] Error 1
make[1]: *** [core/base/CMakeFiles/G__Core.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 72%] Built target MetaCling
make: *** [all] Error 2

Have you installed XCode and performed the following command?

 xcode-select --install

xcode-select --install

xcode-select: error: command line tools are already installed, use “Software Update” to install updates

Yes, I had the same issue when updating XCode at one point. I believe I had to install it from a GUI through a ROOT user in the end.

Maybe try this?

I did
rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
then
cmake -j3

TMathBase.h:144:18: error: expected unqualified-id
{ return std::signbit(a); }

For the record, same here after updating to Xcode 9.2. Various xcode-select / GUI reinstall of the tools do not seem to work.

#include <cmath>
int main(int argc, char **argv) {
  return std::signbit(1);
}

does work, on the other hand…

Smells like Xcode caching / pch-ing something. I moved /usr/include/math.h to /usr/include/math.h.safe and back, and it magically started to work. Oh, well…

magic works! :stuck_out_tongue_winking_eye::

Is this the recommended way of doing this ?

Having the same problem here … and even as root I am not allowed to move /usr/include/math.h to another name …

I doubt it.

Have you tried using sudo as the root user?

Hi,I had this problem and I found the solution on the web, but I forgot it!google the error and you will find the way how to enable "sudo"this will require you to reboot the machine

ksmith
January 19 |

asalzbur:
Is this the recommended way of doing this ?

I doubt it.

asalzbur:
even as root I am not allowed to move /usr/include/math.h to another name …

Have you tried using sudo as the root user?

Visit Topic or reply to this email to respond.

In Reply To

asalzbur
January 19 |

Is this the recommended way of doing this ? Having the same problem here … and even as root I am not allowed to move /usr/include/math.h to another name …
Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

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