Problem with Mac OS build

Hi,

what could be the cause of the following link problem? I’m using Mac OS 10.12.2, ROOT 6.08.04, latest version od CMake and XQartz, compiling enabling TMVA and RooFit. CMakeCache.txt is in attachment.

Thanks,

Luca

[ 65%] Linking CXX shared library ../../lib/libRGL.so Undefined symbols for architecture x86_64: "_XCopyArea", referenced from: TX11GLManager::Flush(int) in TX11GL.cxx.o "_XCreateColormap", referenced from: TGLWidget::CreateWindow(TGWindow const*, TGLFormat const&, unsigned int, unsigned int, std::__1::pair<void*, void*>&) in TGLWidget.cxx.o TX11GLManager::InitGLWindow(unsigned long) in TX11GL.cxx.o "_XCreateGC", referenced from: TX11GLManager::Flush(int) in TX11GL.cxx.o TX11GLManager::ReadGLBuffer(int) in TX11GL.cxx.o "_XCreateImage", referenced from: TX11GLManager::CreateGLPixmap(TX11GLManager::TGLContext_t&) in TX11GL.cxx.o "_XCreatePixmap", referenced from: TX11GLManager::CreateGLPixmap(TX11GLManager::TGLContext_t&) in TX11GL.cxx.o "_XCreateWindow", referenced from: TGLWidget::CreateWindow(TGWindow const*, TGLFormat const&, unsigned int, unsigned int, std::__1::pair<void*, void*>&) in TGLWidget.cxx.o TX11GLManager::InitGLWindow(unsigned long) in TX11GL.cxx.o "_XFree", referenced from: TGLFormat::InitAvailableSamples() in TGLFormat.cxx.o TGLWidget::~TGLWidget() in TGLWidget.cxx.o "_XFreeGC", referenced from: TX11GLManager::DeleteGLContext(int) in TX11GL.cxx.o "_XFreePixmap", referenced from: TX11GLManager::CreateGLPixmap(TX11GLManager::TGLContext_t&) in TX11GL.cxx.o "_XGetGeometry", referenced from: TX11GLManager::InitGLWindow(unsigned long) in TX11GL.cxx.o "_XGetVisualInfo", referenced from: TGLFormat::InitAvailableSamples() in TGLFormat.cxx.o "_XInitImage", referenced from: TX11GLManager::CreateGLPixmap(TX11GLManager::TGLContext_t&) in TX11GL.cxx.o "_XMapWindow", referenced from: TX11GLManager::InitGLWindow(unsigned long) in TX11GL.cxx.o "_XPutImage", referenced from: TX11GLManager::ReadGLBuffer(int) in TX11GL.cxx.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
CMakeCache.txt (104 KB)

Did you enable ‘x11’ explicitly? The default on MacOS is ‘cocoa’.

I don’t think I added it explicitly, that’s what I did:

cmake ../root-6.08.04/ -DCMAKE_INSTALL_PREFIX=/usr/local/root -Droofit=ON -Dtmva=ON -Dmacos_native=ON -Dminuit2=ON -Dbuiltin_zlib=ON -Dbuiltin_lzma=ON cmake --build . -- -j4

By the way, I also had to fix manually one of the makefiles:

 ~/Desktop/root_bld/CMakeFiles/hsimple.dir/build.make

at line 59 I had:

tutorials/hsimple.root: /Users/lista/Desktop/root-6.08.04/root.exe

instead of:

tutorials/hsimple.root: bin/root.exe

Cheers,

 Luca

I tried to rebuild every thing from scratch, and it works now. I don’t know what triggered X11, probably some early mistake on my side.

Sorry to bother you…

Luca