Help installing Root on mac osx 10.4.11

Dear reader,
I am trying to build Root on my mac (version os x 10.4.11). I should have everything necessary installed. however at the “make” command an error follows:

/usr/bin/ld: unix/src/TUnixSystem.o bad magic number (not a Mach-O file)
collect2: ld returned 1 exit status
make: *** [lib/libCore.dylib] Error 1

I have NO knowledge of linux, or building from source, I have been following tutorials thus far. If it helps, the bad magic number may be a result of the error previous to this:

unix/src/TUnixSystem.cxx:644: error: unrecognizable insn:
(insn:HI 9 6 97 0 (parallel [
(set (reg:DI 0 ax)
(asm_operands/v:DI (“mffs %0”) ("=f") 0 []
[] (“unix/src/TUnixSystem.cxx”) 634))
(clobber (reg:QI 19 dirflag))
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
]) -1 (nil)
(nil))
unix/src/TUnixSystem.cxx:644: confused by earlier errors, bailing out
{standard input}:812:FATAL:.abort detected. Assembly stopping.
make: *** [unix/src/TUnixSystem.o] Error 1

But I solved (I think) this by renaming the TUnixSystem.(something) to TUnixSystem.o.

To the problem at hand, I do not have “libCore.dylib” in my lib folder, do I just need some libraries??

Thank you

Kim

Hi Kim,

[quote]But I solved (I think) this by renaming the TUnixSystem.(something) to TUnixSystem.o. [/quote]This does not work! The .something is not a proper/complete .o file and is not useable.

This is a bug in the compiler. You will need to either only build in debug mode (add --debug to the configure line) or to upgrade your compiler version.

Cheers,
Philippe

Hi, thanks for your advice. When I tried adding “–debug” to the configure line:

./configure macosx --debug

it says invalid option, searching through --help, there isn’t a debug mode

I have gcc4, if this is my complier, it should be the most recent one avalable to me. As it is, the problem still stands

humm try simply./configure --build=debug

Cheers,
Philippe.

Thank you again for your advice. I’m afraid the problem still remains:

/src/G__Cont.o meta/src/G__Meta.o net/src/G__Net.o unix/src/G__Unix.o clib/src/G__Clib.o metautils/src/G__MetaUtils.o -L/sw/lib -ldl -lssl -lcrypto
/usr/bin/ld: unix/src/TUnixSystem.o bad magic number (not a Mach-O file)
collect2: ld returned 1 exit status
make: *** [lib/libCore.dylib] Error 1
Macbook-3:/users/lee/root lee$

My honest guess is that I am still missing the TUnixSystem.o file, plus libraries necessary for building root. Any advice hence forth is much appreciated.

It is likely that you had interrupted (CRTL/C) your previous build.
do

make distclean make
Rene

Dear Rene, thank you for your suggestion. I’m afraid the same error occurs.

are you trying to install an old version?
If yes, please install from v5.21/06 or the SVN trunk.

Rene

Dear Rene, thank you once again for your suggestion. It seems to have gotten further in the build, however this error occurs:
[/code]graf3d/gl/src/TGLUtil.cxx:1010: error: expected unqualified-id before string constant
graf3d/gl/src/TGLUtil.cxx:1026: error: expected `)’ before 'vertex_func’
graf3d/gl/src/TGLUtil.cxx: In static member function ‘static GLUtesselator* TGLUtil::GetDrawTesselator3fv()’:
graf3d/gl/src/TGLUtil.cxx:1052: error: ‘tessfuncptr_t’ was not declared in this scope
graf3d/gl/src/TGLUtil.cxx: In static member function ‘static GLUtesselator* TGLUtil::GetDrawTesselator4fv()’:
graf3d/gl/src/TGLUtil.cxx:1063: error: ‘tessfuncptr_t’ was not declared in this scope
graf3d/gl/src/TGLUtil.cxx: In static member function ‘static GLUtesselator* TGLUtil::GetDrawTesselator3dv()’:
graf3d/gl/src/TGLUtil.cxx:1074: error: ‘tessfuncptr_t’ was not declared in this scope
graf3d/gl/src/TGLUtil.cxx: In static member function ‘static GLUtesselator* TGLUtil::GetDrawTesselator4dv()’:
graf3d/gl/src/TGLUtil.cxx:1085: error: ‘tessfuncptr_t’ was not declared in this scope
make: *** [graf3d/gl/src/TGLUtil.o] Error 1
rm core/utils/src/RStl_tmp.cxx core/utils/src/rootcint_tmp.cxx

There seems to be a thread on this already

[url]http://root.cern.ch/phpBB2/viewtopic.php?p=31789&sid=87d6f1a2fc8094aec407afb67ad97da3

however, it has not yet been solved. I will await for ‘Fons’ to reply on this thread. In the meantime, if you can please can the two of you private message me your full names so that I may include you in my acknowledgments in my report.

What version of gcc do you have on your 10.4.11? Do gcc -v and let me know. The TGLUtil.cxx problem does not show on my 10.4.11 system so it might be a compiler version issue.

Cheers, Fons.

I have gcc 4.0.1 build 5250. I’ve downloaded something called GRESS, that to my knowledge has gcc 4.0.1 5363, but I do not know how to install compliers with the terminal.

Hello,
Thank you everyone for your advice. I currently have gcc 4 build 5370, and as far as I know, I have finished building root, but I cannot not start root at all? Please advise, and merry christmas

[code]Meta.o core/unix/src/G__Unix.o core/clib/src/G__Clib.o core/metautils/src/G__MetaUtils.o -ldl lib/libpcre.a
ln -fs libCore.dylib lib/libCore.so
==> lib/libCore.dylib done
cp cint/reflex/python/genreflex/gccdemangler.py lib/python/genreflex/gccdemangler.py
cp cint/reflex/python/genreflex/gencapa.py lib/python/genreflex/gencapa.py
cp cint/reflex/python/genreflex/gendict.py lib/python/genreflex/gendict.py
cp cint/reflex/python/genreflex/genheader.py lib/python/genreflex/genheader.py
cp cint/reflex/python/genreflex/genreflex-rootcint.py lib/python/genreflex/genreflex-rootcint.py
cp cint/reflex/python/genreflex/genreflex.py lib/python/genreflex/genreflex.py
cp cint/reflex/python/genreflex/genrootmap.py lib/python/genreflex/genrootmap.py
cp cint/reflex/python/genreflex/selclass.py lib/python/genreflex/selclass.py
Macbook-3:/users/lee/Desktop/school/root lee$ root
-bash: root: command not found
Macbook-3:/users/lee/Desktop/school/root lee$

This is the end of the make, followed by my attempt to open root[/code]

Did you add the root/bin directory to your PATH ?

Cheers, Fons.

Hi Fons,
Thank you for your advice. I tried the following, but another error has occurred. I have no idea what it means, if you could give another hint for me, it would be great!

[code]Macbook-3:~ lee$ PATH=$PATH:$HOME/bin:usr/local/root/bin
Macbook-3:~ lee$ root
root: can’t figure out DISPLAY, set it manually
In case you run a remote ssh session, restart your ssh session with:
=========> ssh -Y
Macbook-3:~ lee$ ssh -Y
usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-e escape_char] [-F configfile]
[-i identity_file] [-L [bind_address:]port:host]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-R [bind_address:]port:host] [-S ctl_path]
[-w local_tun[:remote_tun]] [user@]hostname [command]
Macbook-3:~ lee$ root
root: can’t figure out DISPLAY, set it manually
In case you run a remote ssh session, restart your ssh session with:
=========> ssh -Y

[/code]

On Mac OS X 10.4 you have to manually start the X11 server to get ROOT graphics. You find the X11 server in Applications/Utilities (if you did install it from the install DVD).

Cheers, Fons.

Thank Fons, my thanks here is only a small part of my gratitude. Thank you. A last and stubborn question; is there no way of running root from the Terminal? I am currently working from X11, but it does not remember the whole session, it only remembers what is on the window.

Once again, thank you all three of you, I’m off making Feynman diagrams now
:smiley:

What exactly do you mean that “it does not remeber the whole session”? You can run in MacOS X Terminal application (Applications/Utilities), but the ROOT graphics will go into windows created via X11. If you quit the ROOT session in the Terminal the X11 ROOT windows will be closed. This is expected.

Cheers, Fons.

Hi, I can use root in terminal provided by X11. If I use the normal one, the display error comes up. While not a problem, the terminal window provided by X11 has no scroll bars, as it only ‘remembers’ things by the size of window, that is preset. Hence, after 20 ~ 30 lines, the first one will disappear for good. I also have to set the path to root/bin for every log in, but at the moment I’m still happily slugging on.

Hi,

I am also running 10.4.11 on my Mac, and in my home directory I have the following file, named “.xinitrc”:

# X session startup script 
#!/bin/sh

xterm -sb -sl 3500 -bg gray90 -rightbar -geometry 100x60+40+0 &
xterm -sb -sl 3500 -bg gray90 -rightbar -geometry 100x40+680+80 &
exec quartz-wm

If you put this file in your home directory, you will get two xterms with a scrollbar on the right side and 3500 lines to scroll.

I hope this helps.

Regards
Christian

Thanks for your help everyone. I solved the problem another way, and cheers anyway