I’m trying to install root on my macbook air.
I have OS X 10.8.5
I have gcc version 4.2.1
I ran
./configure macosx
and then did a make
The make ran for a while but then stopped with the following message:
/opt/software/root/graf2d/quartz/src/QuartzFillArea.mm:471:47: error: no matching function for call to ‘CGGradientCreateWithColorComponents’
const CFScopeGuard gradient(CGGradientCreateWithColorComponents(baseSpace.Get(),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h:50:25: note: candidate function not viable: no known conversion from
’const Double_t *’ (aka ‘const double *’) to ‘const CGFloat *’ (aka ‘const float *’) for 2nd argument
CG_EXTERN CGGradientRef CGGradientCreateWithColorComponents(CGColorSpaceRef
^
1 error generated.
make: *** [graf2d/quartz/src/QuartzFillArea.o] Error 1
Has anyone seen this before? What is an appropriate fix? Any help would be greatly appreciated.
ROOT configured this way on Mac can not be compiled with g++, especially with g++ 4.2 on OS X 10.8, that’s what OP had - do you have the same setup?
You have to properly install XCode and SDK + command line tools. Usually, you can install XCode from App store (it’s free), after it’s installed, you can type in a terminal xcode-select --install (this will open a dialog window and you’ll be able to follow instructions there).
P.S. Even if I do a conversion from Double_t to CGfloat, this will not help you if you have problems with compilers/libraries installed on your machine - on OS X CGFloat is a typedef for double, as Double_t also is.
I am trying to install root version 5.34/21 on MacOSX10.10 (Yosemite).
I installed Xcode, including command line (using xcode-select --install).
I also installed the gnu compilers (gcc-5.0) from source forge.net).
Now running into the same problems as reported here earlier:
clang++ -O2 -m32 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -D__DARWIN_UNIX03=1 -pthread -DNDEBUG -ObjC++ -o graf2d/quartz/src/QuartzFillArea.o -c /Users/sijbrand/ROOT/graf2d/quartz/src/QuartzFillArea.mm
/Users/sijbrand/ROOT/graf2d/quartz/src/QuartzFillArea.mm:471:47: error: no
matching function for call to ‘CGGradientCreateWithColorComponents’
…gradient(CGGradientCreateWithColorComponents(baseSpace.Get(),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h:52:25: note:
candidate function not viable: no known conversion from ‘const Double_t *’
(aka ‘const double *’) to ‘const CGFloat *’ (aka ‘const float *’) for 2nd
argument
CG_EXTERN CGGradientRef CGGradientCreateWithColorComponents(CGColorSpaceRef
Anyone solved this yet? I’m getting the same error "no matching function for call to 'CGGradientCreateWithColorComponents and I’m running Yosemite 10.10.3.
This means you either do not have XCode/Command line tools installed correctly, or you’re using wrong compiler (you need clang from XCode installation) or you are configuring 32-bit build, which is not supported with Cocoa.
I ran into the exact same problem (ROOT 6.04/02, OS X 10.9.5). The solution for me was to configure with arch “macosx64” instead of “macosx.”
If “macosx” truly attempts a 32-bit build, then that should be stated when you run “configure --help.” Instead you get:
macosx for MacOS X >= 10.8 with clang
macosxicc for MacOS X >= 10.8 with Intel icc >= 13 (Intel only)
macosx64 for MacOS X >= 10.8 with gcc >= 4.8 64 bit mode
So if you want to build with clang, it’s unclear whether “macosx” is a 32bit or 64bit build. Maybe clear that up?