Compiling trunk ROOT w/ Mac OS X 10.6 gcc 4.2.1

hi,

I have Snow Leopard Mac OS X 10.6 with gcc 4.2.1 installed

Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5646~6/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5646)

and checked out trunk version of ROOT and after ‘./configure’ and make I get the following linker error:

g++ -O2 -m64 -o bin/rootcint core/utils/src/rootcint.o core/utils/src/RStl.o core/metautils/src/RConversionRuleParser.o core/metautils/src/TClassEdit.o \
		   -Llib -lCint -lm -Wl,-rpath,@loader_path/../lib   -ldl
ld: warning: in /usr/lib/libCint.dylib, file is not of required architecture
Undefined symbols:
  "Cint::G__DataMemberInfo::Name()", referenced from:
      GrabIndex(Cint::G__DataMemberInfo&, int)  in rootcint.o
      GrabIndex(Cint::G__DataMemberInfo&, int)  in rootcint.o
      STLStringStreamer(Cint::G__DataMemberInfo&, int)   in rootcint.o
      STLStringStreamer(Cint::G__DataMemberInfo&, int)   in rootcint.o

After some investigation (thanks to Attila) we have found that in the $ROOTSYS/lib folder there is an “libCint.so” file and not a libCint.dylib and that may be the problem that make doesn’t searches for *.so files there?

Thanks for help,
Balint

What is you exact ./configure statement? Do you happen to also have a usr/lib/libCint.dylib on your machine?

Cheers, Fons.

No I don’t have any ‘Cint’ file in /usr/lib/

~/Prog/Test$ find /usr/lib -name '*Cint*'
~/Prog/Test$

I did the following (I haven’t set yet ROOTSYS to anything but I checked that it is empty, if I set it to point to anything the same problem remains, also LD_LIBRARY_PATH is empty):

~/Prog/Test$ svn co http://root.cern.ch/svn/root/trunk root
...
~/Prog/Test$ cd root/
~/Prog/Test/root$ ./configure
~/Prog/Test/root$ ./configure
Configuring for macosx64
Checking for GNU Make version >= 3.79.1 ... ok
Checking for C compiler ... gcc
Checking for C++ compiler ... g++
Checking for linker (LD) ... g++
...
Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_ftgl, builtin_freetype, builtin_glew, builtin_pcre, builtin_zlib, cint5, cintex, exceptions, genvector, ldap, mathmore, memstat, odbc, opengl, python, reflex, rpath, shared, ssl, xft, xml, xrootd.

To build ROOT type:

   make

~/Prog/Test/root$ make
...
g++ -O2 -m64 -o core/utils/src/rootcint_tmp \
		   core/utils/src/rootcint_tmp.o core/utils/src/RStl_tmp.o core/metautils/src/RConversionRuleParser.o core/metautils/src/TClassEdit.o cint/cint/src/g__cfunc.o cint/cint/main/G__setup.o cint/cint/src/Api.o cint/cint/src/BaseCls.o cint/cint/src/CallFunc.o cint/cint/src/Class.o cint/cint/src/DataMbr.o cint/cint/src/FastAllocString.o cint/cint/src/Method.o cint/cint/src/MethodAr.o cint/cint/src/Shadow.o cint/cint/src/Token.o cint/cint/src/Type.o cint/cint/src/Typedf.o cint/cint/src/auxu.o cint/cint/src/bc_assign.o cint/cint/src/bc_autoobj.o cint/cint/src/bc_cfunc.o cint/cint/src/bc_debug.o cint/cint/src/bc_eh.o cint/cint/src/bc_exec.o cint/cint/src/bc_inst.o cint/cint/src/bc_item.o cint/cint/src/bc_parse.o cint/cint/src/bc_reader.o cint/cint/src/bc_type.o cint/cint/src/bc_vtbl.o cint/cint/src/cast.o cint/cint/src/debug.o cint/cint/src/decl.o cint/cint/src/disp.o cint/cint/src/dump.o cint/cint/src/end.o cint/cint/src/error.o cint/cint/src/expr.o cint/cint/src/fread.o cint/cint/src/func.o cint/cint/src/gcoll.o cint/cint/src/global1.o cint/cint/src/global2.o cint/cint/src/ifunc.o cint/cint/src/inherit.o cint/cint/src/init.o cint/cint/src/input.o cint/cint/src/intrpt.o cint/cint/src/loadfile_tmp.o cint/cint/src/macro.o cint/cint/src/malloc.o cint/cint/src/memtest.o cint/cint/src/new.o cint/cint/src/newlink.o cint/cint/src/oldlink.o cint/cint/src/opr.o cint/cint/src/parse.o cint/cint/src/pause.o cint/cint/src/pcode.o cint/cint/src/pragma.o cint/cint/src/quote.o cint/cint/src/random.o cint/cint/src/rflx_gendict.o cint/cint/src/rflx_gensrc.o cint/cint/src/rflx_tools.o cint/cint/src/scrupto.o cint/cint/src/shl.o cint/cint/src/sizeof.o cint/cint/src/struct.o cint/cint/src/stub.o cint/cint/src/tmplt.o cint/cint/src/typedef.o cint/cint/src/val2a.o cint/cint/src/value.o cint/cint/src/var.o cint/cint/src/dict/Apiif.o cint/cint/src/dict/stdstrct.o cint/cint/src/dict/gcc4strm.o cint/cint/src/dict/longif3.o  -lm -Wl,-rpath,@loader_path/../lib   -ldl
bin/rmkdepend -R -fcore/utils/src/rootcint.d -Y -w 1000 -- -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude   -D_REENTRANT -pthread -D__cplusplus -- core/utils/src/rootcint.cxx
g++ -O2 -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude   -D_REENTRANT -pthread  -o core/utils/src/rootcint.o -c core/utils/src/rootcint.cxx
bin/rmkdepend -R -fcore/utils/src/RStl.d -Y -w 1000 -- -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude   -D_REENTRANT -pthread -D__cplusplus -- core/utils/src/RStl.cxx
g++ -O2 -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude   -D_REENTRANT -pthread  -o core/utils/src/RStl.o -c core/utils/src/RStl.cxx
g++ -O2 -m64 -o bin/rootcint core/utils/src/rootcint.o core/utils/src/RStl.o core/metautils/src/RConversionRuleParser.o core/metautils/src/TClassEdit.o \
		   -Llib -lCint -lm -Wl,-rpath,@loader_path/../lib   -ldl
ld: warning: in /usr/lib/libCint.dylib, file is not of required architecture
Undefined symbols:
  "Cint::G__DataMemberInfo::Name()", referenced from:
      GrabIndex(Cint::G__DataMemberInfo&, int)  in rootcint.o
      GrabIndex(Cint::G__DataMemberInfo&, int)  in rootcint.o
      STLStringStreamer(Cint::G__DataMemberInfo&, int)   in rootcint.o
      STLStringStreamer(Cint::G__DataMemberInfo&, int)   in rootcint.o
      STLStringStreamer(Cint::G__DataMemberInfo&, int)   in rootcint.o
...

I can send the full log of the ‘configure’ and ‘make’, let me know.

Cheers,
Balint

Btw: If I create a softlink in cwd root/lib/ as:

lrwxr-xr-x  1 balintradics  staff       10 Aug 31 16:38 libCint.dylib -> libCint.so

so that it points to the local root/lib/libCint.so then the problem disappears and ROOT is built without any problem.

Cheers,
Balint

I am also trying to compile root on Snow Leopard (Mac OSX 10.6, gcc 4.2.1). I have run into an error with similar language to the one above, but have been unable to extend that solution to work in this case. Any suggestions you have would be appreciated. Thanks, -Brian

Here’s the eror:

Shuksan:root stein$ make

g++ -g -o bin/h2root main/src/h2root.o
-Llib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lMatrix -lMathCore -lThread lib/libminicern.so
/usr/local/lib/gcc/i386-apple-darwin8.10.1/4.3.0/…/…/…/libgfortran.dylib /usr/local/lib/gcc/i386-apple-darwin8.10.1/4.3.0/libgfortranbegin.a -lm -Wl,-rpath,/opt/new/lib -pthread -ldl
ld: warning: in /usr/local/lib/gcc/i386-apple-darwin8.10.1/4.3.0/…/…/…/libgfortran.dylib, file is not of required architecture
ld: warning: in /usr/local/lib/gcc/i386-apple-darwin8.10.1/4.3.0/libgfortranbegin.a, file is not of required architecture
Undefined symbols:
hgnf”, referenced from:
convert_rwn(int) in h2root.o
"hdcofl", referenced from:
convert_directory(char const*)in h2root.o
"zitoh", referenced from:
convert_directory(char const*)in h2root.o
"hntvar2", referenced from:
convert_cwn(int) in h2root.o
convert_cwn(int) in h2root.o
"pawc", referenced from:
_main in h2root.o
_main in h2root.o
"hi", referenced from:
convert_1d(int) in h2root.o
"hropen", referenced from:
_main in h2root.o
"hcdir", referenced from:
convert_directory(char const*)in h2root.o
convert_directory(char const*)in h2root.o
"quest", referenced from:
convert_directory(char const*)in h2root.o
convert_directory(char const*)in h2root.o
convert_directory(char const*)in h2root.o
convert_directory(char const*)in h2root.o
_main in h2root.o
"hlimit", referenced from:
_main in h2root.o
"hgnt", referenced from:
convert_cwn(int) in h2root.o
"hbnam", referenced from:
convert_cwn(int) in h2root.o
convert_cwn(int) in h2root.o
"rzcl", referenced from:
convert_directory(char const*)in h2root.o
convert_directory(char const*)in h2root.o
"rzink", referenced from:
convert_directory(char const*)in h2root.o
"hgnpar", referenced from:
convert_rwn(int) in h2root.o
"hgiven", referenced from:
convert_cwn(int) in h2root.o
convert_cwn(int) in h2root.o
convert_rwn(int) in h2root.o
convert_rwn(int) in h2root.o
"hnoent", referenced from:
convert_cwn(int) in h2root.o
convert_rwn(int) in h2root.o
convert_profile(int) in h2root.o
convert_2d(int) in h2root.o
convert_1d(int) in h2root.o
"hie", referenced from:
convert_1d(int) in h2root.o
"hif", referenced from:
convert_1d(int) in h2root.o
"hdelet", referenced from:
convert_directory(char const*)in h2root.o
convert_directory(char const*)in h2root.o
convert_directory(char const*)in h2root.o
convert_directory(char const*)in h2root.o
"hrin", referenced from:
convert_directory(char const*)in h2root.o
"hcbits", referenced from:
convert_1d(int) in h2root.o
convert_1d(int) in h2root.o
convert_1d(int) in h2root.o
convert_1d(int) in h2root.o
convert_1d(int) in h2root.o
convert_1d(int) in h2root.o
convert_directory(char const*)in h2root.o
convert_directory(char const*)in h2root.o
convert_directory(char const*)in h2root.o
convert_directory(char const*)in h2root.o
convert_directory(char const*)in h2root.o
convert_directory(char const*)in h2root.o
"hij", referenced from:
convert_2d(int) in h2root.o
"uhtoc", referenced from:
convert_directory(char const*)in h2root.o
"hije", referenced from:
convert_2d(int) in h2root.o
"hijxy", referenced from:
convert_2d(int) in h2root.o
"hcbook", referenced from:
convert_directory(char const*)in h2root.o
"hgive", referenced from:
convert_profile(int) in h2root.o
convert_2d(int) in h2root.o
convert_1d(int) in h2root.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [bin/h2root] Error 1

Please install gfortran (part of gcc 4.4.1) from Fink. Use the new Fink for 10.6, see: finkproject.org/.

Btw, I still cannot reproduce the /usr/lib/libCint.dylib, file is not of required architecture, issue. The error indicates that there lingers around an older version of libCint.dylib on this system.

Cheers, Fons.

Is there instead a way to disable that feature as I don’t use the paw tools which it complies? I know there used to be an option, but I could not find one in this version (5.24.00).

There will be no paw tools compiled when you install gfortran.

Cheers, Fons.

My mistake, thanks for the help though. I got it compiled and running. -Brian

Hi,

just to finish this thread: using a completely clean setup and checking
out root-5.24 from svn root it compiled+linked without problem. Must’ve been some problem with my environment.

Cheers,
Balint

P.S.: I have just read that by default, on 64 bit architecture Macs, Snow Leopard boots still to the 32 bit kernel. To enable the 64 bit kernel one
needs to “hold down” the ‘6’ and ‘4’ during booting:

osxdaily.com/2009/09/10/force-sn … it-kernel/

not sure if this has an effect on ROOT things but i thought i mention it, and so then my kernel in this case was 32 bit:

uname -a
Darwin pb-d-128-141-28-138.cern.ch 10.0.0 Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386 i386