Compiling a Fortran file with gfortran 4.1.1 on a PC - fortran

I am trying to run a couple of fixed-formatted Fortran 90 files on a PC. They run flawlessly with gfortran version 4.1.1, but not with gfortran 4.1.2 or later (I tried). Here are all the things I've tried:
I tried using the tag "-std=legacy" in Cygwin with version 4.9.3 so the processor compiles the code as a Fortran 77 file. I had to work out some kinks, but eventually it began to work splendidly. Then the following error popped up:
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO IEEE_OVERFLOW_FLAG IEEE_DENORMAL
I then moved on to plan B: trying to get gfortran 4.1.1 on my PC, on Cygwin.
Building gfortran 4.1.1 from source in Cygwin (since I can't find binary files anywhere online). Cygwin already has a package for gfortran, but only version 4.9.3. I used gcc-fortran-4.1.1.tar.bz2; basically I want to downgrade gfortran in Cygwin. the files in the tarball were lacking so I had to debug some things and add some files with some wget's (like the most current versions of config.guess and config.sub) to get it to configure (I also used autoconf, autoreconf, and automake). Long story short, I tried to run make and I got a long list of errors.
I have access to a Linux machine with gfortran 4.1.1 already on it (on which it works perfectly), and tried to make it there, but it gave a lot of errors as well, completely different from those from Cygwin. At the end are the errors, the first being those from Cygwin and the latter from Linux. I access the Linux computer remotely via SSH; the entire point of this endeavor is to run the codes on PC's (and/or Mac's) so that we don't have to transfer thousands of images and files back and forth.
I tried to download g95 onto Cygwin via the tarball g95-x86-cygwin-41.tgz found online. The INSTALL file said I just need to extract the files in the root directory, create a symbolic link somewhere, and it should work. I did and then I typed it in and nothing happened; no "-bash: ... No such file or directory" error or other errors, but simply nothing. No executable was created-nothing. I even mispelled --version and no error popped up.
J Double B#jdoubleb-PC /wexlerwork/autismcases_CTs/autismcases_23_VOID
$ g95 --versio
J Double B#jdoubleb-PC /wexlerwork/autismcases_CTs/autismcases_23_VOID
$ g95 --version
J Double B#jdoubleb-PC /wexlerwork/autismcases_CTs/autismcases_23_VOID
$ g95 --help
J Double B#jdoubleb-PC /wexlerwork/autismcases_CTs/autismcases_23_VOID
$ man g95
No manual entry for g95
J Double B#jdoubleb-PC /wexlerwork/autismcases_CTs/autismcases_23_VOID
$ g95 ver5.2_v3.5.f -o f05
J Double B#jdoubleb-PC /wexlerwork/autismcases_CTs/autismcases_23_VOID
I even tried the self-extracting files for gcc 4.1 from the following website: http://g95.org/downloads.shtml. I tried the HTTP link and it gave me the tarball I mentioned above. I tried the FTP link and it did nothing useful.
I tried g95 via MinGW and my Windows 7 command shell (from the Start menu). It was an executable, so it was nice to not have to build it. It downloaded and it works. However, there are a lot of errors. It didn't recognize all the comments beginning with 'c', so I changed them all to !'s. Then the compiler mentioned continuations. There are hundreds of continuations in the code, and only a limited amount are allowed per version and format type I think. Essentially the compiler processes Fortran 95 files (naturally-it's in the name), but the file is not a Fortran file. I tried to pass a "-std=legacy" or something similar, but apparently the only options are for Fortran 95, 2003, and 2008. It'd take forever to change a 7000-line and a 3000-line Fortran 77/90 file to Fortran 95 files, so I stopped. Well, I figured I'd give it a try.
I tried changing the extensions of the files to *.f90, but they were interpreted by my computer to be Fortran 95 files and it didn't work.
I'd rather not continue to try and change the codes so they work for some kind of compiler, but rather simply get gfortran 4.1.1 on my computer and have them running just like on the Linux computer. I'd also like to not have to build anything from source-executables for Fortran compilers are welcome. However, I'm not completely closed to the prospect.
Any help from anyone is welcome; thank you in advance for your consideration.
*FROM CYGWIN*
J Double B#jdoubleb-PC /gcc-4.1.1
$ make
cat: libgfortran/../gcc/BASE-VER: No such file or directory
makefile:2442: warning: overriding commands for target `.F90.o'
makefile:1059: warning: ignoring old commands for target `.F90.o'
makefile:2445: warning: overriding commands for target `.F90.obj'
makefile:1062: warning: ignoring old commands for target `.F90.obj'
makefile:2448: warning: overriding commands for target `.F90.lo'
makefile:1065: warning: ignoring old commands for target `.F90.lo'
C:/Users/jdoubleb/Documents/Academia/Cygwin_etal/bin/sh.exe libgfortran/mk-kinds-h.sh ' -I . -Wall -fno-repack-arrays -fno-underscoring ' > kinds.h || rm kinds.h
grep '^#' < kinds.h > kinds.inc
grep '^#' < libgfortran/c99_protos.h > c99_protos.inc
cp libgfortran/config/fpu-glibc.h fpu-target.h
C:/Ch/bin/make all-am
cat: libgfortran/../gcc/BASE-VER: No such file or directory
make[1]: Entering directory `C:/Users/jdoubleb/Documents/Academia/Cygwin_etal/gcc-4.1.1'
makefile:2442: warning: overriding commands for target `.F90.o'
makefile:1059: warning: ignoring old commands for target `.F90.o'
makefile:2445: warning: overriding commands for target `.F90.obj'
makefile:1062: warning: ignoring old commands for target `.F90.obj'
makefile:2448: warning: overriding commands for target `.F90.lo'
makefile:1065: warning: ignoring old commands for target `.F90.lo'
C:/Users/jdoubleb/Documents/Academia/Cygwin_etal/bin/sh.exe ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -Ilibgfortran -I. -iquotelibgfortran/io -Ilibgfortran/../gcc -Ilibgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -std=gnu99 -g -O2 -Wunknown-pragmas -c -o compile_options.lo `test -f 'runtime/compile_options.c' || echo 'libgfortran/'`runtime/compile_options.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -Ilibgfortran -I. -iquotelibgfortran/io -Ilibgfortran/../gcc -Ilibgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -std=gnu99 -g -O2 -Wunknown-pragmas -c libgfortran/runtime/compile_options.c -DDLL_EXPORT -DPIC -o .libs/compile_options.o
In file included from libgfortran/runtime/compile_options.c:32:0:
libgfortran/libgfortran.h:204:9: error: unknown type name ‘GFC_INTEGER_4’
typedef GFC_INTEGER_4 gfc_charlen_type;
^
libgfortran/libgfortran.h:254:51: error: unknown type name ‘GFC_INTEGER_4’
typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_4) gfc_array_i4;
^
libgfortran/libgfortran.h:245:3: note: in definition of macro ‘GFC_ARRAY_DESCRIPTOR’
type *data;\
^
libgfortran/libgfortran.h:255:51: error: unknown type name ‘GFC_INTEGER_8’
typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_8) gfc_array_i8;
^
libgfortran/libgfortran.h:245:3: note: in definition of macro ‘GFC_ARRAY_DESCRIPTOR’
type *data;\
^
libgfortran/libgfortran.h:259:51: error: unknown type name ‘GFC_REAL_4’
typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_REAL_4) gfc_array_r4;
^
libgfortran/libgfortran.h:245:3: note: in definition of macro ‘GFC_ARRAY_DESCRIPTOR’
type *data;\
^
libgfortran/libgfortran.h:260:51: error: unknown type name ‘GFC_REAL_8’
typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_REAL_8) gfc_array_r8;
^
libgfortran/libgfortran.h:245:3: note: in definition of macro ‘GFC_ARRAY_DESCRIPTOR’
type *data;\
^
libgfortran/libgfortran.h:267:51: error: unknown type name ‘GFC_COMPLEX_4’
typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_COMPLEX_4) gfc_array_c4;
^
libgfortran/libgfortran.h:245:3: note: in definition of macro ‘GFC_ARRAY_DESCRIPTOR’
type *data;\
^
libgfortran/libgfortran.h:268:51: error: unknown type name ‘GFC_COMPLEX_8’
typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_COMPLEX_8) gfc_array_c8;
^
libgfortran/libgfortran.h:245:3: note: in definition of macro ‘GFC_ARRAY_DESCRIPTOR’
type *data;\
^
libgfortran/libgfortran.h:275:51: error: unknown type name ‘GFC_LOGICAL_4’
typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_4) gfc_array_l4;
^
libgfortran/libgfortran.h:245:3: note: in definition of macro ‘GFC_ARRAY_DESCRIPTOR’
type *data;\
^
libgfortran/libgfortran.h:276:51: error: unknown type name ‘GFC_LOGICAL_8’
typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_8) gfc_array_l8;
^
libgfortran/libgfortran.h:245:3: note: in definition of macro ‘GFC_ARRAY_DESCRIPTOR’
type *data;\
^
libgfortran/libgfortran.h:456:51: error: expected ‘)’ before ‘char’
extern const char *gfc_itoa (GFC_INTEGER_LARGEST, char *, size_t);
^
In file included from libgfortran/runtime/compile_options.c:32:0:
libgfortran/libgfortran.h:457:16: error: ‘gfc_itoa’ undeclared here (not in a function)
internal_proto(gfc_itoa);
^
libgfortran/libgfortran.h:79:52: note: in definition of macro ‘sym_rename2’
#define sym_rename2(old, ulp, new) extern __typeof(old) old __asm__(#ulp #new)
^
libgfortran/libgfortran.h:77:30: note: in expansion of macro ‘sym_rename1’
#define sym_rename(old, new) sym_rename1(old, __USER_LABEL_PREFIX__, new)
^
libgfortran/libgfortran.h:120:28: note: in expansion of macro ‘sym_rename’
# define internal_proto(x) sym_rename(x, IPREFIX(x))
^
libgfortran/libgfortran.h:457:1: note: in expansion of macro ‘internal_proto’
internal_proto(gfc_itoa);
^
In file included from libgfortran/runtime/compile_options.c:32:0:
libgfortran/libgfortran.h:459:48: error: expected ‘)’ before ‘char’
extern const char *xtoa (GFC_UINTEGER_LARGEST, char *, size_t);
^
In file included from libgfortran/runtime/compile_options.c:32:0:
libgfortran/libgfortran.h:460:16: error: ‘xtoa’ undeclared here (not in a function)
internal_proto(xtoa);
^
libgfortran/libgfortran.h:79:52: note: in definition of macro ‘sym_rename2’
#define sym_rename2(old, ulp, new) extern __typeof(old) old __asm__(#ulp #new)
^
libgfortran/libgfortran.h:77:30: note: in expansion of macro ‘sym_rename1’
#define sym_rename(old, new) sym_rename1(old, __USER_LABEL_PREFIX__, new)
^
libgfortran/libgfortran.h:120:28: note: in expansion of macro ‘sym_rename’
# define internal_proto(x) sym_rename(x, IPREFIX(x))
^
libgfortran/libgfortran.h:460:1: note: in expansion of macro ‘internal_proto’
internal_proto(xtoa);
^
In file included from libgfortran/runtime/compile_options.c:32:0:
libgfortran/libgfortran.h:550:1: warning: parameter names (without types) in function declaration
extern void stop_numeric (GFC_INTEGER_4);
^
libgfortran/libgfortran.h:563:1: error: unknown type name ‘GFC_INTEGER_4’
GFC_INTEGER_4 *internal_pack_4 (gfc_array_i4 *);
^
libgfortran/libgfortran.h:566:1: error: unknown type name ‘GFC_INTEGER_8’
GFC_INTEGER_8 *internal_pack_8 (gfc_array_i8 *);
^
libgfortran/libgfortran.h:574:1: error: unknown type name ‘GFC_COMPLEX_4’
GFC_COMPLEX_4 *internal_pack_c4 (gfc_array_c4 *);
^
libgfortran/libgfortran.h:577:1: error: unknown type name ‘GFC_COMPLEX_8’
GFC_COMPLEX_8 *internal_pack_c8 (gfc_array_c8 *);
^
libgfortran/libgfortran.h:585:54: error: unknown type name ‘GFC_INTEGER_4’
extern void internal_unpack_4 (gfc_array_i4 *, const GFC_INTEGER_4 *);
^
libgfortran/libgfortran.h:588:54: error: unknown type name ‘GFC_INTEGER_8’
extern void internal_unpack_8 (gfc_array_i8 *, const GFC_INTEGER_8 *);
^
libgfortran/libgfortran.h:596:55: error: unknown type name ‘GFC_COMPLEX_4’
extern void internal_unpack_c4 (gfc_array_c4 *, const GFC_COMPLEX_4 *);
^
libgfortran/libgfortran.h:599:55: error: unknown type name ‘GFC_COMPLEX_8’
extern void internal_unpack_c8 (gfc_array_c8 *, const GFC_COMPLEX_8 *);
^
libgfortran/libgfortran.h:609:8: error: unknown type name ‘GFC_INTEGER_4’
extern GFC_INTEGER_4 compare_string (GFC_INTEGER_4, const char *,
^
libgfortran/libgfortran.h:609:53: error: expected ‘)’ before ‘const’
extern GFC_INTEGER_4 compare_string (GFC_INTEGER_4, const char *,
^
In file included from libgfortran/runtime/compile_options.c:32:0:
libgfortran/libgfortran.h:611:15: error: ‘compare_string’ undeclared here (not in a function)
iexport_proto(compare_string);
^
libgfortran/libgfortran.h:79:52: note: in definition of macro ‘sym_rename2’
#define sym_rename2(old, ulp, new) extern __typeof(old) old __asm__(#ulp #new)
^
libgfortran/libgfortran.h:77:30: note: in expansion of macro ‘sym_rename1’
#define sym_rename(old, new) sym_rename1(old, __USER_LABEL_PREFIX__, new)
^
libgfortran/libgfortran.h:139:26: note: in expansion of macro ‘sym_rename’
# define export_proto(x) sym_rename(x, PREFIX(x))
^
libgfortran/libgfortran.h:141:27: note: in expansion of macro ‘export_proto’
# define iexport_proto(x) export_proto(x)
^
libgfortran/libgfortran.h:611:1: note: in expansion of macro ‘iexport_proto’
iexport_proto(compare_string);
^
In file included from libgfortran/runtime/compile_options.c:32:0:
libgfortran/libgfortran.h:615:26: error: unknown type name ‘GFC_INTEGER_4’
extern void random_seed (GFC_INTEGER_4 * size, gfc_array_i4 * put,
^
In file included from libgfortran/runtime/compile_options.c:32:0:
libgfortran/libgfortran.h:617:15: error: ‘random_seed’ undeclared here (not in a function)
iexport_proto(random_seed);
^
libgfortran/libgfortran.h:79:52: note: in definition of macro ‘sym_rename2’
#define sym_rename2(old, ulp, new) extern __typeof(old) old __asm__(#ulp #new)
^
libgfortran/libgfortran.h:77:30: note: in expansion of macro ‘sym_rename1’
#define sym_rename(old, new) sym_rename1(old, __USER_LABEL_PREFIX__, new)
^
libgfortran/libgfortran.h:139:26: note: in expansion of macro ‘sym_rename’
# define export_proto(x) sym_rename(x, PREFIX(x))
^
libgfortran/libgfortran.h:141:27: note: in expansion of macro ‘export_proto’
# define iexport_proto(x) export_proto(x)
^
libgfortran/libgfortran.h:617:1: note: in expansion of macro ‘iexport_proto’
iexport_proto(random_seed);
^
In file included from libgfortran/runtime/compile_options.c:32:0:
libgfortran/libgfortran.h:621:8: error: unknown type name ‘GFC_REAL_4’
extern GFC_REAL_4 normalize_r4_i4 (GFC_UINTEGER_4, GFC_UINTEGER_4);
^
libgfortran/libgfortran.h:621:1: warning: parameter names (without types) in function declaration
extern GFC_REAL_4 normalize_r4_i4 (GFC_UINTEGER_4, GFC_UINTEGER_4);
^
libgfortran/libgfortran.h:624:8: error: unknown type name ‘GFC_REAL_8’
extern GFC_REAL_8 normalize_r8_i8 (GFC_UINTEGER_8, GFC_UINTEGER_8);
^
libgfortran/libgfortran.h:624:1: warning: parameter names (without types) in function declaration
extern GFC_REAL_8 normalize_r8_i8 (GFC_UINTEGER_8, GFC_UINTEGER_8);
^
libgfortran/runtime/compile_options.c:40:1: warning: parameter names (without types) in function declaration
extern void set_std (GFC_INTEGER_4, GFC_INTEGER_4, GFC_INTEGER_4);
^
libgfortran/runtime/compile_options.c:45:10: error: unknown type name ‘GFC_INTEGER_4’
set_std (GFC_INTEGER_4 warn_std, GFC_INTEGER_4 allow_std,
^
libgfortran/runtime/compile_options.c:45:34: error: unknown type name ‘GFC_INTEGER_4’
set_std (GFC_INTEGER_4 warn_std, GFC_INTEGER_4 allow_std,
^
libgfortran/runtime/compile_options.c:46:3: error: unknown type name ‘GFC_INTEGER_4’
GFC_INTEGER_4 pedantic)
^
libgfortran/runtime/compile_options.c: In function ‘set_record_marker’:
libgfortran/runtime/compile_options.c:89:19: error: ‘GFC_INTEGER_4’ undeclared (first use in this function)
if (sizeof (GFC_INTEGER_4) != sizeof (gfc_offset))
^
libgfortran/runtime/compile_options.c:89:19: note: each undeclared identifier is reported only once for each function it appears in
libgfortran/runtime/compile_options.c:94:19: error: ‘GFC_INTEGER_8’ undeclared (first use in this function)
if (sizeof (GFC_INTEGER_8) != sizeof (gfc_offset))
^
make[1]: *** [compile_options.lo] Error 1
make[1]: Leaving directory `C:/Users/jdoubleb/Documents/Academia/Cygwin_etal/gcc-4.1.1'
make: *** [all] Error 2
J Double B#jdoubleb-PC /gcc-4.1.1
*FROM LINUX*
[wexlerlab#AirWay~/Jeremiah/gcc-fortran-4.1.1/gcc-4.1.1 ]$ make
cat: libgfortran/../gcc/BASE-VER: No such file or directory
/bin/sh libgfortran/mk-sik-inc.sh 'gfortran -I . -Wall -fno-repack-arrays -fno-underscoring -g -O2' > selected_int_kind.inc || rm selected_int_kind.inc
/bin/sh libgfortran/mk-srk-inc.sh 'gfortran -I . -Wall -fno-repack-arrays -fno-underscoring -g -O2' > selected_real_kind.inc || rm selected_real_kind.inc
/bin/sh libgfortran/mk-kinds-h.sh 'gfortran -I . -Wall -fno-repack-arrays -fno-underscoring -g -O2' > kinds.h || rm kinds.h
grep '^#' < kinds.h > kinds.inc
grep '^#' < libgfortran/c99_protos.h > c99_protos.inc
cp libgfortran/config/fpu-glibc.h fpu-target.h
make all-am
cat: libgfortran/../gcc/BASE-VER: No such file or directory
make[1]: Entering directory `/home/wexlerlab/Jeremiah/gcc-fortran-4.1.1/gcc-4.1.1'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -Ilibgfortran -I. -iquotelibgfortran/io -Ilibgfortran/../gcc -Ilibgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -c -o compile_options.lo `test -f 'runtime/compile_options.c' || echo 'libgfortran/'`runtime/compile_options.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -Ilibgfortran -I. -iquotelibgfortran/io -Ilibgfortran/../gcc -Ilibgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -c libgfortran/runtime/compile_options.c -fPIC -DPIC -o .libs/compile_options.o
gcc -DHAVE_CONFIG_H -I. -Ilibgfortran -I. -iquotelibgfortran/io -Ilibgfortran/../gcc -Ilibgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -c libgfortran/runtime/compile_options.c -o compile_options.o >/dev/null 2>&1
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -Ilibgfortran -I. -iquotelibgfortran/io -Ilibgfortran/../gcc -Ilibgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -c -o environ.lo `test -f 'runtime/environ.c' || echo 'libgfortran/'`runtime/environ.c
gcc -DHAVE_CONFIG_H -I. -Ilibgfortran -I. -iquotelibgfortran/io -Ilibgfortran/../gcc -Ilibgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -c libgfortran/runtime/environ.c -fPIC -DPIC -o .libs/environ.o
In file included from libgfortran/runtime/environ.c:37:
libgfortran/runtime/../io/io.h:36:18: error: gthr.h: No such file or directory
In file included from libgfortran/runtime/environ.c:37:
libgfortran/runtime/../io/io.h:504: error: expected specifier-qualifier-list before '__gthread_mutex_t'
libgfortran/runtime/../io/io.h:699: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unit_lock'
libgfortran/runtime/../io/io.h:700: error: 'unit_lock' undeclared here (not in a function)
libgfortran/runtime/../io/io.h:700: warning: type defaults to 'int' in declaration of 'unit_lock'
libgfortran/runtime/../io/io.h: In function 'inc_waiting_locked':
libgfortran/runtime/../io/io.h:890: error: 'gfc_unit' has no member named 'waiting'
libgfortran/runtime/../io/io.h:890: error: incompatible type for argument 1 of '__sync_fetch_and_add'
libgfortran/runtime/../io/io.h: In function 'predec_waiting_locked':
libgfortran/runtime/../io/io.h:900: error: 'gfc_unit' has no member named 'waiting'
libgfortran/runtime/../io/io.h:900: error: incompatible type for argument 1 of '__sync_add_and_fetch'
libgfortran/runtime/../io/io.h:904: warning: control reaches end of non-void function
libgfortran/runtime/../io/io.h: In function 'dec_waiting_unlocked':
libgfortran/runtime/../io/io.h:910: error: 'gfc_unit' has no member named 'waiting'
libgfortran/runtime/../io/io.h:910: error: incompatible type for argument 1 of '__sync_fetch_and_add'
make[1]: *** [environ.lo] Error 1
make[1]: Leaving directory `/home/wexlerlab/Jeremiah/gcc-fortran-4.1.1/gcc-4.1.1'
make: *** [all] Error 2
[wexlerlab#AirWay~/Jeremiah/gcc-fortran-4.1.1/gcc-4.1.1 ]$ cd libgfortran/
[wexlerlab#AirWay~/Jeremiah/gcc-fortran-4.1.1/gcc-4.1.1/libgfortran ]$ automake
[wexlerlab#AirWay~/Jeremiah/gcc-fortran-4.1.1/gcc-4.1.1/libgfortran ]$ cd..
-bash: cd..: command not found
[wexlerlab#AirWay~/Jeremiah/gcc-fortran-4.1.1/gcc-4.1.1/libgfortran ]$ make
make: *** No targets specified and no makefile found. Stop.
[wexlerlab#AirWay~/Jeremiah/gcc-fortran-4.1.1/gcc-4.1.1/libgfortran ]$ cd ..
[wexlerlab#AirWay~/Jeremiah/gcc-fortran-4.1.1/gcc-4.1.1 ]$ make
cat: libgfortran/../gcc/BASE-VER: No such file or directory
cd . && /bin/sh ./config.status Makefile
config.status: creating Makefile
cat: libgfortran/../gcc/BASE-VER: No such file or directory
make all-am
cat: libgfortran/../gcc/BASE-VER: No such file or directory
make[1]: Entering directory `/home/wexlerlab/Jeremiah/gcc-fortran-4.1.1/gcc-4.1.1'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -Ilibgfortran -I. -iquotelibgfortran/io -Ilibgfortran/../gcc -Ilibgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -c -o environ.lo `test -f 'runtime/environ.c' || echo 'libgfortran/'`runtime/environ.c
gcc -DHAVE_CONFIG_H -I. -Ilibgfortran -I. -iquotelibgfortran/io -Ilibgfortran/../gcc -Ilibgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -c libgfortran/runtime/environ.c -fPIC -DPIC -o .libs/environ.o
In file included from libgfortran/runtime/environ.c:37:
libgfortran/runtime/../io/io.h:36:18: error: gthr.h: No such file or directory
In file included from libgfortran/runtime/environ.c:37:
libgfortran/runtime/../io/io.h:504: error: expected specifier-qualifier-list before '__gthread_mutex_t'
libgfortran/runtime/../io/io.h:699: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unit_lock'
libgfortran/runtime/../io/io.h:700: error: 'unit_lock' undeclared here (not in a function)
libgfortran/runtime/../io/io.h:700: warning: type defaults to 'int' in declaration of 'unit_lock'
libgfortran/runtime/../io/io.h: In function 'inc_waiting_locked':
libgfortran/runtime/../io/io.h:890: error: 'gfc_unit' has no member named 'waiting'
libgfortran/runtime/../io/io.h:890: error: incompatible type for argument 1 of '__sync_fetch_and_add'
libgfortran/runtime/../io/io.h: In function 'predec_waiting_locked':
libgfortran/runtime/../io/io.h:900: error: 'gfc_unit' has no member named 'waiting'
libgfortran/runtime/../io/io.h:900: error: incompatible type for argument 1 of '__sync_add_and_fetch'
libgfortran/runtime/../io/io.h:904: warning: control reaches end of non-void function
libgfortran/runtime/../io/io.h: In function 'dec_waiting_unlocked':
libgfortran/runtime/../io/io.h:910: error: 'gfc_unit' has no member named 'waiting'
libgfortran/runtime/../io/io.h:910: error: incompatible type for argument 1 of '__sync_fetch_and_add'
make[1]: *** [environ.lo] Error 1
make[1]: Leaving directory `/home/wexlerlab/Jeremiah/gcc-fortran-4.1.1/gcc-4.1.1'
make: *** [all] Error 2
[wexlerlab#AirWay~/Jeremiah/gcc-fortran-4.1.1/gcc-4.1.1 ]$

Related

I have a very strange error in my build.log file when running make -j2 error in debian 8

When running ./bin/gbuild ../learncoin/contrib/gitian-descriptors/deps-win32.yml in gitian-builder on debian 8 in a VM i get this error and have no idea how to fix it. If anyone can help it would be awesome. Thanks Jamie ;)
+ make -j2 library_build
./libtool --mode=compile i686-w64-mingw32-gcc -c -I. -I../dist/.. -O3 ../dist/../mutex/mut_win32.c
./libtool --mode=compile i686-w64-mingw32-gcc -c -I. -I../dist/.. -O3 ../dist/../btree/bt_compare.c
libtool: compile: i686-w64-mingw32-gcc -c -I. -I../dist/.. -O3 ../dist/../mutex/mut_win32.c -o mut_win32.o
libtool: compile: i686-w64-mingw32-gcc -c -I. -I../dist/.. -O3 ../dist/../btree/bt_compare.c -o bt_compare.o
In file included from ../dist/../mutex/mut_win32.c:9:0:
./db_config.h:600:19: error: two or more data types in declaration specifiers
#define socklen_t int
^
../dist/../dbinc/repmgr.h:502:13: note: in expansion of macro ‘socklen_t’
typedef int socklen_t;
^
In file included from ./db_int.h:886:0,
from ../dist/../mutex/mut_win32.c:12:
../dist/../dbinc/repmgr.h:502:1: warning: useless type name in empty declaration [enabled by default]
typedef int socklen_t;
^
In file included from ../dist/../btree/bt_compare.c:44:0:
./db_config.h:600:19: error: two or more data types in declaration specifiers
#define socklen_t int
^
../dist/../dbinc/repmgr.h:502:13: note: in expansion of macro ‘socklen_t’
typedef int socklen_t;
^
In file included from ./db_int.h:886:0,
from ../dist/../btree/bt_compare.c:46:
../dist/../dbinc/repmgr.h:502:1: warning: useless type name in empty declaration [enabled by default]
typedef int socklen_t;
^
make: *** [mut_win32.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [bt_compare.o] Error 1
I am not sure if there is something with make.But You can pass -O option for better diagnositic to print correct make invocations running in parallel.This option instructs make to save the output from the commands it invokes and print it all once the commands are completed.
make -j2 -O
Based on the output you can then check the declarations of socklen_t if it is int or uint32_t

interpreting make MingW error windows

I'm looking for a push in the right direction. I am trying to compile the c++ code from this repo https://github.com/yujiali/pygco.
I am running make (g++) from within git bash.
Make all ran perfectly.
$ make all
g++ -fPIC \
-c gco_source/LinkedBlockList.cpp \
-o gco_source/LinkedBlockList.o
gco_source/LinkedBlockList.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
g++ -fPIC \
-c gco_source/graph.cpp \
-o gco_source/graph.o
gco_source/graph.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
g++ -fPIC \
-c gco_source/maxflow.cpp \
-o gco_source/maxflow.o
gco_source/maxflow.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
g++ -fPIC \
-c gco_source/GCoptimization.cpp \
-o gco_source/GCoptimization.o
gco_source/GCoptimization.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
gco_source/GCoptimization.cpp:18:0: warning: "NOMINMAX" redefined [enabled by default]
c:\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/i686-w64-mingw32/bits/os_defines.h:46:0: note: this is the location of the previous definition
gco_source/GCoptimization.cpp:21:23: warning: 'GCO_CLOCKS_PER_SEC' initialized and declared 'extern' [enabled by default]
g++ -fPIC \
-c cgco.cpp \
-o cgco.o
cgco.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
g++ -shared -fPIC \
gco_source/LinkedBlockList.o \
gco_source/graph.o \
gco_source/maxflow.o \
gco_source/GCoptimization.o \
cgco.o \
-o libcgco.so
looking good so far
$ make test_wrapper
g++ -L. test_wrapper.cpp \
-o test_wrapper -lcgco
c:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lcgco
collect2: ld returned 1 exit status
make: *** [test_wrapper] Error 1
Any guesses on what the -lcgco flag means here? Is this a windows error, a make error, and MingW error, or specific to the code i'm compiling?
Any suggestions on where to go from here?

error: command 'gcc' failed with exit status 1 while installing matplotlib

When installing matplotlib 1.3.0, getting below error
building 'matplotlib._png' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib__png_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. -I/usr/include/libpng12 -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/python2.7 -c src/_png.cpp -o build/temp.linux-x86_64-2.7/src/_png.o
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1781,
from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from src/_png.cpp:28:
/usr/local/lib/python2.7/site-enter code herepackages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
src/_png.cpp: In member function ‘Py::Object _png_module::write_png(const Py::Tuple&)’:
src/_png.cpp:147: error: ‘npy_PyFile_Dup’ was not declared in this scope
src/_png.cpp:243: error: ‘npy_PyFile_DupClose’ was not declared in this scope
src/_png.cpp:264: error: ‘npy_PyFile_DupClose’ was not declared in this scope
src/_png.cpp: In member function ‘PyObject* _png_module::_read_png(const Py::Object&, bool, int)’:
src/_png.cpp:329: error: ‘npy_PyFile_Dup’ was not declared in this scope
src/_png.cpp:577: error: ‘npy_PyFile_DupClose’ was not declared in this scope
error: command 'gcc' failed with exit status 1
In other post suggested to install python-dev and it is already installed on my server.
Thank you in advance
Krishna

NDK: has not been declared

I am compiling the C++ code using Android native library NDK but I am getting the following errors while trying to include the g729a.h file in g729_jni.cpp:
ERRORS:
Compile++ arm : g729_jni <= g729_jni.cpp
/usr/src/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ -MMD -MP -MF ./obj/local/armeabi/objs/g729_jni/g729_jni.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fno-exceptions -fno-rtti -O2 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -I/usr/src/android-ndk-r8/sources/cxx-stl/system/include -Ijni -DANDROID -O3 -Wa,--noexecstack -O2 -DNDEBUG -g -I/usr/src/android-ndk-r8/platforms/android-3/arch-arm/usr/include -c jni/g729_jni.cpp -o ./obj/local/armeabi/objs/g729_jni/g729_jni.o
In file included from jni/g729_jni.cpp:34:
jni/g729/g729a.h:70: error: 'UWord8' has not been declared
jni/g729/g729a.h:126: error: 'UWord8' has not been declared
jni/g729_jni.cpp: In function 'jint Java_org_sipdroid_codecs_G729_open(JNIEnv*, _jobject*)':
jni/g729_jni.cpp:72: error: 'UWord8' was not declared in this scope
jni/g729_jni.cpp: In function 'jint Java_org_sipdroid_codecs_G729_encode(JNIEnv*, _jobject*, _jshortArray*, jint, _jbyteArray*, jint)':
jni/g729_jni.cpp:111: error: 'UWord8' was not declared in this scope
jni/g729_jni.cpp:111: error: expected ';' before 'serial'
jni/g729_jni.cpp:125: error: 'serial' was not declared in this scope
jni/g729_jni.cpp: In function 'jint Java_org_sipdroid_codecs_G729_decode(JNIEnv*, _jobject*, _jbyteArray*, _jshortArray*, jint)':
jni/g729_jni.cpp:156: error: cannot convert 'unsigned char*' to 'int*' for argument '2' to 'void g729a_dec_process(void*, int*, Word16*, Flag)'
make: *** [obj/local/armeabi/objs/g729_jni/g729_jni.o] Error 1
I googled to try and find the reason behind this error. As C++ is case sensitive, if we make a mistake in upper and lower case, then this kind of error occurs. But I didn't make this kind of mistakes.
If you have any idea or suggestion then please guide me through that.
Thanks
UPDATE:
[root#localhost sipdroid-read-only]# /usr/src/android-ndk-r8/ndk-build V=1 APP_ABI=armeabi APP_PROJECT_PATH=. obj/local/armeabi/objs/g729_jni/g729_jni.o
make: `obj/local/armeabi/objs/g729_jni/g729_jni.o' is up to date.
Make sure your typedef.h is similar to http://siphon.googlecode.com/svn/trunk/g729a/Headers/typedef.h
Here are the steps I made to reproduce your problem:
svn checkout http://sipdroid.googlecode.com/svn/trunk/ sipdroid
cd sipdroid
sed "s/^SILK/include $(CLEAR_VARS)\\nSILK/" -i jni/Android.mk
(note that Android.mk needed a fix after line 89).
svn checkout http://siphon.googlecode.com/svn/trunk/ ../siphon
cp -d ../siphon/g729a/Headers/ jni/g729
wget http://pastie.org/pastes/4737332/download -O jni/g729/g729a.h
wget "http://sipdroid.googlecode.com/issues/attachment?aid=7963991223373796529&name=g729_jni.cpp&token=KHEZCoq6ZYSuV_VhsV8fC3uwsSs%3A1348058591979" -O jni/g729_jni.cpp
sed -e "s/g722_jni/g729_jni/" -i jni/Android.mk
ndk-build.cmd V=1 APP_ABI=armeabi APP_PROJECT_PATH=. obj/local/armeabi/objs/g729_jni/g729_jni.o
... and your file compiles with a small warning. What have you done differently?

Make Errors: Missing Includes in C++ Script?

I just got help in how to compile this script a few mintues ago on SO but I have managed to get errors. I am only a beginner in C++ and have no idea what the below erros means or how to fix it.
This is the script in question. I have read the comments from some users suggesting they changed the #include parts but it seems to be exactly what the script has, see this comment.
[root#localhost wkthumb]# qmake-qt4 && make
g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -I. -o main.o main.cpp
main.cpp:5:20: error: QWebView: No such file or directory
main.cpp:6:21: error: QWebFrame: No such file or directory
main.cpp:8: error: expected constructor, destructor, or type conversion before ‘*’ token
main.cpp:11: error: ‘QWebView’ has not been declared
main.cpp: In function ‘void loadFinished(bool)’:
main.cpp:18: error: ‘view’ was not declared in this scope
main.cpp:18: error: ‘QWebSettings’ has not been declared
main.cpp:19: error: ‘QWebSettings’ has not been declared
main.cpp:20: error: ‘QWebSettings’ has not been declared
main.cpp: In function ‘int main(int, char**)’:
main.cpp:42: error: ‘view’ was not declared in this scope
main.cpp:42: error: expected type-specifier before ‘QWebView’
main.cpp:42: error: expected `;' before ‘QWebView’
make: *** [main.o] Error 1
I have the web kit on my Fedora Core 10 machine:
qt-4.5.3-9.fc10.i386
qt-devel-4.5.3-9.fc10.i386
Thanks all for any help
The error message indicates that the compiler cannot find what you're trying to include, i.e. <QWebView>. The way to tell the compiler where to look is with the -I flag, to specify include directories (these are not recursive).
Currently, you set the following include dirs:
-I/usr/lib/qt4/mkspecs/linux-g++
-I.
-I/usr/include/QtCore
-I/usr/include/QtGui
-I/usr/include
You need to find where QWebView is located on your system, and add the include path to the commandline (or install QWebView into one of the above dirs).
General note: When you get a lot of errors like this, focus on the first one or two. The later errors (such as ‘QWebView’ has not been declared) will probably be solved by fixing the missing-include error.
main.cpp:18: error: ‘view’ was not declared in this scope
Looks like namespaces have to be provided in the code. Read on namespaces.
main.cpp:20: error: ‘QWebSettings’ has not been declared
No type definition available, can be missing include.