Compiling Root 5.25 on OSX 10.5.8

Hi all,
I’m trying to compile root under my mac with debug mode on,
to see all messages present in ROOT code like :

00332 #ifdef DEBUG
00333    std::cout << "\n\nFit data size = " << n << std::endl;
00334    std::cout << "evaluate chi2 using function " << &func << "  " << p << std::endl; 
00335 #endif  [/code]

so [code]gcc -v[/code] gives me:

[code]Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)

but when i do:

(because without saying macosx I took my mac as a generic unix machine)

I get:

[code]Configuring for macosx
Checking for GNU Make version >= 3.79.1 … ok
Checking for C compiler … gcc
Checking for C++ compiler … g++
Checking for linker (LD) … g++
Checking for F77 compiler … gfortran
Checking for libX11 … /usr/X11R6/lib
Checking for X11/Xlib.h … /usr/include
Checking for X11/Xft/Xft.h … /usr/include
Checking for X11/extensions/shape.h … /usr/include
Checking for libXpm … /usr/X11R6/lib
Checking for libXft … /usr/X11R6/lib
Checking for libXext … /usr/X11R6/lib
Checking whether to build included libfreetype6 … yes
Checking whether to build included libftgl … yes
Checking whether to build included libpcre … yes
Checking whether to build included zlib … yes
Checking for ncurses.h, or curses.h … /usr/include
Checking for libncurses, or libcurses … /usr/lib
Checking for GL/gl.h … /usr/X11/include
Checking for libGL, or libMesaGL … /usr/X11R6/lib
Checking for libGLU, or libMesaGLU … /usr/X11R6/lib
Checking for GL/glew.h … no
Checking for libGLEW … no
Checking whether to build included GLEW … yes
Checking for mysql_config … not found
Checking for mysql.h … no
Checking for libmysqlclient_r, libmysqlclient, or mysqlclient … no
Checking for occi.h … no
Checking for libclntsh, or oci … no
Checking for libocci, or oraocci10 … no
Checking for libpq-fe.h … no
Checking for libpq … /usr/lib
Checking for sql.h … no
Checking for libsqlod … no
Checking for sqlext.h … /usr/include
Checking for libiodbc, libodbc, or odbc32 … /usr/lib
Checking for rfio_api.h … no
Checking for librfio, libshift, shiftmd, or shift … no
Checking for rfio_api.h … no
Checking for stager_api.h … no
Checking for libshift, shiftmd, or shift … no
Checking for gfal_api.h … no
Checking for libgfal … no
Checking for G4Navigator.hh … no
Checking for libG4navigation … no
Checking for CLHEP/Vector/Rotation.h … no
Checking for ApMon.h … no
Checking for libapmoncpp … no
Checking for fftw3.h … /usr/include
Checking for libfftw3, or libfftw3-3 … /usr/lib
Checking for gvc.h … no
Checking for libgvc … no
Checking for libPythia6 … no
Checking for Pythia.h … no
Checking for libpythia8 … no
Checking for dcap.h … no
Checking for libdcap … no
Checking for chirp_client.h … no
Checking for libchirp_client … no
Checking for libglite-api-wrapper … no
Checking for gapiUI.h … no
Checking for libgapiUI … no
Checking for jpeglib.h … no
Checking for png.h … no
Checking for tiffio.h … no
Checking for gif_lib.h … no
Checking for libjpeg … no
Checking for libtiff … no
Checking for libungif … no
Checking for libz … /usr/lib
Checking for libpng … no
Checking whether to build included libAfterImage … yes
Checking for ldap.h … /usr/include
Checking for libldap … /usr/lib
Checking for liblber … /usr/lib
Checking for Python.h … /System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
Checking for python2.5, libpython2.5, libpython, python, or Python … /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config
Checking for xml2-config … /usr/bin/xml2-config
Checking for libxml2 version >= 2.4.x … ok
Checking whether to build xrootd … yes
Checking for libssl … /usr/lib
Checking for libcrypto … /usr/lib
Checking for openssl/bio.h … /usr/include
Checking for openssl/blowfish.h … /usr/include
Checking for openssl/err.h … /usr/include
Checking for openssl/pem.h … /usr/include
Checking for openssl/rand.h … /usr/include
Checking for openssl/rsa.h … /usr/include
Checking for t_server.h … no
Checking for libsrp … no
Checking for libgmp … no
Checking for libmisc … no
Checking for pwauth.h … no
Checking for shadow passwords … no
Checking for gsl/gsl_version.h … /usr/local/include
Checking for GSL version >= 1.8 … ok
Checking for libgsl, gslML, or gsl … /usr/local/lib
Checking for libgslcblas, gslcblasML, gslcblas, or cblas … /usr/local/lib
Checking whether to build libMathMore … yes
Checking whether to build libGenVector … yes
Checking whether to build CINT5 … yes
Checking whether to build CINT7 … no
Checking whether to build libCintex … yes
Checking whether to build libReflex … yes
Checking whether to build libRooFit … no
Checking whether to build libMinuit2 … no
Checking whether to build libUnuran … no
Checking whether to build libGdml … no
Checking whether to build libTable … no
Checking whether to build libTMVA … yes
Checking whether to build libMemStat … yes
Checking for Clarens support … no
Checking for PEAC support … no
Generating cint dictionaries.
Writing config/Makefile.config … done
Writing config/Makefile.comp … done
Writing include/RConfigure.h … done
Writing include/RConfigOptions.h … done
Writing bin/root-config … done
Writing etc/system.rootrc … done
Writing etc/system.rootauthrc … done
Writing etc/system.rootdaemonrc … done
Writing etc/root.mimes … done
Writing etc/daemons/rootd.rc.d … done
Writing etc/daemons/rootd.xinetd … done
Writing etc/daemons/proofd.rc.d … done
Writing etc/daemons/proofd.xinetd … done
Writing etc/daemons/xrootd.rc.d … done
Writing etc/daemons/olbd.rc.d … done
Writing bin/memprobe … done
Writing build/misc/root-help.el … done
Writing macros/html.C … done
Writing bin/thisroot.sh … done
Writing bin/thisroot.csh … done
Writing bin/genreflex … done
Writing bin/genreflex-rootcint … done
Writing config.status … done

Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_ftgl, builtin_freetype, builtin_glew, builtin_pcre, builtin_zlib, cint5, cintex, editline, exceptions, fftw3, genvector, ldap, mathmore, memstat, odbc, opengl, python, reflex, rpath, shared, ssl, tmva, winrtdebug, xft, xml, xrootd.

To build ROOT type:

make[/code]

then when I do make again:
after a lot of passages that I skip:

ld: warning in cint/cint/src/dict/gcc4strm.o, file is not of required architecture ld: warning in cint/cint/src/dict/longif3.o, file is not of required architecture ==> lib/libCint.so done bin/rmkdepend -R -fcint/cint/src/loadfile_tmp.d -Y -w 1000 -- -m32 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__STD_EXCEPTION -D__DARWIN_UNIX03=1 -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY -Icint/cint/inc -Icint/cint/src -Icint/cint/src/dict -D_REENTRANT -pthread -UR__HAVE_CONFIG -DROOTBUILD -I. -D__cplusplus -- cint/cint/src/loadfile_tmp.cxx g++ -g -m32 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__STD_EXCEPTION -D__DARWIN_UNIX03=1 -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY -Icint/cint/inc -Icint/cint/src -Icint/cint/src/dict -D_REENTRANT -pthread -UR__HAVE_CONFIG -DROOTBUILD -I. -o cint/cint/src/loadfile_tmp.o -c cint/cint/src/loadfile_tmp.cxx g++ -g -m32 -o cint/cint/main/cint_tmp cint/cint/main/cppmain.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 ld: warning in cint/cint/main/cppmain.o, file is not of required architecture ld: warning in cint/cint/src/dict/gcc4strm.o, file is not of required architecture ld: warning in cint/cint/src/dict/longif3.o, file is not of required architecture Undefined symbols: "_main", referenced from: start in crt1.10.5.o "_G__cpp_setupG__stream", referenced from: _G__pragma in pragma.o "_G__unredirectcerr", referenced from: _G__process_cmd in pause.o _G__process_cmd in pause.o "_G__unredirectcout", referenced from: _G__process_cmd in pause.o _G__process_cmd in pause.o "_G__redirectcerr", referenced from: _G__process_cmd in pause.o _G__process_cmd in pause.o "_G__redirectcout", referenced from: _G__process_cmd in pause.o _G__process_cmd in pause.o ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [cint/cint/main/cint_tmp] Error 1

Any guess ?

Thanks a lot for your help

Hi,

[quote]ld: warning in cint/cint/main/cppmain.o, file is not of required architecture
ld: warning in cint/cint/src/dict/gcc4strm.o, file is not of required architecture
ld: warning in cint/cint/src/dict/longif3.o, file is not of required architecture
[/quote]This means that these source have been build previously for a different machine/architecture ( 32bit vs 64bits for example).

Try ‘make distclean; make;’

Cheers,
Philippe.

Now works flawlessly !

Thanks a lot