This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/35471] New: gfortran build fails in libgfortran


gfortran build fails due to "complex" not being defined in kinds.h.  Though the
system has a <complex.h>, #define for complex is missing in it.  Fix is to
include

#ifndef complex
#define complex __complex__
#endif

at top of kinds.h, or to explicitly check for complex type in
libgfortran/configure.ac

....
gmake[2]: Entering directory
`/usr2/local/src/gcc-4.3-20080204/gcc-linux/i686-pc-linux-gnu/libgfortran'
/bin/sh ../../../gcc/libgfortran/mk-sik-inc.sh
'/usr2/local/src/gcc-4.3-20080204/gcc-linux/./gcc/gfortran
-B/usr2/local/src/gcc-4.3-20080204/gcc-linux/./gcc/
-B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/
-isystem /usr/local/i686-pc-linux-gnu/include -isystem
/usr/local/i686-pc-linux-gnu/sys-include -I . -Wall -fno-repack-arrays
-fno-underscoring -g -O2' > selected_int_kind.inc || rm selected_int_kind.inc
/bin/sh ../../../gcc/libgfortran/mk-srk-inc.sh
'/usr2/local/src/gcc-4.3-20080204/gcc-linux/./gcc/gfortran
-B/usr2/local/src/gcc-4.3-20080204/gcc-linux/./gcc/
-B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/
-isystem /usr/local/i686-pc-linux-gnu/include -isystem
/usr/local/i686-pc-linux-gnu/sys-include -I . -Wall -fno-repack-arrays
-fno-underscoring -g -O2' > selected_real_kind.inc || rm selected_real_kind.inc
/bin/sh ../../../gcc/libgfortran/mk-kinds-h.sh
'/usr2/local/src/gcc-4.3-20080204/gcc-linux/./gcc/gfortran
-B/usr2/local/src/gcc-4.3-20080204/gcc-linux/./gcc/
-B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/
-isystem /usr/local/i686-pc-linux-gnu/include -isystem
/usr/local/i686-pc-linux-gnu/sys-include -I . -Wall -fno-repack-arrays
-fno-underscoring -g -O2' > kinds.h || rm kinds.h
grep '^#' < kinds.h > kinds.inc
grep '^#' < ../../../gcc/libgfortran/c99_protos.h > c99_protos.inc
cp ../../../gcc/libgfortran/config/fpu-387.h fpu-target.h
gmake  all-am
gmake[3]: Entering directory
`/usr2/local/src/gcc-4.3-20080204/gcc-linux/i686-pc-linux-gnu/libgfortran'
if /bin/sh ./libtool --tag=CC --mode=compile
/usr2/local/src/gcc-4.3-20080204/gcc-linux/./gcc/xgcc
-B/usr2/local/src/gcc-4.3-20080204/gcc-linux/./gcc/
-B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/
-isystem /usr/local/i686-pc-linux-gnu/include -isystem
/usr/local/i686-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I.
-I../../../gcc/libgfortran -I.  -iquote../../../gcc/libgfortran/io
-I../../../gcc/libgfortran/../gcc -I../../../gcc/libgfortran/../gcc/config
-I../.././gcc -D_GNU_SOURCE  -std=gnu99 -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -O2 -g -g
-O2   -MT fmain.lo -MD -MP -MF ".deps/fmain.Tpo" -c -o fmain.lo
../../../gcc/libgfortran/fmain.c; \
        then mv -f ".deps/fmain.Tpo" ".deps/fmain.Plo"; else rm -f
".deps/fmain.Tpo"; exit 1; fi
libtool: compile:  /usr2/local/src/gcc-4.3-20080204/gcc-linux/./gcc/xgcc
-B/usr2/local/src/gcc-4.3-20080204/gcc-linux/./gcc/
-B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/
-isystem /usr/local/i686-pc-linux-gnu/include -isystem
/usr/local/i686-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I.
-I../../../gcc/libgfortran -I. -iquote../../../gcc/libgfortran/io
-I../../../gcc/libgfortran/../gcc -I../../../gcc/libgfortran/../gcc/config
-I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -O2 -g -g
-O2 -MT fmain.lo -MD -MP -MF .deps/fmain.Tpo -c
../../../gcc/libgfortran/fmain.c  -fPIC -DPIC -o .libs/fmain.o
In file included from ../../../gcc/libgfortran/libgfortran.h:211,
                 from ../../../gcc/libgfortran/fmain.c:1:
./kinds.h:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'float'
./kinds.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'double'
./kinds.h:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'long'
In file included from ../../../gcc/libgfortran/fmain.c:1:
../../../gcc/libgfortran/libgfortran.h:287: error: expected
specifier-qualifier-list before 'GFC_COMPLEX_4'
../../../gcc/libgfortran/libgfortran.h:288: error: expected
specifier-qualifier-list before 'GFC_COMPLEX_8'
../../../gcc/libgfortran/libgfortran.h:290: error: expected
specifier-qualifier-list before 'GFC_COMPLEX_10'
../../../gcc/libgfortran/libgfortran.h:627: error: expected '=', ',', ';',
'asm' or '__attribute__' before '*' token
../../../gcc/libgfortran/libgfortran.h:628: error: 'internal_pack_c4'
undeclared here (not in a function)
../../../gcc/libgfortran/libgfortran.h:628: warning: type defaults to 'int' in
declaration of 'internal_pack_c4'
../../../gcc/libgfortran/libgfortran.h:630: error: expected '=', ',', ';',
'asm' or '__attribute__' before '*' token
../../../gcc/libgfortran/libgfortran.h:631: error: 'internal_pack_c8'
undeclared here (not in a function)
../../../gcc/libgfortran/libgfortran.h:631: warning: type defaults to 'int' in
declaration of 'internal_pack_c8'
../../../gcc/libgfortran/libgfortran.h:634: error: expected '=', ',', ';',
'asm' or '__attribute__' before '*' token
../../../gcc/libgfortran/libgfortran.h:635: error: 'internal_pack_c10'
undeclared here (not in a function)
../../../gcc/libgfortran/libgfortran.h:635: warning: type defaults to 'int' in
declaration of 'internal_pack_c10'
../../../gcc/libgfortran/libgfortran.h:649: warning: type defaults to 'int' in
declaration of 'GFC_COMPLEX_4'
../../../gcc/libgfortran/libgfortran.h:649: error: expected ';', ',' or ')'
before '*' token
../../../gcc/libgfortran/libgfortran.h:650: error: 'internal_unpack_c4'
undeclared here (not in a function)
../../../gcc/libgfortran/libgfortran.h:650: warning: type defaults to 'int' in
declaration of 'internal_unpack_c4'
../../../gcc/libgfortran/libgfortran.h:652: warning: type defaults to 'int' in
declaration of 'GFC_COMPLEX_8'
../../../gcc/libgfortran/libgfortran.h:652: error: expected ';', ',' or ')'
before '*' token
../../../gcc/libgfortran/libgfortran.h:653: error: 'internal_unpack_c8'
undeclared here (not in a function)
../../../gcc/libgfortran/libgfortran.h:653: warning: type defaults to 'int' in
declaration of 'internal_unpack_c8'
../../../gcc/libgfortran/libgfortran.h:656: warning: type defaults to 'int' in
declaration of 'GFC_COMPLEX_10'
../../../gcc/libgfortran/libgfortran.h:656: error: expected ';', ',' or ')'
before '*' token
../../../gcc/libgfortran/libgfortran.h:657: error: 'internal_unpack_c10'
undeclared here (not in a function)
../../../gcc/libgfortran/libgfortran.h:657: warning: type defaults to 'int' in
declaration of 'internal_unpack_c10'
gmake[3]: *** [fmain.lo] Error 1
gmake[3]: Leaving directory
`/usr2/local/src/gcc-4.3-20080204/gcc-linux/i686-pc-linux-gnu/libgfortran'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory
`/usr2/local/src/gcc-4.3-20080204/gcc-linux/i686-pc-linux-gnu/libgfortran'
gmake[1]: *** [all-target-libgfortran] Error 2
gmake[1]: Leaving directory `/usr2/local/src/gcc-4.3-20080204/gcc-linux'
gmake: *** [all] Error 2


-- 
           Summary: gfortran build fails in libgfortran
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: george at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35471


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]