Closed lmmonline closed 8 years ago
I quit the install script, ran it again, and it worked the second time. ¯(ツ)/¯
I have run it a number of times, each time getting the same result as follows:
Do you want to retry? (yes/no) y
Determining Fortran libraries for g++ linking ... OK
Using the following compiler/linker switches for creating/linking against
dynamic shared objects (DSO, also known as shared library or DLL), where
$(abs_dso) or $(ABS_DSO) below will be replaced with the absolute path to the
EGSnrc DSO directory at compile/link time:
1) Optimization options: -O3 -ffast-math
2) Generation of position independent code:
3) Preprocessor defines: -DOSX
4) Flag for creating shared libraries: -dynamiclib
5) Output/dlopen library: -o $@ BEAMLIB_EXTRA_LIBS =
6) DSO path encoded in the executable: -L$(abs_dso)
7) Linking against library some_lib: -lsome_lib
8) Fortran libraries needed by C++ linker: -lcrt1.o -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3 -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/../../.. -lgfortranbegin -lgfortran -lgcc_s.10.4
9) Creating library bundles on OSX: -lcrt1.o -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3 -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/../../.. -lgfortranbegin -lgfortran -lgcc_s.10.4
Input option to change, or enter to proceed:
I don't know enough about the options to change them. At each step up to here I have simply selected the default values.
Thank you.
@lmmonline, I will try to reproduce the problem. Please send me your detailed compiler version numbers: gfortran --version; gcc --version; g++ --version;
Hi Thanks ftessier
Lindas-iMac:EGSnrc iMacLinda$ gfortran --version
GNU Fortran (GCC) 4.2.3
Copyright (C) 2007 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
Lindas-iMac:EGSnrc iMacLinda$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.2.0
Thread model: posix
Lindas-iMac:EGSnrc iMacLinda$ g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.2.0
Thread model: posix
@lmmonline, I note the line 5) Output/dlopen library: -o $@ BEAMLIB_EXTRA_LIBS =
in your options. These options should read -o $@ -ldl
. Try changing options number 5 accordingly and let me know. The underlying cause is a mishandling of trailing spaces in the C++ configuration script when the variable the BEAMLIB_EXTRA_LIBS
is undefined in the $EGS_CONFIG
file. This has been fixed in commit c67fc15, thank you. (Although the fact that this variable is undefined in your configuration file is in itself suspect...)
Thanks for your reply, this is what happened:
1) Optimization options: -O3 -ffast-math
2) Generation of position independent code:
3) Preprocessor defines: -DOSX
4) Flag for creating shared libraries: -dynamiclib
5) Output/dlopen library: -o $@ BEAMLIB_EXTRA_LIBS =
6) DSO path encoded in the executable: -L$(abs_dso)
7) Linking against library some_lib: -lsome_lib
8) Fortran libraries needed by C++ linker: -lcrt1.o -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3 -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/../../.. -lgfortranbegin -lgfortran -lgcc_s.10.4
9) Creating library bundles on OSX: -lcrt1.o -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3 -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/../../.. -lgfortranbegin -lgfortran -lgcc_s.10.4
Input option to change, or enter to proceed: 5
Input Output/dlopen library: -o $@ BEAMLIB_EXTRA_LIBS = -o $@ -ldl
Input option to change, or enter to proceed:
Creating C++ config file ... OK
Building the IAEA phase space library ... Failed
Building the EGSnrc C++ class library ... Failed
These settings did not work out. You may edit the source code
(in case you can see where the problem is when building the C++ libraries
from the configure.log file) and/or try different compiler/linker options
Can you please confirm that what I typed in is what you meant?
No, sorry for the confusion, I meant that BEAMLIB_EXTRA_LIBS =
should NOT be there at all, as in
Input Output/dlopen library: -o $@ -ldl
Something is still symptomatic of a deeper problem, e.g., you don't have a flag for generation of position independent code. When I try with a fresh install of El Capitan with gfortran 5.1 or 6.0, the configuration sets the flags as expected. The problem you have is caused by the fact that the script does not set BEAMLIB_EXTRA_LIBS
variable because it is not able to compile shared libaries. This may be due to the fact that your gfortran is too old compared to your gcc. Try with gfortran 5.1, or else send me your full configuration log file to further diagnose.
My outdated gfortran was part of the problem. The other part was that I had upgraded the operating system but did not realise that when I did this I would also have to upgrade Macports which I have been using as a package manager (rather than home-brew), after doing this the configure script ran correctly.
Firstly ...... gcc is detected by the install script and I select it by hitting enter however compiling ctcreate and dosxyz_show are skipped with the comment no C compiler.
Then secondly........
I get to a list of 9 options. I hit enter to proceed. I get
If I select yes or no I am sent back to the list of 9 options and so on until I exit by ^C. Have you any advice for me. Thanks