Pthia6.tar.gz Compile Problems with MacOS

Hi All,
i am compiling pthia6.tar.gz from ftp://root.cern.ch/root/pythia6.tar.gz with MacOs Tiger.
but i can’t successfully compile the codes.
what’s the problem?
Your suggestions are appreciated.
regards,
Chen


chen-zhongs-mac-mini:~/pythia6 czhong$ source makePythia6.macosx
pythia6319.f: In block-data unit pydata': pythia6319.f:315: warning: COMMON/PYDAT3/MDCY(500,3),MDME(8000,2),BRAT(8000),KFDP(8000,5) ^ Initialization of large (294000-unit) aggregate areapydat3’ at (^) slow and takes lots of memory during g77 compile
pythia6319.f:322: warning:
COMMON/PYINT2/ISET(500),KFPR(500,2),COEF(500,20),ICOL(40,4,2)
^
Initialization of large (87280-unit) aggregate area pyint2' at (^) slow and takes lots of memory during g77 compile pythia6319.f:334: warning: COMMON/PYBINS/IHIST(4),INDX(1000),BIN(20000) ^ Initialization of large (164016-unit) aggregate areapybins’ at (^) slow and takes lots of memory during g77 compile
Driving: g77 -v -Zbundle -Zflat_namespace -undefined dynamic_lookup -o libPythia6.so main.o tpythia6_called_from_cc.o pythia6319.o pythia6_common_address.o -lfrtbegin -lg2c
Reading specs from /sw/lib/gcc/powerpc-apple-darwin8.0.0/3.4.3/specs
Configured with: …/gcc-3.4.3/configure --prefix=/sw --enable-languages=f77 --infodir=/share/info --libexecdir=/lib --disable-shared
Thread model: posix
gcc version 3.4.3
/sw/lib/gcc/powerpc-apple-darwin8.0.0/3.4.3/collect2 -arch ppc -dynamic -bundle -flat_namespace -undefined dynamic_lookup -undefined dynamic_lookup -o libPythia6.so -lbundle1.o -L/sw/lib/gcc/powerpc-apple-darwin8.0.0/3.4.3 -L/sw/lib/gcc/powerpc-apple-darwin8.0.0/3.4.3/…/…/… main.o tpythia6_called_from_cc.o pythia6319.o pythia6_common_address.o -lfrtbegin -lg2c -lgcc -lSystemStubs -lSystem -lmx /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libgcc.a |
c++filt
/usr/bin/ld: flag: -undefined dynamic_lookup can’t be used with MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
collect2: ld returned 1 exit status
ld: flag: -undefined dynamic_lookup can’t be used with MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
/usr/bin/libtool: internal link edit command failed
ar: creating archive libPythia6.a
a - main.o
a - tpythia6_called_from_cc.o
a - pythia6319.o
a - pythia6_common_address.o

The Warning in compiling Pythia6 is normal.
You seem to have problems when linking the shared lib.
I assume that you will get help from a MAC user.

Rene

Hi,

before compiling make sure you set:

export MACOSX_DEPLOYMENT_TARGET=10.4

Cheers, Fons.

Hi All.
thanks for your help. thank all very much.

i have compiled pythia6 successfully.
so next, i compiled root(cvs ver.)
"./configure --with-pythia6-libdir=$PYTHIA6"
when i "make"
i got some gfortran errors.
but i can “make cintdlls” and “make install” successfully.
and i can test the codes successfuly too,

"root [0] .L pythiaExample.C
root [1] makeEventSample(1000) "

without any problem.

so my question is what’s difference between g77’s and gfortran’s option?
if using gfortran, how can i modify the makePythia6.macosx in pythia6.
how to avoid these gfortran errors when i compiled the root source codes.

thank you.
regards,
Chen

btw: the gcc4 and gfortran are default compiler. g77 compiler is installed by using fink.

make

i got gfortran errors just like this:


g++ -O2 -bind_at_load -o bin/h2root main/src/h2root.o hbook/src/hntvar2.o
-Llib -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lMatrix
-L/sw/./lib -L/sw/./lib -lpacklib -lkernlib
-L/sw/lib/gcc4/lib -lgfortran -lgfortranbegin -L/sw/lib -lg2c -lm -lpthread -ldl
gfortran -O2 -o main/src/g2root.o -c main/src/g2root.f
gfortran: spec failure: unrecognized spec option 'y’
g++ -O2 -bind_at_load -o bin/g2root main/src/g2root.o
-L/sw/./lib -L/sw/./lib -lpacklib -lkernlib
-L/sw/lib/gcc4/lib -lgfortran -lgfortranbegin -L/sw/lib -lg2c -lm -lpthread -ldl
gfortran -O2 -o main/src/g2rootold.o -c main/src/g2rootold.f
gfortran: spec failure: unrecognized spec option 'y’
g++ -O2 -bind_at_load -o bin/g2rootold main/src/g2rootold.o
-L/sw/./lib -L/sw/./lib -lpacklib -lkernlib
-L/sw/lib/gcc4/lib -lgfortran -lgfortranbegin -L/sw/lib -lg2c -lm -lpthread -ldl


Hi,

gfortran is not officially supported by us since the compiler is still too primitive to handle most of the old HEP fortran. We propose to still use g77.

The error about -y seems to be a gfortran installation error.

Cheers, Fons.