Cannot compile root V17 on leopard

Hi,

I get this error with v1.17/08:

ild/rmkdepend/pr.o build/rmkdepend/mainroot.o
/usr/bin/ld: /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/libstdc++.dylib load command 7 unknown cmd field
/usr/bin/ld: /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/…/…/…/libSystem.dylib unknown flags (type) of section 9 (__TEXT,__dof_plockstat) in load command 0
/usr/bin/ld: /usr/lib/libSystem.B.dylib unknown flags (type) of section 9 (__TEXT,__dof_plockstat) in load command 0
collect2: ld returned 1 exit status
make: *** [bin/rmkdepend] Error 1

I saw another thread claim this is fixed in cvn trunk. I found the same error there though. does someone know how to make it compile?

Cheers,

Mark

Can you post the full compile and link output?

Is there anybody else with Leopard on PPC seeing this problem (I’ve no access to a Leopard PPC machine).

Cheers, Fons.

I did make clean, but maybe this is not enough because I still get less output than the first time. All I have is:

gcc -O2 -pipe -W -Wall -fsigned-char -fno-common -Iinclude -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/cppsetup.o -c build/rmkdepend/cppsetup.c
gcc -O2 -pipe -W -Wall -fsigned-char -fno-common -Iinclude -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/ifparser.o -c build/rmkdepend/ifparser.c
gcc -O2 -pipe -W -Wall -fsigned-char -fno-common -Iinclude -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/include.o -c build/rmkdepend/include.c
gcc -O2 -pipe -W -Wall -fsigned-char -fno-common -Iinclude -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/main.o -c build/rmkdepend/main.c
gcc -O2 -pipe -W -Wall -fsigned-char -fno-common -Iinclude -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/parse.o -c build/rmkdepend/parse.c
gcc -O2 -pipe -W -Wall -fsigned-char -fno-common -Iinclude -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/pr.o -c build/rmkdepend/pr.c
g++ -O2 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -fvisibility-inlines-hidden -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/mainroot.o -c build/rmkdepend/mainroot.cxx
g++ -O2 -bind_at_load -o bin/rmkdepend build/rmkdepend/cppsetup.o build/rmkdepend/ifparser.o build/rmkdepend/include.o build/rmkdepend/main.o build/rmkdepend/parse.o build/rmkdepend/pr.o build/rmkdepend/mainroot.o
/usr/bin/ld: /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/libstdc++.dylib load command 7 unknown cmd field
/usr/bin/ld: /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/…/…/…/libSystem.dylib unknown flags (type) of section 9 (__TEXT,__dof_plockstat) in load command 0
/usr/bin/ld: /usr/lib/libSystem.B.dylib unknown flags (type) of section 9 (__TEXT,__dof_plockstat) in load command 0
collect2: ld returned 1 exit status

In the end I have a binary that works in leopard. However I could no longer compile my own code (that uses TH1D.h etc) using its header files/libraries in leopard unless I changed in my makefile:

g++ $(CXXFLAGS) -Wall -I/usr/include -I$(ROOTSYS)/include -c $<

to

g++ $(CXXFLAGS) -isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wall -I/usr/include -I$(ROOTSYS)/include -c $<

and

g++ -g -o $(NAME) -O $(OBJECTS) $(ROOTGLIBS) -lRIO -lNet

to

g++ -g -o $(NAME) -O $(OBJECTS) $(ROOTGLIBS) -lRIO -lNet -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk

I do not know what this means (my sys admin figured out this is what to do). Maybe it is related to why I could not compile the root source code (or not - this is beyond my level of knowledge…)

Cheers,

Mark

When running on Leopard, please add the following to your .bash_profile:

export MACOSX_DEPLOYMENT_TARGET=10.5
export COMMAND_MODE=unix2003

source your .bash_profile and try compiling again.

Does that help.

Cheers, Fons.

makes no difference

Cheers,

Mark

Why do you need to link with the 10.4 run-time if you have upgraded to Leopard? Did you install Xcode for 10.5? On my 10.5 machine I have:

/usr/lib/gcc/powerpc-apple-darwin9/

while you have darwin8. Did you do an upgrade instead of a full install?
If so than something went wrong. Start by reinstalling the 10.5 Xcode from the Leopard DVD.

Cheers, Fons.

Did you try to install root using Tiger binary? Thats what i did.