public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: GCC error
       [not found] <20040417113541.24299.qmail@gossamer.airs.com>
@ 2004-04-17 14:37 ` Ian Lance Taylor
  0 siblings, 0 replies; 15+ messages in thread
From: Ian Lance Taylor @ 2004-04-17 14:37 UTC (permalink / raw)
  To: anissi; +Cc: gcc-help

"anissi" <anissi@kowsar.com> writes:

> During configuration of GCC-3.3.3 this error occurs:
> 
>  
> 
> Checking size of short.configure : error :can not determine a size for short
> 
>  
> 
> So what is my problem ?

I don't know, and you left out a number of details such as the system
you are using and precisely how you ran configure.  In any case, look
in the file config.log, probably at the very end.  You should look at
config.log in the subdirectory which was being configured at the time
of the above error.  That may suggest what the underlying problem is.

Ian

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

* Re: Gcc Error
  2015-08-23  0:07   ` Thomas Dineen
@ 2015-08-23 14:01     ` Jonathan Wakely
  0 siblings, 0 replies; 15+ messages in thread
From: Jonathan Wakely @ 2015-08-23 14:01 UTC (permalink / raw)
  To: Thomas Dineen; +Cc: gcc-help

On 23 August 2015 at 01:06, Thomas Dineen wrote:
> Jonathan:
>
>    Thanks for the response. Your advise on breaking up the build
> fixed the problem.
>
>     Question: With gcc is there an upper limit on the object code
> size of the final linked application?

That has nothing to do with GCC, it's up to the linker and OS.

I know the Solaris linker used to have a limit of 1GB for 32-bit
executables but I think that's been increased. In any case, a 1GB
executable is much larger than most people will ever create.

> How about the *.O files?

I'm not aware of any limit.

>     Currently I am at about 50.5MB.
>
>     Currently I use static linking for portability, avoiding missing dll
> issues.
>
>      For larger applications will it be necessary to break up the executable
> using
> dynamic link libraries, thus loading a block when and if it is actually
> called?

I doubt that will make any difference.

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

* Re: Gcc Error
  2015-08-22  8:46 ` Jonathan Wakely
@ 2015-08-23  0:07   ` Thomas Dineen
  2015-08-23 14:01     ` Jonathan Wakely
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Dineen @ 2015-08-23  0:07 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

Jonathan:

    Thanks for the response. Your advise on breaking up the build
fixed the problem.

     Question: With gcc is there an upper limit on the object code
size of the final linked application? How about the *.O files?

     Currently I am at about 50.5MB.

     Currently I use static linking for portability, avoiding missing 
dll issues.

      For larger applications will it be necessary to break up the 
executable using
dynamic link libraries, thus loading a block when and if it is actually 
called?

Thomas Dineen


On 8/22/2015 1:46 AM, Jonathan Wakely wrote:
> On 22 August 2015 at 07:19, Thomas Dineen wrote:
>> Gentle People:
>>
>>      When Building a rather large project gcc produces the following error:
>> "Out of memory for code representation:" See the details below.
>>
>> What is the best or simplest way to fix this?
>>
>> 1) Will using 64 bit via the -m64 flag fix this?
> That tells the compiler to produce 64-bit output, it doesn't change
> how much memory it has available, and is likely to use more memory to
> represent the larger pointer types.
>
>> or
>> 2) I am currently building the project with single gcc call. (The slow way)
>> Due to some legacy issues with GTK/Cairo and extern variables one big build
>> seems to work. Would it be better to compile each .C File to a .O file and
>> then
>> link (Faster way).
> Do you mean you've put all the code in a single file? If yes, then of
> course splitting it up into smaller files will use less memory.
>
>> 3) I am using an older gcc 3.4.6 on Solaris 10.
> Good grief.
>
>> Sun5# !ma
>> make TA_Benchs
>> Running Target: TA_Bench Sun
>> gcc -D_REENTRANT -ggdb -w  -g -c IB_TWS_API.c Read_IB_Callbacks.c
>> gcc Main.c  -ggdb -w IB_TWS_API.o Read_IB_Callbacks.o `pkg-config --cflags
>> --libs gtk+-2.0 ` -lcurl -lm -lsocket -lnsl -ggdb -w -o TA_Bench.sun
>> Assembler: Main.c
>>          "/var/tmp//ccVeiKcL.s", line 15324105 : Out of memory for code
>> representation
>> make: *** [TA_Benchs] Error 1
> This error isn't even coming from GCC, it's coming from the assembler,
> which is part of Solaris and not part of GCC. It's trying to assemble
> a file that is at least 15 million lines long. That's probably your
> problem. Try splitting Main.c into smaller files.
>
>

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

* Re: Gcc Error
  2015-08-22  6:19 Gcc Error Thomas Dineen
@ 2015-08-22  8:46 ` Jonathan Wakely
  2015-08-23  0:07   ` Thomas Dineen
  0 siblings, 1 reply; 15+ messages in thread
From: Jonathan Wakely @ 2015-08-22  8:46 UTC (permalink / raw)
  To: Thomas Dineen; +Cc: gcc-help

On 22 August 2015 at 07:19, Thomas Dineen wrote:
> Gentle People:
>
>     When Building a rather large project gcc produces the following error:
> "Out of memory for code representation:" See the details below.
>
> What is the best or simplest way to fix this?
>
> 1) Will using 64 bit via the -m64 flag fix this?

That tells the compiler to produce 64-bit output, it doesn't change
how much memory it has available, and is likely to use more memory to
represent the larger pointer types.

> or
> 2) I am currently building the project with single gcc call. (The slow way)
> Due to some legacy issues with GTK/Cairo and extern variables one big build
> seems to work. Would it be better to compile each .C File to a .O file and
> then
> link (Faster way).

Do you mean you've put all the code in a single file? If yes, then of
course splitting it up into smaller files will use less memory.

> 3) I am using an older gcc 3.4.6 on Solaris 10.

Good grief.

> Sun5# !ma
> make TA_Benchs
> Running Target: TA_Bench Sun
> gcc -D_REENTRANT -ggdb -w  -g -c IB_TWS_API.c Read_IB_Callbacks.c
> gcc Main.c  -ggdb -w IB_TWS_API.o Read_IB_Callbacks.o `pkg-config --cflags
> --libs gtk+-2.0 ` -lcurl -lm -lsocket -lnsl -ggdb -w -o TA_Bench.sun
> Assembler: Main.c
>         "/var/tmp//ccVeiKcL.s", line 15324105 : Out of memory for code
> representation
> make: *** [TA_Benchs] Error 1

This error isn't even coming from GCC, it's coming from the assembler,
which is part of Solaris and not part of GCC. It's trying to assemble
a file that is at least 15 million lines long. That's probably your
problem. Try splitting Main.c into smaller files.

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

* Gcc Error
@ 2015-08-22  6:19 Thomas Dineen
  2015-08-22  8:46 ` Jonathan Wakely
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Dineen @ 2015-08-22  6:19 UTC (permalink / raw)
  To: gcc-help, Thomas Dineen

Gentle People:

     When Building a rather large project gcc produces the following error:
"Out of memory for code representation:" See the details below.

What is the best or simplest way to fix this?

1) Will using 64 bit via the -m64 flag fix this?
or
2) I am currently building the project with single gcc call. (The slow way)
Due to some legacy issues with GTK/Cairo and extern variables one big build
seems to work. Would it be better to compile each .C File to a .O file 
and then
link (Faster way).

3) I am using an older gcc 3.4.6 on Solaris 10. Would a simple update to 
a newer
version solve the out of memory problem shown above. (Separate from the -m64
issue shown below)?

Sun5# !ma
make TA_Benchs
Running Target: TA_Bench Sun
gcc -D_REENTRANT -ggdb -w  -g -c IB_TWS_API.c Read_IB_Callbacks.c
gcc Main.c  -ggdb -w IB_TWS_API.o Read_IB_Callbacks.o `pkg-config 
--cflags --libs gtk+-2.0 ` -lcurl -lm -lsocket -lnsl -ggdb -w -o 
TA_Bench.sun
Assembler: Main.c
         "/var/tmp//ccVeiKcL.s", line 15324105 : Out of memory for code 
representation
make: *** [TA_Benchs] Error 1

Sun5# !ma
make TA_Benchs
make: Warning: File `Makefile' has modification time 847 s in the future
Running Target: TA_Bench Sun
gcc -m64 -D_REENTRANT -ggdb -w  -g -c IB_TWS_API.c Read_IB_Callbacks.c
IB_TWS_API.c:1: sorry, unimplemented: 64-bit mode not compiled in
Read_IB_Callbacks.c:1: sorry, unimplemented: 64-bit mode not compiled in
make: *** [TA_Benchs] Error 1

Sun5# gcc --version
gcc (GCC) 3.4.6
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

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

* Re: GCC Error
  2008-12-26 18:41   ` fimer
  2008-12-26 18:44     ` Jan Engelhardt
@ 2008-12-28  4:27     ` Ian Lance Taylor
  1 sibling, 0 replies; 15+ messages in thread
From: Ian Lance Taylor @ 2008-12-28  4:27 UTC (permalink / raw)
  To: fimer; +Cc: gcc-help

fimer <yuanhao12@gmail.com> writes:

>> That said, the most likely problem is that the code is doing something
>> like this:
>> 
>> class C { void C::fn(); }
>> 
>> That is invalid C++ syntax, but older versions of gcc--before gcc 3.4,
>> I think--used to accept it.  The "C::" must be omitted.
>> 
>> Ian
>> 
>> 
>
>
> If it is, can this also be resolved by adding any option to compile command?

As far as I know there is no option for this.  This code was always
invalid according to C++, and as far as I know it was never intended
for g++ to accept it.  That is, it was a bug, and the bug is now
fixed.

Ian

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

* Re: GCC Error
  2008-12-26 18:41   ` fimer
@ 2008-12-26 18:44     ` Jan Engelhardt
  2008-12-28  4:27     ` Ian Lance Taylor
  1 sibling, 0 replies; 15+ messages in thread
From: Jan Engelhardt @ 2008-12-26 18:44 UTC (permalink / raw)
  To: fimer; +Cc: gcc-help


On Friday 2008-12-26 07:29, fimer wrote:
>> 
>> There is little we can do to help you with so little information.
>> 
>> That said, the most likely problem is that the code is doing something
>> like this:
>> 
>> class C { void C::fn(); }
>> 
>> That is invalid C++ syntax, but older versions of gcc--before gcc 3.4,
>> I think--used to accept it.  The "C::" must be omitted.
>
>If it is, can this also be resolved by adding any option to compile command?

Can't you just fix the code?

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

* Re: GCC Error
  2008-11-17  9:04 ` Ian Lance Taylor
@ 2008-12-26 18:41   ` fimer
  2008-12-26 18:44     ` Jan Engelhardt
  2008-12-28  4:27     ` Ian Lance Taylor
  0 siblings, 2 replies; 15+ messages in thread
From: fimer @ 2008-12-26 18:41 UTC (permalink / raw)
  To: gcc-help



Ian Lance Taylor-3 wrote:
> 
> Denisius <fanatica0@hotmail.com> writes:
> 
>> Whenever I try to compile I get the following error:
>>
>> "In file included from act_comm.cpp:26:
>> lockers.h:81: error: extra qualification âlockers_object::â on member
>> âget_next_free_locker_numberâ"
>>
>> I am using GCC 4.3.
> 
> There is little we can do to help you with so little information.
> 
> That said, the most likely problem is that the code is doing something
> like this:
> 
> class C { void C::fn(); }
> 
> That is invalid C++ syntax, but older versions of gcc--before gcc 3.4,
> I think--used to accept it.  The "C::" must be omitted.
> 
> Ian
> 
> 


If it is, can this also be resolved by adding any option to compile command?
-- 
View this message in context: http://www.nabble.com/GCC-Error-tp20528286p21172193.html
Sent from the gcc - Help mailing list archive at Nabble.com.

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

* Re: GCC Error
  2008-11-16 21:17 GCC Error Denisius
@ 2008-11-17  9:04 ` Ian Lance Taylor
  2008-12-26 18:41   ` fimer
  0 siblings, 1 reply; 15+ messages in thread
From: Ian Lance Taylor @ 2008-11-17  9:04 UTC (permalink / raw)
  To: Denisius; +Cc: gcc-help

Denisius <fanatica0@hotmail.com> writes:

> Whenever I try to compile I get the following error:
>
> "In file included from act_comm.cpp:26:
> lockers.h:81: error: extra qualification âlockers_object::â on member
> âget_next_free_locker_numberâ"
>
> I am using GCC 4.3.

There is little we can do to help you with so little information.

That said, the most likely problem is that the code is doing something
like this:

class C { void C::fn(); }

That is invalid C++ syntax, but older versions of gcc--before gcc 3.4,
I think--used to accept it.  The "C::" must be omitted.

Ian

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

* GCC Error
@ 2008-11-16 21:17 Denisius
  2008-11-17  9:04 ` Ian Lance Taylor
  0 siblings, 1 reply; 15+ messages in thread
From: Denisius @ 2008-11-16 21:17 UTC (permalink / raw)
  To: gcc-help


Whenever I try to compile I get the following error:

"In file included from act_comm.cpp:26:
lockers.h:81: error: extra qualification âlockers_object::â on member
âget_next_free_locker_numberâ"

I am using GCC 4.3.
-- 
View this message in context: http://www.nabble.com/GCC-Error-tp20528286p20528286.html
Sent from the gcc - Help mailing list archive at Nabble.com.

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

* GCC error
@ 2004-04-17 11:35 anissi
  0 siblings, 0 replies; 15+ messages in thread
From: anissi @ 2004-04-17 11:35 UTC (permalink / raw)
  To: gcc-help

During configuration of GCC-3.3.3 this error occurs:

 

Checking size of short.configure : error :can not determine a size for short

 

So what is my problem ?

 

Thanks in advance;

 

Manssour Anissi


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

* GCC error
@ 2004-04-17 11:35 anissi
  0 siblings, 0 replies; 15+ messages in thread
From: anissi @ 2004-04-17 11:35 UTC (permalink / raw)
  To: gcc-help

During configuration of GCC-3.3.3 this error occurs:

 

Checking size of short.configure : error :can not determine a size for short

 

So what is my problem ?

 

Thanks in advance;

 

Manssour Anissi


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

* Re: gcc error
  2002-07-29  7:02 ` gcc error Rupert Wood
@ 2002-08-10  5:32   ` Nix
  0 siblings, 0 replies; 15+ messages in thread
From: Nix @ 2002-08-10  5:32 UTC (permalink / raw)
  To: Rupert Wood; +Cc: 'Linux', gcc-help

On Mon, 29 Jul 2002, Rupert Wood muttered drunkenly:
> I think libc6 has been obsoleted by glibc 2.x but I understand updating

No, they are one and the same:

lrwxrwxrwx    1 root     root           13 Jun 27 08:24 /lib/libc.so.6 -> libc-2.2.5.so

(The previous libc, libc.so.5, was derived from glibc-1.0... hence the
current rather confusing situation.)

> a Linux C library is a fairly complex and nasty operation (and that
> libc6 and glibc aren't binary compatible?). However, the C library and

They are ;} the problem is something else.

-- 
`There's something satisfying about killing JWZ over and over again.'
                                        -- 1i, personal communication

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

* RE: gcc error
       [not found] <616BE6A276E3714788D2AC35C40CD18D7404AF@whale.softwire.co.uk>
@ 2002-07-29  7:02 ` Rupert Wood
  2002-08-10  5:32   ` Nix
  0 siblings, 1 reply; 15+ messages in thread
From: Rupert Wood @ 2002-07-29  7:02 UTC (permalink / raw)
  To: 'Linux'; +Cc: gcc-help

Shahin wrote:

> when I am trying to compile simple  C file with headers errors
> are generated....
:
> /usr/include/libio.h:263: parse error before `size_t'

That's very odd - it looks like size_t hasn't been defined yet. This is
usually done in <sys/types.h> via <stddef.h> but these should be
included automatically by any other header files that need them. Try
adding:

    #include <stddef.h>

to the very top of your source.

However, this is a problem with your C library and not with GCC. (Or it
may be an interaction problem - the C library assumes something about
GCC or vice versa.)

I think libc6 has been obsoleted by glibc 2.x but I understand updating
a Linux C library is a fairly complex and nasty operation (and that
libc6 and glibc aren't binary compatible?). However, the C library and
compiler supplied together in a distribution *ought* to cooperate
properly.

Good luck,
Rup.

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

* gcc error
@ 2002-07-29  5:12 Linux
  0 siblings, 0 replies; 15+ messages in thread
From: Linux @ 2002-07-29  5:12 UTC (permalink / raw)
  To: gcc-help

Hi List ,
I have a problem with gcc , 
when I am trying to compile simple  C file with headers errors
are generated....

gateway:/home/users/shahin# gcc -o myC myC.c
In file included from /usr/include/stdio.h:65,
                 from myC.c:1:
/usr/include/libio.h:263: parse error before `size_t'
/usr/include/libio.h:272: parse error before `size_t'
/usr/include/libio.h:368: parse error before `_IO_sgetn'
/usr/include/libio.h:368: parse error before `size_t'
/usr/include/libio.h:368: warning: data definition has no type or storage 
class
In file included from myC.c:1:
/usr/include/stdio.h:179: parse error before `__attribute_malloc__'
/usr/include/stdio.h:179: warning: data definition has no type or storage
class
/usr/include/stdio.h:259: parse error before `size_t'
/usr/include/stdio.h:265: parse error before `size_t'
/usr/include/stdio.h:293: parse error before `size_t'
/usr/include/stdio.h:297: parse error before `size_t'
/usr/include/stdio.h:459: parse error before `fread'
/usr/include/stdio.h:459: parse error before `size_t'
/usr/include/stdio.h:460: warning: data definition has no type or storage
class
/usr/include/stdio.h:462: parse error before `fwrite'
/usr/include/stdio.h:462: parse error before `size_t'
/usr/include/stdio.h:463: warning: data definition has no type or storage
class
/usr/include/stdio.h:467: parse error before `fread_unlocked'
/usr/include/stdio.h:467: parse error before `size_t'
/usr/include/stdio.h:468: warning: data definition has no type or storage
class
/usr/include/stdio.h:469: parse error before `fwrite_unlocked'
/usr/include/stdio.h:469: parse error before `size_t'
/usr/include/stdio.h:470: warning: data definition has no type or storage
class


O/S debian 
kernel 2.2.15
gcc 2.95
And I have installed libc6-dev


Thanks
Shahin

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

end of thread, other threads:[~2015-08-23 14:01 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20040417113541.24299.qmail@gossamer.airs.com>
2004-04-17 14:37 ` GCC error Ian Lance Taylor
2015-08-22  6:19 Gcc Error Thomas Dineen
2015-08-22  8:46 ` Jonathan Wakely
2015-08-23  0:07   ` Thomas Dineen
2015-08-23 14:01     ` Jonathan Wakely
  -- strict thread matches above, loose matches on Subject: below --
2008-11-16 21:17 GCC Error Denisius
2008-11-17  9:04 ` Ian Lance Taylor
2008-12-26 18:41   ` fimer
2008-12-26 18:44     ` Jan Engelhardt
2008-12-28  4:27     ` Ian Lance Taylor
2004-04-17 11:35 GCC error anissi
2004-04-17 11:35 anissi
     [not found] <616BE6A276E3714788D2AC35C40CD18D7404AF@whale.softwire.co.uk>
2002-07-29  7:02 ` gcc error Rupert Wood
2002-08-10  5:32   ` Nix
2002-07-29  5:12 Linux

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).