Closed alexpearce closed 3 years ago
Comment № 1 originally by Tim at 2013-12-19 18:50:27 UTC.
Thanks for this guide. As a first time user of ROOT, I'm attempting to install it on Mavericks. I run into the following error when installing root via Homebrew:
==> Downloading http://xrootd.slac.stanford...
Already downloaded: /Library/Caches/Homebrew/xrootd-3.3.4.tar.gz
Error: SHA1 mismatch
Expected: 9992c80b77cababf6fe1ee8535c930d082f501b4
Actual: 2b1973a426cf868d4040e141dd092c105ccdbe5f
Comment № 2 originally by Tim at 2013-12-19 18:58:13 UTC, replying to a comment by Tim at 2013-12-19 18:50:27 UTC.
I figured it out. I need to run brew update
first!
Comment № 3 originally by sameer at 2013-12-25 17:37:50 UTC.
It hangs once it starts looking for zlib :
-- Looking for ZLib
Comment № 4 originally by Lawrence at 2014-01-15 14:25:04 UTC.
Alex -- very clear instructions -- thanks for taking the time to put this together. I did find that I needed to invoke
make install
as in your instructions for 10.8 so that the header files, in particular, get copied over to the /usr/local/root tree. With that, everything worked like a charm.
Comment № 5 originally by Juanan at 2014-01-27 11:22:54 UTC.
Hi, Thanks a lot for the tutorial. It was extremely helpful. I'm having a problem though, it seems that libPyROOT is not generated when compiling root via homebrew. I checked if there is any option I missed but for what I understood is should be created by default (as it is included in the "-all"). Any ideas?
Comment № 6 originally by Juanan at 2014-01-28 08:45:50 UTC, replying to a comment by Juanan at 2014-01-27 11:22:54 UTC.
I reply to myself just in case someone else is running into the same problem. It seems the configure was not picking up Python.h since the command which is used to look for it works well on the terminal but not under the superenv used by Homebrew. Using this command:
brew install --with-cocoa root --env=std
seems to do the trick.
Comment № 7 originally by Alex Pearce at 2014-01-28 09:43:04 UTC, replying to a comment by Juanan at 2014-01-28 08:45:50 UTC.
Hi Juanan. Thanks for reporting the problem, and for suggesting a fix.
Have you installed Python with Homebrew, or are you using the Python that comes with OS X?
I didn't see the problem you've described, and use the Homebrew Python. I wonder if this --env=std flag is only required is only required when using the OS X Python.
Comment № 8 originally by Espen at 2014-01-28 10:56:41 UTC, replying to a comment by Alex Pearce at 2014-01-28 09:43:04 UTC.
Hi Alex,
I have a similar problem getting pyroot to work. I install root with "brew install --with-cocoa root" and it builds fine. ROOT opens ok and root-config --has-python = true. However, root seems to be built against the system python and not the homebrew python. I can import ROOT from the system python but when I try with the homebrew version I get:
"Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6"
Do you have any ideas?
Comment № 9 originally by Alex Pearce at 2014-01-28 10:59:28 UTC, replying to a comment by Espen at 2014-01-28 10:56:41 UTC.
Hi Espen. I assume you've tried using the --std=env option that Juanan suggests? If you have and PyROOT still isn't working, try installing Python with Homebrew (brew install python) and then try to reinstall ROOT (remove first with brew uninstall root).
Comment № 10 originally by Espen at 2014-01-28 18:02:54 UTC, replying to a comment by Alex Pearce at 2014-01-28 10:59:28 UTC.
Hi Alex,
In the end I got it to work by adding the following lines to the recipe:
"--with-python-incdir=/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/Headers",
"--with-python-libdir=/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib",
Now it seems to work perfectly.
Comment № 11 originally by Alex Pearce at 2014-01-28 18:03:39 UTC, replying to a comment by Espen at 2014-01-28 18:02:54 UTC.
Strange you had to go to these lengths. But still, glad you got it working.
Comment № 12 originally by André at 2014-02-15 03:05:29 UTC.
Hi Alex - thanks for the notes.
I am new to cmake. Trying to learn to use it from your example.
When I use ./configure, I have many --enable-fftw3 --enable-python etc. Do I understand correctly, when using cmake, I can add ``-Dfftw3=ON'' etc for each thing I would have enabled?
What I don't see from your example is how to set a library path. For example, with the ./configure set up, I would have added ``--with-fftw3-incdir=/usr/local/Cellar/fftw/3.3.3/include''. I have been trying to google how to do this, so far without success. Any tips would be appreciated.
Comment № 13 originally by Alex Pearce at 2014-02-15 12:46:22 UTC, replying to a comment by André at 2014-02-15 03:05:29 UTC.
Hi André. I'm not familiar with that option. Unless you have a specific reason to want to use cmake, you may as well just go with make, or Homebrew, if you know that works for you.
Comment № 14 originally by André at 2014-02-15 16:19:31 UTC, replying to a comment by Alex Pearce at 2014-02-15 12:46:22 UTC.
Hi Alex, The problem I am currently having is none of my options are working (make by hand with configure, homebrew or cmake). They all seem to be having the same or similar problems. For example, the cmake try exits with
Linking CXX shared library ../lib/libCore.so
Undefined symbols for architecture x86_64:
"ROOT::GenerateInitInstance(std::__1::basic_string<char, std::__1::char_traits
__GLOBAL__I_a in String.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)
make[2]: *** [lib/libCore.so] Error 1
when I try Homebrew or by hand, it is the same general error (ld: symbol(s) not found for architecture x86_64) but complains about "libAfterimage.a". The mac I am building on has a clean install of mavericks (no account migration). So I can't see where I have gone wrong (I have kept to using only Homebrew to get my software, and then the pip which ships with my homebrewed python to get the python libs).
Comment № 15 originally by André at 2014-02-16 02:44:25 UTC, replying to a comment by André at 2014-02-15 16:19:31 UTC.
To answer my own question - unbeknownst to me initially, I accidentally had 2 gfortrans installed by homebrew:
/usr/local/Cellar/gfortran/4.8.2/bin/gfortran
/usr/local/Cellar/gcc48/4.8.2/bin/gfortran-4.8
I can not say for sure this was the problem, but after removing the standalone gfortran, and recompiling the gcc48 with fortran, everything worked. What is confusing is the standalone and gcc fortrans seemed to be the same. The standalone however, requires 4 extra libraries, and I guess one of those was missing the x86_64 symbols.
Comment № 16 originally by Alex Pearce at 2014-02-21 10:36:28 UTC, replying to a comment by André at 2014-02-16 02:44:25 UTC.
Glad you solved it. Thanks for reporting the fix!
Comment № 17 originally by Enrico at 2014-03-29 16:42:09 UTC.
I compiled typing:
$ make
and it displays some lines with percentage and some paths. It just stops at 28% and then it says:
error: out-of-line definition of 'Chisquare' does not match any declaration in 'TGraph'
Double_t TGraph::Chisquare(const TF1 *f1) const
^~~~~
1 error generated.
make[2]: [hist/hist/CMakeFiles/Hist.dir/src/TGraph.cxx.o] Error 1
make[1]: [hist/hist/CMakeFiles/Hist.dir/all] Error 2
make: *** [all] Error 2
What am I supposed to do?
Comment № 18 originally by Alex Pearce at 2014-03-30 17:15:36 UTC, replying to a comment by Enrico at 2014-03-29 16:42:09 UTC.
Hi Enrico. I'm not sure what you're supposed to do, I've not seen this error message before.
Have you tried the Homebrew approach?
Comment № 19 originally by Alberto at 2014-04-01 10:26:42 UTC.
Dear Alex,
Thanks for this guide first, I have been struggling quite a lot with compilation problems with older versions of root in my mac os mavericks machine.
That is way I decided to start a fresh installation using homebrew as you suggest in this guide..
However, I couldn't get much further away with the root installation. I get an error rather at the beginning of the root configuration part:
So, it seems that I do not have the OSX SDK libraries to compile root with the Cocoa backend.
I couldn't install the command line tools with the 'xcode-select --install' trick. It certainly pops up a windows to install it, but then it complains that it cannot find the software.
Anyway I already have the Command line Tools installed and updated to the March 10th 2014 version.
If I type for instance g++ -v, I get the following:
[Behemoth] ~ $> g++ -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
However I cannot find any trail of the SDK libraries needed for the Cocoa thing in my system.
Does it mean that one needs to install the whole Xcode suite to get the SDK on the Mac?
I thought that we only needed the Command Line Tools.
Have you ever experienced this problem?
Thanks in advance, Alberto
Comment № 20 originally by Alex Pearce at 2014-04-01 10:53:24 UTC, replying to a comment by Alberto at 2014-04-01 10:26:42 UTC.
Hi Alberto,
I've not seen this problem before, no. I would install Xcode and see if that helps.
Comment № 21 originally by Alberto at 2014-04-01 11:01:10 UTC, replying to a comment by Alex Pearce at 2014-04-01 10:53:24 UTC.
Hello!
But, do you have the whole Xcode installed and/or the SDK in here: /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
??
Cheers.
Comment № 22 originally by Alberto at 2014-04-01 11:24:55 UTC, replying to a comment by Alberto at 2014-04-01 11:01:10 UTC.
OK. I installed XCode 5.1 and now it seems to work.
The root installation didn't finish yet, but at least I got rid of the previous complaint.
What I do not like is that I had to install the whole XCode package (>2GB) only for this, while before one just needed the Command Line Tools.
Has anybody installed ROOT with Cocoa only with the Command Line Tools? I guess that would require a manual installation of the SDK package...
Comment № 23 originally by Alex Pearce at 2014-04-01 11:36:03 UTC, replying to a comment by Alberto at 2014-04-01 11:24:55 UTC.
I agree, XCode is a bulky install if you only need a few things from it. I suppose if you don't want ROOT with Cocoa, you might not need the SDKs. (But I think having Cocoa is worth the install.)
Comment № 24 originally by Alberto at 2014-04-01 14:16:14 UTC, replying to a comment by Alex Pearce at 2014-04-01 11:36:03 UTC.
Yes, I am going to leave it like it is now, i.e. XCode 5.1 fully installed and root from homebrew with cocoa support. Thanks!
Comment № 25 originally by Mario at 2014-05-07 08:18:29 UTC.
Hi Alex, while installing root via homebrew i see these lines:
==> Patching
patching file graf2d/asimage/src/libAfterImage/configure
==> ./configure macosx64 --all --enable-builtin-glew --enable-cocoa --disable-qt
==> make
==> make install
==> Caveats
Because ROOT depends on several installation-dependent
environment variables to function properly, you should
add the following commands to your shell initialization
script (.bashrc/.profile/etc.), or call them directly
before using ROOT.
For csh/tcsh users:
source brew --prefix root
/libexec/thisroot.csh
For bash/zsh users:
. $(brew --prefix root)/libexec/thisroot.sh
Error: The brew link
step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using:
brew link root
Possible conflicting files are:
==> Summary
🍺 /usr/local/Cellar/root/5.34.18: 5793 files, 205M, built in 18.1 minutes
What shuold i do?
(sorry for my english, i'm italian)
Comment № 26 originally by Alex Pearce at 2014-05-07 09:27:15 UTC, replying to a comment by Mario at 2014-05-07 08:18:29 UTC.
Hi Mario,
The brew link step is trying to create a symbolic link (an alias, like a shortcut) from the installation directory to Homebrew's ‘prefix’ directory.
It looks like there’s something already there though, and Homebrew won't overwrite it unless you ask it to explicitly. Perhaps you have an older version of ROOT already installed?
You can do brew info root to see what version(s) you have. The simplest solution is to uninstall all versions with brew uninstall --force root, and then reinstall the version you’re after.
If you’re sure you only have one version, you can just retry the link step, as instructed, with brew link root. Failing that, force the link with brew link --overwrite root. (But be careful, Homebrew shows you warnings for a reason!)
Comment № 27 originally by Mario at 2014-05-07 10:30:17 UTC, replying to a comment by Alex Pearce at 2014-05-07 09:27:15 UTC.
using brew info root i see only one version of root, so i uninstall and reinstall it but there's the same problem, also using brew link root and brew link --overwrite root the problem persists
Comment № 28 originally by Alex Pearce at 2014-05-07 10:32:08 UTC, replying to a comment by Mario at 2014-05-07 10:30:17 UTC.
What output do you see running the brew link steps?
Comment № 29 originally by Mario at 2014-05-07 10:34:44 UTC, replying to a comment by Alex Pearce at 2014-05-07 10:32:08 UTC.
mbp-di-mario:~ Mario$ brew link root
Linking /usr/local/Cellar/root/5.34.18...
Error: Could not symlink share/emacs/site-lisp/root-help.el
/usr/local/share/emacs/site-lisp is not writable.
mbp-di-mario:~ Mario$ brew link --overwrite root
Linking /usr/local/Cellar/root/5.34.18...
Error: Could not symlink share/emacs/site-lisp/root-help.el
/usr/local/share/emacs/site-lisp is not writable.
Comment № 30 originally by Alex Pearce at 2014-05-07 10:36:07 UTC, replying to a comment by Mario at 2014-05-07 10:34:44 UTC.
It looks like you have a permissions problem; the /usr/local/share/emacs/site-lisp directory should be writable by you (the user running brew). What’s the output of brew doctor?
Comment № 31 originally by Mario at 2014-05-07 10:38:08 UTC, replying to a comment by Alex Pearce at 2014-05-07 10:36:07 UTC.
mbp-di-mario:~ Mario$ brew doctor
Warning: Some directories in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably chown
them:
/usr/local/share/man/de
/usr/local/share/man/de/man1
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run brew link
on these:
root
Comment № 32 originally by Alex Pearce at 2014-05-07 10:43:31 UTC, replying to a comment by Mario at 2014-05-07 10:38:08 UTC.
OK, brew doctor is telling you there’s a problem. Homebrew can’t promise to run correctly if brew doctor reports problems. The output gives advice for fixing this one, you can become the owner of the directory so that you can write to it. Something like chown -R whoami
/user/local/share/man.
Comment № 33 originally by Mario at 2014-05-07 11:09:16 UTC, replying to a comment by Alex Pearce at 2014-05-07 10:43:31 UTC.
mbp-di-mario:~ Mario$ chown -R whoami
/usr/local/share/man
chown: /usr/local/share/man/de/man1/dvipdf.1: Operation not permitted
chown: /usr/local/share/man/de/man1/font2c.1: Operation not permitted
chown: /usr/local/share/man/de/man1/gsnd.1: Operation not permitted
chown: /usr/local/share/man/de/man1/pdf2dsc.1: Operation not permitted
and it continues in this way for all files of the directory...
do you know if it's possible to force 'chown'?
(I'm sorry for making you waste time)
Comment № 34 originally by Alex Pearce at 2014-05-07 12:15:20 UTC, replying to a comment by Mario at 2014-05-07 11:09:16 UTC.
No problem! If you're the administrator of the machine, you can prepend the command with sudo.
Comment № 35 originally by Mario at 2014-05-07 16:53:14 UTC, replying to a comment by Alex Pearce at 2014-05-07 12:15:20 UTC.
Ok! Finally it works! Thanks!
Comment № 36 originally by Win at 2014-05-22 21:03:55 UTC.
I had been trying to install root the whole day today! Now it finally works! Thank you very much!
Comment № 37 originally by Zephnia Mukwa at 2014-06-02 13:09:55 UTC.
Hello Alex!
How can I use Cmake to install Cern.ROOT version 6.00.00 on Mavericks? It seems the usual ./configure; make; make install does not work.Homebrew does not yet recognise ROOT6 released two days ago.
Comment № 38 originally by Alex Pearce at 2014-06-02 16:38:29 UTC, replying to a comment by Zephnia Mukwa at 2014-06-02 13:09:55 UTC.
Hi Zephnia. I'm able to install ROOT v6.00.00 on OS X with CMake. I installed it as described in the post, but I did get an error about typeinfo. After uninstalling my GCC install (brew uninstall gcc) the compilation worked.
I think the problem was something to do with the configuration step getting confused about typeinfo headers provided by both Clang and GCC. Removing GCC removes the ambiguity.
Comment № 39 originally by Zephnia Mukwa at 2014-06-03 16:39:04 UTC, replying to a comment by Alex Pearce at 2014-06-02 16:38:29 UTC.
Hi Alex!
First, thanks a lot for the advice but there seems to be a problem still about.I followed your tutorial on Mavericks and used Cmake to compile and it did succeed halfway though.There is a complaint about "stdard.h" missing or something and there is Unix Signals.inc .Here they are:
1.[ 0%] Building C object core/clib/CMakeFiles/Clib.dir/src/snprintf.c.o
/usr/local/root/src/core/clib/src/snprintf.c:31:10: fatal error: 'stdarg.h' file not found
2./usr/local/root/src/interpreter/llvm/src/lib/Support/Unix/Signals.inc:339:5: error: unknown type name 'mach_port_t'
mach_port_t self = mach_task_self();
^
/usr/local/root/src/interpreter/llvm/src/lib/Support/Unix/Signals.inc:339:24: error: use of undeclared identifier 'mach_task_self'
mach_port_t self = mach_task_self();
^
/usr/local/root/src/interpreter/llvm/src/lib/Support/Unix/Signals.inc:341:5: error: unknown type name 'exception_mask_t'
exception_mask_t mask = EXC_MASK_CRASH;
^
/usr/local/root/src/interpreter/llvm/src/lib/Support/Unix/Signals.inc:341:29: error: use of undeclared identifier 'EXC_MASK_CRASH'
exception_mask_t mask = EXC_MASK_CRASH;
^
/usr/local/root/src/interpreter/llvm/src/lib/Support/Unix/Signals.inc:343:5: error: unknown type name 'kern_return_t'
kern_return_t ret = task_set_exception_ports(self,
^
5 errors generated.
make[5]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o] Error 1
make[4]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2
make[3]: *** [all] Error 2
Comment № 40 originally by fernandotta at 2014-06-04 22:06:03 UTC.
Ok, so I did $ brew tap homebrew/science, and when I do $ brew install --with-cocoa root
I get
Error: No available formula for root
Searching taps...
and then I have my prompt again. Please help
Comment № 41 originally by Alex Pearce at 2014-06-05 12:09:58 UTC, replying to a comment by fernandotta at 2014-06-04 22:06:03 UTC.
That is strange. Did brew tap give you any error messages? Does the command brew doctor give you any output?
Comment № 42 originally by fernandotta at 2014-06-05 13:30:40 UTC, replying to a comment by Alex Pearce at 2014-06-05 12:09:58 UTC.
Hey, thanks for the response! No, I didn't get an error message. When I try it again it says it's already been tapped.
I couldn't resolve the issue so I just used macports, thanks though.
Comment № 43 originally by dani at 2014-09-23 00:12:04 UTC.
Hi tim
Thank you vrey much for the guide
I have a stupid question, when the installation is finished, what do I have to do next?
because I have this problem
$ brew install root
Warning: root-5.34.20 already installed, it's just not linked
How can I linked?
Comment № 44 originally by Alex Pearce at 2014-09-23 07:26:25 UTC, replying to a comment by dani at 2014-09-23 00:12:04 UTC.
Hi Dani, you could try running ROOT (with root) to see if the installation worked. If so, you're done, otherwise you could run brew link root and try again.
Comment № 45 originally by dani at 2014-09-23 21:49:19 UTC, replying to a comment by Alex Pearce at 2014-09-23 07:26:25 UTC.
Thank you but it didn't work
I finally installed using the "compiling" way
I don't know if I installed 2 ROOTs in different places, since I install root in the 2 different way
I would like to check and eliminated the unnecesary installation, do you know how to do it?
Thank you for your answer
Comment № 46 originally by Alex Pearce at 2014-09-24 09:02:34 UTC, replying to a comment by dani at 2014-09-23 21:49:19 UTC.
If you installed ROOT using Homebrew, you can uninstall it with brew uninstall root. If you installed ROOT by compiling it, you can just delete the directory it lives in.
Comment № 47 originally by Dennis at 2014-12-05 09:00:47 UTC.
Thank you so so much! This article is seriously amazing. Goes through the steps in much detail and it doesn't assume you know anything.
Comment № 48 originally by Ting at 2015-03-26 02:46:11 UTC.
Could someone help me with these stupid questions. I don't remember how I resolved them when I installed last time, but I do end up spend a very long time on there problems:
-./configure: No such file or directory
-cmake: does not appear to contain CMakeLists.txt.
Comment № 49 originally by Alex Pearce at 2015-03-26 08:18:47 UTC, replying to a comment by Ting at 2015-03-26 02:46:11 UTC.
Hi Ting, I would recommend installing ROOT with Homebrew. If you would prefer to use CMake, what command are you executing to produce these error messages?
Comment № 50 originally by Ting at 2015-03-26 17:40:54 UTC, replying to a comment by Alex Pearce at 2015-03-26 08:18:47 UTC.
Hello Alex, thank for replying and I apologize for my rudeness after frustration.
My problem is simply that I downloaded the binary files. That's really dumb of me, should have realized that as soon as I see missing configure.exe and CMakeLists.txt. I suppose I am used to the formate of other downloading webpages and ctrl find "OS X".
The homebrew method does successfully install root 5.34 on Yosemite. Thank you very much for the quick tip, such that I don't have to externally include fftw. Really appreciate it.
Comment thread for post ROOT on OS X 10.9 Mavericks.
Comments made before 18 February 2021 were imported from Disqus using an import script. The datetimes and authors of the imported comments do not reflect the values of the original comments.