Bug 37527 - conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'
Summary: conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before ...
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-15 19:47 UTC by Reuben Kraft
Modified: 2009-03-28 09:35 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Config log from gcc-4.3.2/x86_64-unknown-linux-gnu/libgfortran/config.log (8.03 KB, text/plain)
2008-09-15 19:49 UTC, Reuben Kraft
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Kraft 2008-09-15 19:47:28 UTC
Hi, 

I am trying to compile GCC4.3.2 on Linux x86_64.  I am getting the following compile error:

configure: error: GNU Fortran is not working; please report a bug in http://gcc.gnu.org/bugzilla, attaching /home/rkraft/apps/gcc-4.3.2/x86_64-unknown-linux-gnu/libgfortran/config.log
make[1]: *** [configure-target-libgfortran] Error 1
make[1]: Leaving directory `/home/rkraft/apps/gcc-4.3.2'

In gcc-4.3.2/x86_64-unknown-linux-gnu/libgfortran/config.log:
conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'


My configure options are:
./configure 
--prefix=/home/rkraft/apps/gcc-4.3.2
--with-mpfr=/home/rkraft/apps/mpfr-2.3.2 
--disable-multilib 
--enable-languages=c,c++,fortran 
--with-gmp=/home/rkraft/apps/gmp-4.2.3  
--with-gmp-lib=/home/rkraft/apps/gmp-4.2.3/lib 
--with-mpfr-lib=/home/rkraft/apps/mpfr-2.3.2/lib

I have also set:
export LD_LIBRARY_PATH=/home/rkraft/apps/mpfr-2.3.2/lib:/home/rkraft/apps/gmp-4.2.3/lib

Any ideas how to fix this?
Comment 1 Reuben Kraft 2008-09-15 19:49:12 UTC
Created attachment 16328 [details]
Config log from gcc-4.3.2/x86_64-unknown-linux-gnu/libgfortran/config.log
Comment 2 Andrew Pinski 2008-09-15 19:51:49 UTC
/home/rkraft/apps/gcc-4.3.2/libgfortran/configure: line 13399: /home/rkraft/apps/gcc-4.3.2/host-x86_64-unknown-linux-gnu/gcc/gfortran: No such file or directory

Comment 3 Andrew Pinski 2008-09-15 19:52:55 UTC
Oh building in the source directory is not really supported.
Can you try building in a different object directory?
Comment 4 Reuben Kraft 2008-09-16 12:00:46 UTC
(In reply to comment #3)
> Oh building in the source directory is not really supported.
> Can you try building in a different object directory?
> 


Using a different object directory I was able to compile c and c++, but not fortran.  I configured with:
./configure 
--prefix=/home/rkraft/apps/gcc4 
--with-mpfr=/home/rkraft/apps/mpfr-2.3.2 
--disable-multilib 
--enable-languages=c,c++,fortran 
--with-gmp=/home/rkraft/apps/gmp-4.2.3  
--with-gmp-lib=/home/rkraft/apps/gmp-4.2.3/lib 
--with-mpfr-lib=/home/rkraft/apps/mpfr-2.3.2/lib

in the config.log file from I searched for "error" and found these:
--conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'
--conftest.c:9:28: error: ac_nonexistent.h: No such file or directory
--conftest.c:70:27: error: floatingpoint.h: No such file or directory
--conftest.c:70:20: error: ieeefp.h: No such file or directory
--conftest.c:71:20: error: fptrap.h: No such file or directory


I don't thing gfortran in getting compiled, but it is hard to determine because all errors are output on the terminal.  Where can I find error messages?

Thanks for your time.

Comment 5 Reuben Kraft 2008-09-16 13:13:52 UTC
My problem looks very similar to this bug report which does not seem to be full resolved:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36349
Comment 6 Mikael Morin 2008-12-08 22:17:09 UTC
(In reply to comment #4)
> 
> Using a different object directory I was able to compile c and c++, but not
> fortran.  I configured with:
> ./configure 
> --prefix=/home/rkraft/apps/gcc4 
> --with-mpfr=/home/rkraft/apps/mpfr-2.3.2 
> --disable-multilib 
> --enable-languages=c,c++,fortran 
> --with-gmp=/home/rkraft/apps/gmp-4.2.3  
> --with-gmp-lib=/home/rkraft/apps/gmp-4.2.3/lib 
> --with-mpfr-lib=/home/rkraft/apps/mpfr-2.3.2/lib
> 
This is still wrong. 
If you are using a separated build directory, your command shall look like:
../gcc-4.3.2/configure (your options here ...)

Does it work now ?
Comment 7 Francois-Xavier Coudert 2009-03-28 09:35:54 UTC
Closing for now. Please reopen with additional information if you still have issues building gfortran.