Re: [fluka-discuss]: Fluka on Mac

From: <paolo.dicarolo_at_fi.infn.it>
Date: Tue, 22 Nov 2016 10:32:03 +0000

Thank you Chris, very useful informations.
Then I can try an object format conversion directly with objconv:
http://agner.org/optimize/objconv.zip

Cheers Paolo

----- Messaggio da Chris Theis <Christian.Theis_at_cern.ch> ---------
    Data: Mon, 21 Nov 2016 15:28:02 +0000
      Da: Chris Theis <Christian.Theis_at_cern.ch>
Oggetto: Re: [fluka-discuss]: Fluka on Mac
       A: "paolo.dicarolo_at_fi.infn.it" <paolo.dicarolo_at_fi.infn.it>,
"fluka-discuss_at_fluka.org Community-FLUKA" <fluka-discuss_at_fluka.org>


> Dear Paolo,
>
> even though OS X is related to Linux it is not binary compatible. OS
> X object files follow Mach O format whereas Linux files are ELF
> formatted. Even if they used the same format it is not guaranteed
> that the same ABI is available under different Operating systems.
>
> Thus, you would need object files which have been compiled for your
> specific platform.
>
> Cheers Chris
>
> _____________________________
> From: paolo.dicarolo_at_fi.infn.it<mailto:paolo.dicarolo_at_fi.infn.it>
> Sent: Monday, November 21, 2016 16:06
> Subject: [fluka-discuss]: Fluka on Mac
> To: fluka-discuss_at_fluka.org<mailto:fluka-discuss_at_fluka.org>
> Community-FLUKA
> <fluka-discuss_at_fluka.org<mailto:fluka-discuss_at_fluka.org>>
>
>
> Dear FLUKA experts,
>
> we want to use FLUKA on Mac avoiding virtual machines, is it possible
> with some code adjustments?
> Following the G. Battistoni method:
> https://indico.cern.ch/event/391596/contributions/1826706/attachments/783751/1074413/Battistoni_FLUKA_Mac.pdf
>
> On Mac 10.5 installing Xcode 5.1.1 and fink:
>
> $ export FLUPRO=/Users/paolo/FLUKA64
> $ export FLUFOR=gfortran
> $ cd /Users/paolo/FLUKA64
> $ tar -xzvf fluka2011.2c-linux-gfor5.3-64bitAA.tar.gz
>
> In $FLUKA/flutil/usbmax.c we replaced #include <values.h> with
> #include <limits.h>
> #include <float.h>
>
> After some adjustements in awk commands in $FLUKA/flutil/ffluka.sh and
> in the reading of object files in libflukahp.a we arrive at error:
>
> iMac-di-Utente:FLUKA64 paolo$ /Users/paolo/FLUKA64/flutil/lfluka -o
> flukahp -m fluka
> $FLUPRO = /Users/paolo/FLUKA64
> now linking
> /Users/paolo/FLUKA64
> gfortran
> ar x /Users/paolo/FLUKA64/libflukahp.a fluka.o
> gfortran -msse2 -mfpmath=sse -fPIC -O3 -g -mtune=generic
> -fexpensive-optimizations -funroll-loops -fstrength-reduce -Wall
> -Wuninitialized -Wno-tabs -Wline-truncation -Wno-unused-function
> -Wno-unused-parameter -Wno-unused-variable -Wunused-label
> -Waggregate-return -Wcast-align -Wsystem-headers -ftrapping-math
> -frange-check -fbackslash -fdump-core -fbacktrace
> -ffpe-trap=invalid,zero,overflow -finit-local-zero -ffixed-form
> -frecord-marker=4 -funderscoring -fno-automatic -fd-lines-as-comments
> -fbounds-check -I/Users/paolo/FLUKA64/flukapro -v -o flukahp fluka.o
> -L/Users/paolo/FLUKA64 -lflukahp
> Driving: gfortran -mmacosx-version-min=10.8.6 -msse2 -mfpmath=sse
> -fPIC -O3 -g -mtune=generic -fexpensive-optimizations -funroll-loops
> -fstrength-reduce -Wall -Wuninitialized -Wno-tabs -Wline-truncation
> -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable
> -Wunused-label -Waggregate-return -Wcast-align -Wsystem-headers
> -ftrapping-math -frange-check -fbackslash -fdump-core -fbacktrace
> -ffpe-trap=invalid,zero,overflow -finit-local-zero -ffixed-form
> -frecord-marker=4 -funderscoring -fno-automatic -fd-lines-as-comments
> -fbounds-check -I/Users/paolo/FLUKA64/flukapro -v -o flukahp fluka.o
> -L/Users/paolo/FLUKA64 -lflukahp -l gfortran -shared-libgcc
> Using built-in specs.
> COLLECT_GCC=gfortran
> COLLECT_LTO_WRAPPER=/sw/lib/gcc4.9/libexec/gcc/x86_64-apple-darwin12.6.0/4.9.3/lto-wrapper
> Target: x86_64-apple-darwin12.6.0
> Configured with: ../gcc-4.9.3/configure --prefix=/sw
> --prefix=/sw/lib/gcc4.9 --mandir=/sw/share/man
> --infodir=/sw/lib/gcc4.9/info
> --enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw
> --with-libiconv-prefix=/sw --with-isl=/sw --with-cloog=/sw
> --with-mpc=/sw --with-system-zlib --x-includes=/opt/X11/include
> --x-libraries=/opt/X11/lib --program-suffix=-fsf-4.9
> Thread model: posix
> gcc version 4.9.3 (GCC)
> Reading specs from
> /sw/lib/gcc4.9/lib/gcc/x86_64-apple-darwin12.6.0/4.9.3/../../../libgfortran.spec
> rename spec lib to liborig
> COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.8.6' '-msse2'
> '-mfpmath=sse' '-fPIC' '-O3' '-g' '-mtune=generic'
> '-fexpensive-optimizations' '-funroll-loops' '-Wall' '-Wuninitialized'
> '-Wno-tabs' '-Wline-truncation' '-Wno-unused-function'
> '-Wno-unused-parameter' '-Wno-unused-variable' '-Wunused-label'
> '-Waggregate-return' '-Wcast-align' '-Wsystem-headers'
> '-ftrapping-math' '-frange-check' '-fbackslash' '-fbacktrace'
> '-ffpe-trap=invalid,zero,overflow' '-finit-local-zero' '-ffixed-form'
> '-frecord-marker=4' '-funderscoring' '-fno-automatic'
> '-fd-lines-as-comments' '-fbounds-check' '-I'
> '/Users/paolo/FLUKA64/flukapro' '-v' '-o' 'flukahp'
> '-L/Users/paolo/FLUKA64' '-shared-libgcc'
> COMPILER_PATH=/sw/lib/gcc4.9/libexec/gcc/x86_64-apple-darwin12.6.0/4.9.3/:/sw/lib/gcc4.9/libexec/gcc/x86_64-apple-darwin12.6.0/4.9.3/:/sw/lib/gcc4.9/libexec/gcc/x86_64-apple-darwin12.6.0/:/sw/lib/gcc4.9/lib/gcc/x86_64-apple-darwin12.6.0/4.9.3/:/sw/lib/gcc4.9/lib/gcc/x86_64-apple-darwin12.6.0/
> LIBRARY_PATH=/sw/lib/gcc4.9/lib/gcc/x86_64-apple-darwin12.6.0/4.9.3/:/sw/lib/gcc4.9/lib/gcc/x86_64-apple-darwin12.6.0/4.9.3/../../../:/usr/lib/
> COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.8.6' '-msse2'
> '-mfpmath=sse' '-fPIC' '-O3' '-g' '-mtune=generic'
> '-fexpensive-optimizations' '-funroll-loops' '-Wall' '-Wuninitialized'
> '-Wno-tabs' '-Wline-truncation' '-Wno-unused-function'
> '-Wno-unused-parameter' '-Wno-unused-variable' '-Wunused-label'
> '-Waggregate-return' '-Wcast-align' '-Wsystem-headers'
> '-ftrapping-math' '-frange-check' '-fbackslash' '-fbacktrace'
> '-ffpe-trap=invalid,zero,overflow' '-finit-local-zero' '-ffixed-form'
> '-frecord-marker=4' '-funderscoring' '-fno-automatic'
> '-fd-lines-as-comments' '-fbounds-check' '-I'
> '/Users/paolo/FLUKA64/flukapro' '-v' '-o' 'flukahp'
> '-L/Users/paolo/FLUKA64' '-shared-libgcc'
> /sw/lib/gcc4.9/libexec/gcc/x86_64-apple-darwin12.6.0/4.9.3/collect2
> -dynamic -arch x86_64 -macosx_version_min 10.8.6
> -weak_reference_mismatches non-weak -o flukahp -L/Users/paolo/FLUKA64
> -L/sw/lib/gcc4.9/lib/gcc/x86_64-apple-darwin12.6.0/4.9.3
> -L/sw/lib/gcc4.9/lib/gcc/x86_64-apple-darwin12.6.0/4.9.3/../../..
> fluka.o -lflukahp -lgfortran -no_compact_unwind -lSystem
> -lgcc_ext.10.5 -lgcc -lquadmath -lm -lgcc_ext.10.5 -lgcc -lSystem -v
> -idsym
> collect2 version 4.9.3
> /usr/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.8.6
> -weak_reference_mismatches non-weak -o flukahp -L/Users/paolo/FLUKA64
> -L/sw/lib/gcc4.9/lib/gcc/x86_64-apple-darwin12.6.0/4.9.3
> -L/sw/lib/gcc4.9/lib/gcc/x86_64-apple-darwin12.6.0/4.9.3/../../..
> fluka.o -lflukahp -lgfortran -no_compact_unwind -lSystem
> -lgcc_ext.10.5 -lgcc -lquadmath -lm -lgcc_ext.10.5 -lgcc -lSystem -v
> _at_(#)PROGRAM:ld PROJECT:ld64-236.4
> configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64
> armv6m armv7m armv7em
> Library search paths:
> /Users/paolo/FLUKA64
> /sw/lib/gcc4.9/lib/gcc/x86_64-apple-darwin12.6.0/4.9.3
> /sw/lib/gcc4.9/lib
> /usr/lib
> /usr/local/lib
> Framework search paths:
> /Library/Frameworks/
> /System/Library/Frameworks/
> ld: warning: ignoring file fluka.o, file was built for unsupported
> file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00
> 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked
> (x86_64): fluka.o
> ld: warning: ignoring file /Users/paolo/FLUKA64/libflukahp.a, file was
> built for archive which is not the architecture being linked (x86_64):
> /Users/paolo/FLUKA64/libflukahp.a
> Undefined symbols for architecture x86_64:
> "_main", referenced from:
> implicit entry/start for main executable
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status
> iMac-di-Utente:FLUKA64 paolo$
>
> Is it solvable, or we need a modified version of object files, that is
> probably maybe contained in development version fluka2014.5?
>
> Best regards
> Paolo Dicarolo
>
> --
> Paolo R. Dicarolo
>
> INFN di Firenze
> Dip. Fisica Sperimentale
> Stanza 115
> Tel 055/4572683
>
>
> __________________________________________________________________________
> You can manage unsubscription from this mailing list at
> https://www.fluka.org/fluka.php?id=acc_info


----- Fine messaggio da Chris Theis <Christian.Theis_at_cern.ch> -----


-- 
Paolo R. Dicarolo
INFN di Firenze
Dip. Fisica Sperimentale
Stanza 115
Tel 055/4572683
__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Tue Nov 22 2016 - 13:01:22 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 22 2016 - 13:01:23 CET