[fluka-discuss]: Producing root output from FLUKA (linking C++ and fortran)

From: roberta volpe <roberta.volpe_at_cern.ch>
Date: Fri, 26 Sep 2014 12:14:25 +0200

Dear FLUKA experts,
I am new in FLUKA and I am interested in getting some output readable with
c++, a root file would be the ideal.
I have just noticed that there is an example in the FLUKA website:
http://www.fluka.org/fluka.php?id=examples&sub=example3&node=4
and I want to start from that.
I am trying to compile that, without any change, and I get some errors.
I have tried both with Debian and on lxplus (using both slc5 and slc6). For
now I am reporting here the error with slc6.
 I used:
- g77 FLUKA version: fluka2011.2b-linuxAA.tar.gz
- root version:
 source /afs/cern.ch/sw/lcg/external/gcc/4.6.3/x86_64-slc6/setup.csh
 source /afs/
cern.ch/sw/lcg/app/releases/ROOT/5.34.03/x86_64-slc6-gcc46-opt/root/bin/thisroot.csh

when I do "make" I get this error: (*).


I tried also with gfortran 4.7 by using the command:
scl enable devtoolset-1.1 csh
(having read
http://www.fluka.org/web_archive/earchive/new-fluka-discuss/6404.html)
but I got other errors.

Can you please tell me which are the versions of FLUKA, root, fortran and
C++ compilers to be used, in order to get the example working with no
incompatibilities?
If you need other details please let me know.
Thank you in advance for your help,
best regards,
Roberta


(*)
g77
ar x /afs/cern.ch/user/v/volper/flukaG77/FLUKA/libflukahp.a fluka.o
g77 -m32 -mcpu=pentiumpro -O3 -g -fexpensive-optimizations -funroll-loops
-fstrength-reduce -Wall -fno-automatic -fno-silent -ffortran-bounds-check
-I/afs/cern.ch/user/v/volper/flukaG77/FLUKA/flukapro -v -o rootfluka
-Xlinker -Map -Xlinker rootfluka.map fluka.o usrini.o usrout.o mgdraw.o
FluLib.o libResults.so -L/afs/cern.ch/user/v/volper/flukaG77/FLUKA -lflukahp
Driving: g77 -m32 -mcpu=pentiumpro -O3 -g -fexpensive-optimizations
-funroll-loops -fstrength-reduce -Wall -fno-automatic -fno-silent
-ffortran-bounds-check -I/afs/cern.ch/user/v/volper/flukaG77/FLUKA/flukapro
-v -o rootfluka -Xlinker -Map -Xlinker rootfluka.map fluka.o usrini.o
usrout.o mgdraw.o FluLib.o libResults.so -L/afs/
cern.ch/user/v/volper/flukaG77/FLUKA -lflukahp -lfrtbegin -lg2c -lm
-shared-libgcc
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-languages=c,c++,f77
--disable-libgcj --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-19.el6)
 /usr/libexec/gcc/x86_64-redhat-linux/3.4.6/collect2 --eh-frame-hdr -m
elf_i386 -dynamic-linker /lib/ld-linux.s
o.2 -o rootfluka
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib/crt1.o
/usr/lib/gcc/x86_64-redhat-linux
/3.4.6/../../../../lib/crti.o
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/32/crtbegin.o -L/afs/
cern.ch/user/v/volper
/flukaG77/FLUKA -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/32
-L/usr/lib/gcc/x86_64-redhat-linux/3.4.6 -L/usr/lib
/gcc/x86_64-redhat-linux/3.4.6/32 -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6
-L/usr/lib/gcc/x86_64-redhat-linux/3
.4.6/../../../../lib -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../..
-L/lib/../lib -L/usr/lib/../lib -Map roo
tfluka.map fluka.o usrini.o usrout.o mgdraw.o FluLib.o libResults.so
-lflukahp -lfrtbegin -lg2c -lm -lgcc_s_32
-lgcc -lc -lgcc_s_32 -lgcc
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/32/crtend.o
/usr/lib/gcc/x86_64-redhat-linux/
3.4.6/../../../../lib/crtn.o
FluLib.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
Received on Fri Sep 26 2014 - 13:29:23 CEST

This archive was generated by hypermail 2.3.0 : Fri Sep 26 2014 - 13:29:24 CEST