wcc386: ***FATAL*** segment too large

Hi

I run into trouble when I’m trying to compile a fairly large C-file:

-rwxr–r-- 1 sepaha users 2257554 Jun 01 0:57
…/…/Target/Application/Application.c

Here’s what the makefile and cc want to do to compile Application.c:

/usr/watcom/10.6/bin/wcc386 -wx -d2 -i=/home/everybody/Build2/SystemTest/K2I
-Build-1/CSource/Application/…/INCLUDE -i=/home/everybody/Build2/SystemTest
/K2I-Build-1/CSource/Application/…/LOGINCLUDE -i=/home/everybody/Build2/Sys
temTest/K2I-Build-1/Target/Application -i=/home/everybody/Build2/SystemTest/
K2I-Build-1/Target/Application/… -i=/home/everybody/Build2/SystemTest/K2I-B
uild-1/CSource/Application -i=/home/everybody/Build2/SystemTest/K2I-Build-1/
CSource/Application/… -i=/home/everybody/Build2/Foundation/SourceCode/CSour
ce -i=/home/everybody/Build2/Tools/ConfTool/SRC -i=/home/everybody/Build2/Fo
undation/SourceCode/CSource/Parameters -i=/home/everybody/Build2/Foundation/
SourceCode/CSource/Miscellaneous -i=/home/everybody/Build2/Foundation/Source
Code/CSource/ApplParamRegistry -i=/home/everybody/Build2/ControlService/Sour
ceCode/CSource -d+ -dGAMBRO -dQNX4_CC -dXSIGPATH -dXCALENDERCLOCK -dXENV -dX
PRSOPT -dXIDNAMES -dXINCLUDE_HS_FILE -dSDL_SYSTEM_NAME=Application -dXOPTDCL
-dXOPTFPAR -dXOPTSTRUCT -dXOPTLIT -dXNOUSEOFEXPORT -dXNOUSEOFSERVICE -dXNRI
NST -dXSYMBTLINK -dNODE_NR_CPUC=1 -dNODE_NR_CPUP=2 -dNODE_NR_CPUW=3 -dTHIS_N
ODE_NR=NODE_NR_CPUC -dMY_GLOBAL_NODE_NO=1 -dTHIS_CPU_NO=0 -dPFSDEBUG -ms -fo
=/home/everybody/Build2/SystemTest/K2I-Build-1/Target/Application/Applicatio
n.o -4r -i=/usr/watcom/10.6/usr/include -i=/usr/include
/home/everybody/Build2/SystemTest/K2I-Build-1/Target/Application/Application
…c

The only output I get from wcc386 is:

WATCOM C32 Optimizing Compiler Version 10.6
Copyright by WATCOM International Corp. 1984, 1996. All rights reserved.
WATCOM is a trademark of WATCOM International Corp.
/home/everybody/Build2/SystemTest/K2I-Build-1/Target/Application/Application
…c: 45335 lines, included 65798, 1 warnings, 0 errors
/home/everybody/Build2/SystemTest/K2I-Build-1/Target/Application/Application
…c(41838): Warning! W202: Symbol ‘Temp’ has been defined, but not referenced
/home/everybody/Build2/SystemTest/K2I-Build-1/Target/Application/Application
…c(45335): Error! E1118: FATAL segment too large


Line 45335 is the last line of Application.c. Does anyone have any ideas
about what kind of limit I’ve reached? Too many lines of code? Too many
symbols resulting in some memory overflow? Most important of all; how can I
find out which segment is too large?

I’ve installed wcc10.6.patchB.tar.F. The C-code is auto-generated by
Telelogic Tau, I’ve already set the necessary options to split up the
generated code, but 2 Meg is a “small” as it gets.

Thanks in advance,
P-O Håkansson

“P-O Hakansson” <par-olof.hakansson@gambro.com> wrote:

Hi

I run into trouble when I’m trying to compile a fairly large C-file:

The Watcom debug format has some 16-bit segment limitations in it.
This was worked around by adding support for DWARF format debug information,
but the whole application has to be compiled this way (you can’t mix).

Compile -g2d rather than -g2 to get DWARF format debug information.

-David

QNX Training Services
dagibbs@qnx.com

The reason is that you are trying to compile with full debug information (-d2
option).
Change -d2 to -d1.

P-O Håkansson" wrote:

Hi

I run into trouble when I’m trying to compile a fairly large C-file:

-rwxr–r-- 1 sepaha users 2257554 Jun 01 0:57
…/…/Target/Application/Application.c

Here’s what the makefile and cc want to do to compile Application.c:

/usr/watcom/10.6/bin/wcc386 -wx -d2 -i=/home/everybody/Build2/SystemTest/K2I
-Build-1/CSource/Application/…/INCLUDE -i=/home/everybody/Build2/SystemTest
/K2I-Build-1/CSource/Application/…/LOGINCLUDE -i=/home/everybody/Build2/Sys
temTest/K2I-Build-1/Target/Application -i=/home/everybody/Build2/SystemTest/
K2I-Build-1/Target/Application/… -i=/home/everybody/Build2/SystemTest/K2I-B
uild-1/CSource/Application -i=/home/everybody/Build2/SystemTest/K2I-Build-1/
CSource/Application/… -i=/home/everybody/Build2/Foundation/SourceCode/CSour
ce -i=/home/everybody/Build2/Tools/ConfTool/SRC -i=/home/everybody/Build2/Fo
undation/SourceCode/CSource/Parameters -i=/home/everybody/Build2/Foundation/
SourceCode/CSource/Miscellaneous -i=/home/everybody/Build2/Foundation/Source
Code/CSource/ApplParamRegistry -i=/home/everybody/Build2/ControlService/Sour
ceCode/CSource -d+ -dGAMBRO -dQNX4_CC -dXSIGPATH -dXCALENDERCLOCK -dXENV -dX
PRSOPT -dXIDNAMES -dXINCLUDE_HS_FILE -dSDL_SYSTEM_NAME=Application -dXOPTDCL
-dXOPTFPAR -dXOPTSTRUCT -dXOPTLIT -dXNOUSEOFEXPORT -dXNOUSEOFSERVICE -dXNRI
NST -dXSYMBTLINK -dNODE_NR_CPUC=1 -dNODE_NR_CPUP=2 -dNODE_NR_CPUW=3 -dTHIS_N
ODE_NR=NODE_NR_CPUC -dMY_GLOBAL_NODE_NO=1 -dTHIS_CPU_NO=0 -dPFSDEBUG -ms -fo
=/home/everybody/Build2/SystemTest/K2I-Build-1/Target/Application/Applicatio
n.o -4r -i=/usr/watcom/10.6/usr/include -i=/usr/include
/home/everybody/Build2/SystemTest/K2I-Build-1/Target/Application/Application
.c

The only output I get from wcc386 is:

WATCOM C32 Optimizing Compiler Version 10.6
Copyright by WATCOM International Corp. 1984, 1996. All rights reserved.
WATCOM is a trademark of WATCOM International Corp.
/home/everybody/Build2/SystemTest/K2I-Build-1/Target/Application/Application
.c: 45335 lines, included 65798, 1 warnings, 0 errors
/home/everybody/Build2/SystemTest/K2I-Build-1/Target/Application/Application
.c(41838): Warning! W202: Symbol ‘Temp’ has been defined, but not referenced
/home/everybody/Build2/SystemTest/K2I-Build-1/Target/Application/Application
.c(45335): Error! E1118: FATAL segment too large

Line 45335 is the last line of Application.c. Does anyone have any ideas
about what kind of limit I’ve reached? Too many lines of code? Too many
symbols resulting in some memory overflow? Most important of all; how can I
find out which segment is too large?

I’ve installed wcc10.6.patchB.tar.F. The C-code is auto-generated by
Telelogic Tau, I’ve already set the necessary options to split up the
generated code, but 2 Meg is a “small” as it gets.

Thanks in advance,
P-O Håkansson

Yeah, what David said should work. Although, in one case (not sure if it is
dwarf mode or just debug mode in general) one of my executables when run
would give an Exec Format Error. After recompiling without debug mode, it
worked fine.

One of the objects that I compile in one of my applications is HUGE and
g2/g3 will make the compile completely wacky.



“David Gibbs” <dagibbs@qnx.com> wrote in message
news:9f8avr$rl9$2@nntp.qnx.com

“P-O Hakansson” <> par-olof.hakansson@gambro.com> > wrote:
Hi

I run into trouble when I’m trying to compile a fairly large C-file:

The Watcom debug format has some 16-bit segment limitations in it.
This was worked around by adding support for DWARF format debug
information,
but the whole application has to be compiled this way (you can’t mix).

Compile -g2d rather than -g2 to get DWARF format debug information.

-David

QNX Training Services
dagibbs@qnx.com