🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1335

g++ compiler problem on IBM RS6000

#1335
From: Himanshu Oberoi
Date: Tue, 05 Jan 1993 19:13
76 lines
3544 bytes
Hi,
	I am having trouble compiling a c++ program on th IBM RS6000 550 AIX 3.2
The program compiles and runs fine on a sun (using g++-2.1 libg++-2.1) .
1) Error on ld:
	This seems to be some symbols that are undefined in the library.
__ls__FR7ostreamPCc
__ls__FR7ostreamf
        I compiled libg++-2.3 with gcc-2.3.3. Strings shows these symbols in the .o
files but nm does not find these in libg++.a

2) Error in assembling:

	Looking at the assembler output I traced it to a .csect instructhon
	The relevant lines are included below:

g++ -v -c  -g -O2   -o DataArray.MPlex.o DataArray.MPlex.cc
Reading specs from /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2/2.3.3/specs
gcc version 2.3.3
 /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2/2.3.3/cpp -lang-c++ -v -undef -D__GNUC__=2 
-D__GNUG__=2 -D__cplusplus -D_IBMR2 -D_AIX -D___IBMR2__ -D___AIX__ -D___IBMR2 -D___AI
X -D__CHAR_UNSIGNED__ -D__OPTIMIZE__ -g DataArray.MPlex.cc /tmp/ccYh8C92.i
GNU CPP version 2.3.3
 /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2/2.3.3/cc1plus /tmp/ccYh8C92.i -quiet -dumpb
ase DataArray.MPlex.cc -g -O2 -version -o /tmp/ccYh8C92.s
GNU C++ version 2.3.3 compiled by GNU C version 2.3.3.
 as -o DataArray.MPlex.o /tmp/ccYh8C92.s
Assembler:
/tmp/ccYh8C92.s: line 359: 1252-142 Syntax error.
/tmp/ccYh8C92.s: line 3847: 1252-142 Syntax error.
/tmp/ccYh8C92.s: line 4686: 1252-142 Syntax error.

compiling DataArray.MPlex.cc to get assembler listing:
g++ -v -c  -g -O2   -S DataArray.MPlex.cc

file DataArray.MPlex.s
...
...
	.extern .Sdowncase__FP6StrRepT0
	.extern Scapitalize__FP6StrRepT0[DS]
	.extern .Scapitalize__FP6StrRepT0
	.extern Sprepend__FP6StrRepPCci[DS]
	.extern .Sprepend__FP6StrRepPCci
	.extern error__C6StringPCc[DS]
	.extern .error__C6StringPCc
	.csect _DataArray.rw_MPlex.rw_cc_DataArray.ro_MPlex.ro_cc 	I@[RO]
								 ^^^^^^^^^
	line 359        ..this space seems to be the reason. There is a tab character and 2 spaces
			here. If I hand edit the file to remove these then the assembler works fine
			on these.
	.align 2
LC..12:
	.byte "invalid index"
	.byte 0
	.extern elem__C6Stringi[DS]
...
...



g++ -v DataArray.MPlex.o main.o   -lg++ -lm -o mops
Reading specs from /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2/2.3.3/specs
gcc version 2.3.3
/usr/local/lib/gcc-lib/rs6000-ibm-aix3.2/2.3.3/ld -T512 -H512 -btextro -bhalt:4 -bnodelcsect -o multimead /lib/crt0.o -L/usr/local/lib/gcc-lib/rs6000-ibm-aix3.2/2.3.3 -Ldelcsect -o mops ataArray.MPlex.o main.o /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2/2.3.3/libgcc.a -lc /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2/2.3.3/libgcc.a
0706-317 ERROR: Unresolved or undefined symbols detected:
                 Symbols in error (followed by references) are
                 dumped to the load map.
                 The -bloadmap:<filename> option will create a load map.
__ls__FR7ostreamPCc
__ls__FR7ostreamf
collect: /usr/bin/ld returned 8 exit status
gmake: *** [mops] Error 1



--
/*-hoberoi@limerick.cbs.umn.edu--612-624-4938-Univeristy-of-Minnesota-St-Paul--*/
Technical Details
Message-ID: <1993Jan5.191313.6049@news2.cis.umn.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!limerick.cbs.umn.edu!hoberoi

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!limerick.cbs.umn.edu!hoberoi
From: hoberoi@limerick.cbs.umn.edu (Himanshu Oberoi)
Subject: g++ compiler problem on IBM RS6000
Message-ID: <1993Jan5.191313.6049@news2.cis.umn.edu>
Sender: gnulists@ai.mit.edu
Reply-To: hoberoi@limerick.cbs.umn.edu
Organization: University of Minnesota
Distribution: gnu
Date: Tue, 5 Jan 1993 19:13:13 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 77