Hi All,
I upgraded my Mac to Mountain Lion not too long ago.
I would like to build and use root 5.34/02 on it but
I’m having trouble. The distribution builds after
running config with this
./configure macosx --enable-roofit --disable-xrootd
with no errors as far as I can tell. I then set up
the environment in my tcsh by doing
source bin/thisroot.csh
When I try to load and compile anything, I get tons
of warnings and errors. Here’s a trivial piece of
code for example in a file called roottest.c
=================================
#include "TH1F.h"
void roottest() {
TH1F* htest = new TH1F(“htest”,“test hist”, 10, 0., 10. ) ;
htest->Draw() ;
}
When I try to load it, this is what I get:
root [0] .L roottest.c+
Info in TUnixSystem::ACLiC: creating shared library /Users/owen/work/cms/hadronic-susy-bjets/UserCode/SusyAnalysis/RA2b/Statistics/3Dcode/./roottest_c.so
Note: File “/root_v5.34.02.source/root-bad2/lib/libThread.so” already loaded
Note: File “/root_v5.34.02.source/root-bad2/lib/libRIO.so” already loaded
Note: File “/root_v5.34.02.source/root-bad2/lib/libThread.so” already loaded
Note: File “/root_v5.34.02.source/root-bad2/lib/libMathCore.so” already loaded
Note: File “/root_v5.34.02.source/root-bad2/lib/libMathCore.so” already loaded
Note: File “/root_v5.34.02.source/root-bad2/lib/libMathCore.so” already loaded
Note: File “/root_v5.34.02.source/root-bad2/lib/libMathCore.so” already loaded
Note: File “/root_v5.34.02.source/root-bad2/lib/libMatrix.so” already loaded
Note: File “/root_v5.34.02.source/root-bad2/lib/libMathCore.so” already loaded
Undefined symbols for architecture i386:
“TH1F::TH1F(char const*, char const*, int, double, double)”, referenced from:
roottest() in roottest_c_ACLiC_dict.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in : Compilation failed!
root [1]
Needless to say, when I load something nontrivial I get many more "already loaded"
warnings and undefined symbols for all of the root classes used in the code.
It looks like something very basic in my setup is wrong, but I can’t find
the problem. Any help would be appreciated. I’ve been running root on
my macs for years with no trouble. I’m not a big fan of Mountain Lion.
It was a downgrade in my opinion.
Here are some details of my setup, in case any of this is relevant.
I’m at CERN this week and next, so if there’s an expert here that
can help by looking at the laptop, I’d be happy to set up a time
and bring it to you, if that would be easier than exchanging emails.
Thanks,
Owen
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Root distribution: root_v5.34.02.source.tar
Hardware: MacBook Pro, 2.4 GHZ Intel Core i5
Operating system: OS X, Version 10.8.2
XQuartz 2.7.3 (xorg-server 1.12.4)
Xcode: Version 4.5.1 (4G1004)
clang -v
Apple clang version 4.0 (tags/Apple/clang-421.0.60) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
uname -a
Darwin pb-d-128-141-230-236.cern.ch 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
Output of printenv in tcsh after sourcing bin/thisroot.csh
REMOTEHOST=
TERM=xterm-color
HOST=pb-d-128-141-230-236.cern.ch
SHELL=/bin/tcsh
CLICOLOR=yes
TMPDIR=/var/folders/nl/wf200gv16bvc97970ljy0scr0000gn/T/
Apple_PubSub_Socket_Render=/tmp/launch-l06yHr/Render
CVSROOT=:ext:owen@cmssw.cvs.cern.ch:/local/reps/CMSSW
SVN_EDITOR=vim
GROUP=staff
USER=owen
COMMAND_MODE=unix2003
HOSTTYPE=intel-mac
SSH_AUTH_SOCK=/tmp/launch-yyxiqH/Listeners
Apple_Ubiquity_Message=/tmp/launch-v7X7A8/Apple_Ubiquity_Message
__CF_USER_TEXT_ENCODING=0x1F5:0:0
LSCOLORS=ExGxFxdxCxDxDxhbadExEx
PATH=/root_v5.34.02.source/root/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin/:/usr/local/bin:/Users/owen/bin:/Users/owen/perl:/opt/local/bin:/usr/X11R6/bin:/Users/owen/work/cms/tdr-svn/utils/trunk:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/opt/X11/bin:/usr/texbin/:/usr/local/bin:/Users/owen/bin:/Users/owen/perl:/opt/local/bin:/usr/X11R6/bin:/Users/owen/work/cms/tdr-svn/utils/trunk:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/usr/texbin/:/usr/local/bin:/Users/owen/bin:/Users/owen/perl:/opt/local/bin:/usr/X11R6/bin:/Users/owen/work/cms/tdr-svn/utils/trunk:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
PWD=/root_v5.34.02.source/root
TEXINPUTS=/Users/owen/latex//:
HOME=/Users/owen
SHLVL=5
OSTYPE=darwin
VENDOR=apple
MACHTYPE=x86_64
LOGNAME=owen
CVS_RSH=ssh
DISPLAY=/tmp/launch-27QxhB/org.macosforge.xquartz:0
X11_PREFS_DOMAIN=org.macosforge.xquartz.X11
_=/opt/X11/bin/xterm
WINDOWID=18874381
XTERM_VERSION=XTerm(281)
XTERM_LOCALE=C
XTERM_SHELL=/bin/tcsh
ROOTSYS=/root_v5.34.02.source/root
LD_LIBRARY_PATH=/root_v5.34.02.source/root/lib
DYLD_LIBRARY_PATH=/root_v5.34.02.source/root/lib
SHLIB_PATH=/root_v5.34.02.source/root/lib
LIBPATH=/root_v5.34.02.source/root/lib
PYTHONPATH=/root_v5.34.02.source/root/lib
MANPATH=/root_v5.34.02.source/root/man:/opt/local/share/man:/usr/share/man:/usr/local/share/man:/opt/X11/share/man:/usr/texbin//man:/usr/X11R6/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man