Root (trunk) on mac os x 10.5.2 problem

Hi,

I am trying to use root on my mac intel. I use the trunk version of root and the system is in version 10.5.2.

I did ./configure macosx64 and I can launch root and use tutorials without problem. But when I try to compile a small project that I developed on Linux, then I get the following error :

ld: warning in /local/root/lib/libCore.so, file is not of required architecture
ld: warning in /local/root/lib/libCint.so, file is not of required architecture
ld: warning in /local/root/lib/libRIO.so, file is not of required architecture
ld: warning in /local/root/lib/libNet.so, file is not of required architecture
ld: warning in /local/root/lib/libHist.so, file is not of required architecture
ld: warning in /local/root/lib/libGraf.so, file is not of required architecture
ld: warning in /local/root/lib/libGraf3d.so, file is not of required architecture
ld: warning in /local/root/lib/libGpad.so, file is not of required architecture
ld: warning in /local/root/lib/libTree.so, file is not of required architecture
ld: warning in /local/root/lib/libRint.so, file is not of required architecture
ld: warning in /local/root/lib/libPostscript.so, file is not of required architecture
ld: warning in /local/root/lib/libMatrix.so, file is not of required architecture
ld: warning in /local/root/lib/libPhysics.so, file is not of required architecture
ld: warning in /local/root/lib/libMathCore.so, file is not of required architecture
ld: warning in /local/root/lib/libGui.so, file is not of required architecture
ld: warning in /local/root/lib/libEve.so, file is not of required architecture
ld: warning in /local/root/lib/libTreePlayer.so, file is not of required architecture
ld: warning in /local/root/lib/libGeom.so, file is not of required architecture
ld: warning in /local/root/lib/libRGL.so, file is not of required architecture
ld: warning in /local/root/lib/libGed.so, file is not of required architecture
ld: warning in /local/root/lib/libEG.so, file is not of required architecture
ld: warning in MyDict.o, file is not of required architecture
ld: warning in TAmoreObject.o, file is not of required architecture
ld: warning in MockAmoreProvider.o, file is not of required architecture
ld: warning in AmorEveMain.o, file is not of required architecture
ld: warning in TAmoreObjectManager.o, file is not of required architecture
ld: warning in TAmoreFileBrowser.o, file is not of required architecture
ld: warning in VCanvasLayoutMaker.o, file is not of required architecture
ld: warning in SimpleLayoutMaker.o, file is not of required architecture
ld: warning in AmoreCanvasWrapper.o, file is not of required architecture
ld: warning in TAmoreCanvasPlugin.o, file is not of required architecture
Undefined symbols:
  "_main", referenced from:
      start in crt1.10.5.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [../main] Error 1
make: *** [all] Error 2

I thought maybe I was wrong using the macosx64 architecture. I tried simply macosx and then even root refused to start :

dyld: Library not loaded: /lib/libCint.so
  Referenced from: /local/root/bin/root.exe
  Reason: no suitable image found.  Did find:
	/local/root/lib/libCint.so: mach-o, but wrong architecture
	/local/root/lib/libCint.so: mach-o, but wrong architecture

What am I doing wrong ? Did I miss something ?

Thanks in advance

Barth

I tried to link with -m64 flag and it works better. I should have thought about that before.
Nevertheless, I still get one error message about libfreetype :

ld: warning in /usr/local/lib/libfreetype.dylib, file is not of required architecture

So I am still wondering if the macos64 architecture was the correct choice… and how to solve the problem with libfreetype…

Thanks for any help

Barth

I recompiled freetype but with -m64 flag (i changed unix-cc.mk) but I am not sure it was the right thing to do . Anyway , now my project compiles without warnings but when I try to launch it I get :

  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.19/03     12 March 2008   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

ROOT 5.19/03 (trunk@23330, mai 03 2008, 11:27:11 on macosx64)

CINT/ROOT C/C++ Interpreter version 5.16.29, Jan 08, 2008
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.

 *** Break *** segmentation violation
/Users/barth/programmation/cern/AmorEve/76828: No such file or directory.
Attaching to process 76828.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ........................................................................................................................ done
0x00007fff80108858 in wait4 ()

========== STACKS OF ALL THREADS ==========

Thread 2 (process 76828 thread 0x2307):
#0  0x00007fff800a8b5e in __semwait_signal ()
#1  0x00007fff800d0ce1 in _pthread_cond_wait ()
#2  0x00007fff82e5427b in glvmDoWork ()
#3  0x00007fff800cfec3 in _pthread_start ()
#4  0x00007fff800cfd85 in thread_start ()

Thread 1 (process 76828 thread 0x807):
#0  0x00007fff80108858 in wait4 ()
#1  0x00007fff801258fb in system ()
#2  0x00000001001644aa in TUnixSystem::StackTrace ()
#3  0x000000010016720d in TUnixSystem::DispatchSignals ()
#4  0x00007fff801078da in _sigtramp ()

I will stop for the time being…

Cheers

Barth

Hi Barth,

if you run on a 10.5 64-bit CPU system then we configure the Mac OS X version for 64 bit. That means that also all your own code should be compiled with -m64. You private /usr/local/lib libfreetype was built for 32 bit (hence the warning). You could link to the ROOT version of freetype which is built for 64 bit. Alternatively you can build ROOT for 32 bit by forcing “macosx” as target in ./configure. Full 64 bit is about 20% faster so worthwhile. To be short make sure your entire chain of libs is either 64 or 32 bit. All Mac system libs are both 32 and 64 bit so they are ok.

Cheers, Fons.

Ok, thanks for the explanation and your help.

I still have crashes as indicated above, but I switched from TRint to TApplication for the time being and it works well.

Thanks

barth