public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* failed building gcc 4.6 from sources on linux mint 2.6.35-28-generic, when doing Fortran build
@ 2011-03-27 12:13 Nasser M. Abbasi
  2011-03-27 12:29 ` Marc Glisse
  0 siblings, 1 reply; 6+ messages in thread
From: Nasser M. Abbasi @ 2011-03-27 12:13 UTC (permalink / raw)
  To: gcc-help

I am not sure if I should report this as a bug, or not. Thought
first to ask here.

I am trying to build gcc 4.6 which I downloaded today. I followed
all instructions, did the following:

1. build/install  m4-latest
2. build/install  gmp-5.0.01
3. build/install  mpfr-3.0.0
4. build/install  mpc-0.9
5. and now for gcc 4.6:

./configure
make  

This after about 2 hrs compiling, I get this error:

c-4.6.0/host-i686-pc-linux-gnu/gcc/xgcc -B/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/host-i686-pc-linux-gnu/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
checking for suffix of object files... configure: error: in `/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/i686-pc-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0'
make: *** [all] Error 2

-----------------------------------

my current gcc is

  gcc -v
Using built-in specs.
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)

--------------------------------

I put the config.log file in this directory is someone wants to look at it

http://12000.org/tmp/march_27_2011/

ps. not sure if this is important or not, I am running linux on a VM machine. Installed
Linux mint on it.

thank you,
--Nasser

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: failed building gcc 4.6 from sources on linux mint 2.6.35-28-generic, when doing Fortran build
  2011-03-27 12:13 failed building gcc 4.6 from sources on linux mint 2.6.35-28-generic, when doing Fortran build Nasser M. Abbasi
@ 2011-03-27 12:29 ` Marc Glisse
  2011-03-27 19:58   ` Nasser M. Abbasi
  0 siblings, 1 reply; 6+ messages in thread
From: Marc Glisse @ 2011-03-27 12:29 UTC (permalink / raw)
  To: Nasser M. Abbasi; +Cc: gcc-help

On Sun, 27 Mar 2011, Nasser M. Abbasi wrote:

> I am trying to build gcc 4.6 which I downloaded today. I followed
> all instructions, did the following:
>
> 1. build/install  m4-latest
> 2. build/install  gmp-5.0.01
> 3. build/install  mpfr-3.0.0
> 4. build/install  mpc-0.9
> 5. and now for gcc 4.6:
>
> ./configure
> make 
> This after about 2 hrs compiling, I get this error:
>
> checking for suffix of object files... configure: error: in 
> `/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/i686-pc-linux-gnu/libgcc':
> configure: error: cannot compute suffix of object files: cannot compile
> See `config.log' for more details.
> make[2]: *** [configure-stage1-target-libgcc] Error 1
> make[2]: Leaving directory 
> `/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0'

See http://gcc.gnu.org/wiki/FAQ item 5.

-- 
Marc Glisse

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: failed building gcc 4.6 from sources on linux mint 2.6.35-28-generic, when doing Fortran build
  2011-03-27 12:29 ` Marc Glisse
@ 2011-03-27 19:58   ` Nasser M. Abbasi
  2011-03-27 20:18     ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Nasser M. Abbasi @ 2011-03-27 19:58 UTC (permalink / raw)
  To: gcc-help

On 3/27/2011 2:13 AM, Marc Glisse wrote:
> On Sun, 27 Mar 2011, Nasser M. Abbasi wrote:
>
>> I am trying to build gcc 4.6 which I downloaded today. I followed
>> all instructions, did the following:
>>
>> 1. build/install  m4-latest
>> 2. build/install  gmp-5.0.01
>> 3. build/install  mpfr-3.0.0
>> 4. build/install  mpc-0.9
>> 5. and now for gcc 4.6:
>>
>> ./configure
>> make
>> This after about 2 hrs compiling, I get this error:
>>
>> checking for suffix of object files... configure: error: in
>> `/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/i686-pc-linux-gnu/libgcc':
>> configure: error: cannot compute suffix of object files: cannot compile
>> See `config.log' for more details.
>> make[2]: *** [configure-stage1-target-libgcc] Error 1
>> make[2]: Leaving directory
>> `/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0'
>


> See http://gcc.gnu.org/wiki/FAQ item 5.
>

THanks Marc;

I looked at the above link. But not able to figure what is
wrong. I see no error in my config.log file, here it is again

http://12000.org/tmp/march_27_2011/

I did clean; ./configure; make and same error.

I am no expert in these things. Anything specific I should
try to do? Any one can see any error in the log file?

I do not need to build gcc 4.6 if I can help it, but
not able to find prebuild one for my system. When I use
synaptic package manager, it does not show gcc 4.6 there,
only 4.4. It uses the Ubuntu repositories. Can't
also find binaries for gcc 4.6 for windows.

Thanks
--Nasser

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: failed building gcc 4.6 from sources on linux mint 2.6.35-28-generic, when doing Fortran build
  2011-03-27 19:58   ` Nasser M. Abbasi
@ 2011-03-27 20:18     ` Jonathan Wakely
  2011-03-28  1:06       ` Nasser M. Abbasi
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2011-03-27 20:18 UTC (permalink / raw)
  To: nma; +Cc: gcc-help

On 27 March 2011 18:40, Nasser M. Abbasi wrote:
> On 3/27/2011 2:13 AM, Marc Glisse wrote:
>>
>> On Sun, 27 Mar 2011, Nasser M. Abbasi wrote:
>>
>>> I am trying to build gcc 4.6 which I downloaded today. I followed
>>> all instructions, did the following:
>>>
>>> 1. build/install  m4-latest
>>> 2. build/install  gmp-5.0.01
>>> 3. build/install  mpfr-3.0.0
>>> 4. build/install  mpc-0.9
>>> 5. and now for gcc 4.6:
>>>
>>> ./configure
>>> make
>>> This after about 2 hrs compiling, I get this error:
>>>
>>> checking for suffix of object files... configure: error: in
>>>
>>> `/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/i686-pc-linux-gnu/libgcc':
>>> configure: error: cannot compute suffix of object files: cannot compile
>>> See `config.log' for more details.
>>> make[2]: *** [configure-stage1-target-libgcc] Error 1
>>> make[2]: Leaving directory
>>> `/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0'
>>
>
>
>> See http://gcc.gnu.org/wiki/FAQ item 5.
>>
>
> THanks Marc;
>
> I looked at the above link. But not able to figure what is
> wrong. I see no error in my config.log file, here it is again
>
> http://12000.org/tmp/march_27_2011/

Did you read http://gcc.gnu.org/wiki/FAQ#configure_suffix properly?

There are several config.log files, you need to look at the one in the
right directory, in your case that should be the one in the libgcc
diretory.

> I did clean; ./configure; make and same error.

See this FAQ:
http://gcc.gnu.org/wiki/FAQ#configure

As stated in the installation instructions at
gcc.gnu.org/install/configure.html you should not run ./configure, you
should build GCC in a different directory from the one containing the
sources.

The docs are not just written for fun, they're there to help you.

> I am no expert in these things. Anything specific I should
> try to do? Any one can see any error in the log file?

You're looking in the wrong file.

As the FAQ says, the usual reason is that the runtime linker can't
find the prerequisite libraries (which is also stated in the
--with-gmp docs at http://gcc.gnu.org/install/configure.html - you
should read that too.)

> I do not need to build gcc 4.6 if I can help it, but
> not able to find prebuild one for my system.

You could try using the makefile linked to at
http://advogato.org/person/redi/diary/229.html which makes building
gcc much easier (especially if you don't read the documentation about
ensuring libgmp.so etc. can be found by the runtime linker)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: failed building gcc 4.6 from sources on linux mint 2.6.35-28-generic, when doing Fortran build
  2011-03-27 20:18     ` Jonathan Wakely
@ 2011-03-28  1:06       ` Nasser M. Abbasi
  2011-03-28  7:53         ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Nasser M. Abbasi @ 2011-03-28  1:06 UTC (permalink / raw)
  To: gcc-help

On 3/27/2011 12:01 PM, Jonathan Wakely wrote:

>
> See this FAQ:
> http://gcc.gnu.org/wiki/FAQ#configure
>
> As stated in the installation instructions at
> gcc.gnu.org/install/configure.html you should not run ./configure, you
> should build GCC in a different directory from the one containing the
> sources.
>

humm... Ok, will revisit everything then. I am just following the
standard method of building any linux software: unpack tar, cd to the
folder created, type ./configure; make; make install.

>
> You're looking in the wrong file.
>
> As the FAQ says, the usual reason is that the runtime linker can't
> find the prerequisite libraries (which is also stated in the
> --with-gmp docs at http://gcc.gnu.org/install/configure.html - you
> should read that too.)
>

Well, But I was following the instructions here:

http://gcc.gnu.org/wiki/FAQ

item 5, where it says:

"You have to check the file 'config.log' in the directory where the
error occurred (denoted by Entering/Leaving directory)."

And they gave an example. And in my case, such directory was:

" make[2]: Leaving directory
  `/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0'
"

And that is the config.log file I was looking at.

So, you see, I was just following the instructions, and did read it :)


> You could try using the makefile linked to at
> http://advogato.org/person/redi/diary/229.html which makes building
> gcc much easier (especially if you don't read the documentation about
> ensuring libgmp.so etc. can be found by the runtime linker)
>

Thanks, will try it.

I've uploaded the correct config.log file now here

http://12000.org/tmp/march_27_2011/

and called it libgcc_config.log

I see now the errors:

configure:3028: /media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/host-i686-pc-linux-gnu/gcc/xgcc -B/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/host-i686-pc-linux-gnu/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    -V >&5
xgcc: error: unrecognized option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3039: $? = 1

configure:3028: /media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/host-i686-pc-linux-gnu/gcc/xgcc -B/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/host-i686-pc-linux-gnu/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    -qversion >&5
xgcc: error: unrecognized option '-qversion'
xgcc: fatal error: no input files
compilation terminated.


...
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }

Thanks,
--Nasser

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: failed building gcc 4.6 from sources on linux mint 2.6.35-28-generic, when doing Fortran build
  2011-03-28  1:06       ` Nasser M. Abbasi
@ 2011-03-28  7:53         ` Jonathan Wakely
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Wakely @ 2011-03-28  7:53 UTC (permalink / raw)
  To: nma; +Cc: gcc-help

On 27 March 2011 20:58, Nasser M. Abbasi wrote:
> On 3/27/2011 12:01 PM, Jonathan Wakely wrote:
>
>>
>> See this FAQ:
>> http://gcc.gnu.org/wiki/FAQ#configure
>>
>> As stated in the installation instructions at
>> gcc.gnu.org/install/configure.html you should not run ./configure, you
>> should build GCC in a different directory from the one containing the
>> sources.
>>
>
> humm... Ok, will revisit everything then. I am just following the
> standard method of building any linux software: unpack tar, cd to the
> folder created, type ./configure; make; make install.

Please read the installation docs, GCC is not just "any linux software"

>>
>> You're looking in the wrong file.
>>
>> As the FAQ says, the usual reason is that the runtime linker can't
>> find the prerequisite libraries (which is also stated in the
>> --with-gmp docs at http://gcc.gnu.org/install/configure.html - you
>> should read that too.)
>>
>
> Well, But I was following the instructions here:
>
> http://gcc.gnu.org/wiki/FAQ
>
> item 5, where it says:
>
> "You have to check the file 'config.log' in the directory where the
> error occurred (denoted by Entering/Leaving directory)."
>
> And they gave an example. And in my case, such directory was:
>
> " make[2]: Leaving directory
>  `/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0'
> "
> And that is the config.log file I was looking at.
>
> So, you see, I was just following the instructions, and did read it :)


Hmm yes, that FAQ could be improved, the relevant line is actually:

checking for suffix of object files... configure: error: in
`/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/i686-pc-linux-gnu/libgcc':

Which shows the directory where the error occurred (and where the
relevant config.log is)

I'll fix the FAQ.

>> You could try using the makefile linked to at
>> http://advogato.org/person/redi/diary/229.html which makes building
>> gcc much easier (especially if you don't read the documentation about
>> ensuring libgmp.so etc. can be found by the runtime linker)
>>
>
> Thanks, will try it.
>
> I've uploaded the correct config.log file now here
>
> http://12000.org/tmp/march_27_2011/
>
> and called it libgcc_config.log
>
> I see now the errors:

That's not an error, that's just part of the normal configure process.
 If you search for the part that tries to determine the suffix of
object files you will see:

/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/host-i686-pc-linux-gnu/gcc/cc1:
error while loading shared libraries: libmpc.so.2: cannot open shared
object file: No such file or directory

Which, as already suggested and as stated in the FAQ, is because the
runtime linker cannot find libmpc.so

Either set LD_LIBRARY_PATH, or to make your life easier link
statically to gmp, mpfr and mpc, which is what the makefile I linked
to does automatically.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-03-27 20:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-27 12:13 failed building gcc 4.6 from sources on linux mint 2.6.35-28-generic, when doing Fortran build Nasser M. Abbasi
2011-03-27 12:29 ` Marc Glisse
2011-03-27 19:58   ` Nasser M. Abbasi
2011-03-27 20:18     ` Jonathan Wakely
2011-03-28  1:06       ` Nasser M. Abbasi
2011-03-28  7:53         ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).