gudlaugu wrote:
grbzxh wrote:
Thanks. It works now by specifying compiler, but there are other errors like "HealpixBaseExtended.cc:8: error: too few template-parameter-lists". Does it mean Healpix is not installed correctly?
Version 54 has not been updated to use Healpix v3. You can safely comment out the function "int Healpix_Base::ring_above (double z) const" in that file.
I installed Healpix 2.20a. I commented out this function,but still failed to compile. An error seems from gcc. So I reinstalled gcc and reconfigure, this error appeared:
"...
checking whether the C compiler works... no
configure: error: in `/home/zxh/Downloads/galprop/galprop-54.0.572':
configure: error: C compiler cannot create executables
See `config.log' for more details
...
"
I tried several versions of gcc, such as 4.4,4.6, 4.7 and 4.9, the same errors remained. I opened the config.log and found these seems to be related:
"...
Target: i686-linux-gnu
79 Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.4-1ubuntu1~12.04' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c
80 Thread model: posix
81 gcc version 4.6.4 (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04)
82 configure:3697: $? = 0
83 configure:3686: gcc -V >&5
84 gcc: error: unrecognized option '-V'
85 gcc: fatal error: no input files
86 compilation terminated.
87 configure:3697: $? = 4
88 configure:3686: gcc -qversion >&5
89 gcc: error: unrecognized option '-qversion'
90 gcc: fatal error: no input files
91 compilation terminated.
92 configure:3697: $? = 4
93 configure:3717: checking whether the C compiler works
94 configure:3739: gcc conftest.c >&5
95 /usr/bin/ld: 1: /usr/bin/ld: Syntax error: "(" unexpected
96 collect2: ld returned 2 exit status
97 configure:3743: $? = 1
98 configure:3781: result: no
99 configure: failed program was:
100 | /* confdefs.h */
101 | #define PACKAGE_NAME "GalProp"
102 | #define PACKAGE_TARNAME "galprop"
103 | #define PACKAGE_VERSION "54.0.572"
104 | #define PACKAGE_STRING "GalProp 54.0.572"
105 | #define PACKAGE_BUGREPORT ""
106 | #define PACKAGE_URL ""
107 | #define PACKAGE "galprop"
108 | #define VERSION "54.0.572"
109 | /* end confdefs.h. */
110 |
111 | int
112 | main ()
113 | {
114 |
115 | ;
116 | return 0;
117 | }
118 configure:3786: error: in `/home/zxh/Downloads/galprop/galprop-54.0.572':
119 configure:3788: error: C compiler cannot create executables
120 See `config.log' for more details
..."
What's the problem? Thank you.