Symbol 'type' problem? 't' vs 'W'? - part 2

tracy@col.hp.com tracy@col.hp.com
Tue Apr 25 13:16:00 GMT 2000


Same as part-1 but with additional bzip2 file!!!

Good Day,

  I'm having trouble get some code to work correctly using GNU gcc and
  HPUX-10.20.  I'm trying to instatiate STL templates in a shared library,
  and the instatiation of some symbols seem to be 'local'.  The dynamic
  loader then does not find the symbol.  See below for output:

#
# output from trying to execute TokenT
#

fise:/home/tracy/test/lclsym
> TokenT
/usr/lib/dld.sl: Unresolved symbol:
insert__t6vector2ZPt15_Hashtable_node1Z8TokenRepZt9allocator1Z8TokenRepPPt
15_Hashtable_node1Z8TokenRepUiRCPt15_Hashtable_node1Z8TokenRep (code)
from ./libBasics.sl
Abort(coredump)


  So the symbol vector::insert(...) is not found, but it looks like the
symbol
  is defined.  See nm output below for several files:

#
# output form nm for Token.o
#
> nm Token.o | fgrep insert | fgrep vec
		 U
insert__t6vector2ZPt15_Hashtable_node1Z8TokenRepZt9allocator1Z8TokenRepPPt
15_Hashtable_node1Z8TokenRepUiRCPt15_Hashtable_node1Z8TokenRep

#
# output from nm for basic.o
#
> nm basic.o | fgrep insert | fgrep vec
00000000 t
insert__t6vector2ZPt15_Hashtable_node1Z8TokenRepZt9allocator1Z8TokenRepPPt
15_Hashtable_node1Z8TokenRepUiRCPt15_Hashtable_node1Z8TokenRep

#
# output form nm for libBasics.sl
#
> nm libBasics.sl | fgrep insert | fgrep vec
         U
insert__t6vector2ZPt15_Hashtable_node1Z8TokenRepZt9allocator1Z8TokenRepPPt
15_Hashtable_node1Z8TokenRepUiRCPt15_Hashtable_node1Z8TokenRep
         U
insert__t6vector2ZPt15_Hashtable_node1Z8TokenRepZt9allocator1Z8TokenRepPPt
15_Hashtable_node1Z8TokenRepUiRCPt15_Hashtable_node1Z8TokenRep
0000b8d8 t
insert__t6vector2ZPt15_Hashtable_node1Z8TokenRepZt9allocator1Z8TokenRepPPt
15_Hashtable_node1Z8TokenRepUiRCPt15_Hashtable_node1Z8TokenRep


  When I compile and execute this example on a linux-i386 system,
everything
  works as it should.  When I look at the symbol(s) for vector::insert on
the
  i386 system the type is 'W' instead of 't'.  I'm not sure what this
exactly
  means, I don't find much documentation of the output of nm.

  Included in the bzip2 files are:

	Token.c  -  the code that is needed in the shared library
	Token.h  -
	basic.ct -  the explicit template instatiation file

		the above three files are used to create a shared library (libBasics.so)

	TokenT.c -  the main code that uses libBasics.so
    m        -  script that is used to build the library and the
executable
	m.out    -  the output of the script showing the -v compile output

	Token.ii -  files generated by the compiler...
	basic.ii
	TokenT.ii


	Thanks for any help you can give!!



#
#  m.out - output from building the pieces parts
#

compiling Token.c ...
Reading specs from
/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/specs
gcc version 2.95.2 19991024 (release)

/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/cpp -lang-c++ -v
 -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Dhppa -Dhp90
00s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D__hppa__ -D__hp9000s80
0__ -D__hp9000s800 -D__hp9k8__ -D__PWB__ -D__hpux__ -D__unix__ -D__hppa -D
__hp9000s800 -D__hp9k8 -D__PWB -D__hpux -D__unix -Asystem(unix) -Asystem(h
pux) -Acpu(hppa) -Amachine(hppa) -D__EXCEPTIONS -g -Wno-non-template-frien
d -D__hp9000s700 -D_PA_RISC1_1 -D_HPUX_SOURCE -D_HIUX_SOURCE -D__STDC_EXT_
_ Token.c Token.ii
GNU CPP version 2.95.2 19991024 (release) (hppa)
#include "..." search starts here:
#include <...> search starts here:

/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/../../../../incl
ude/g++-3
 /opt/TWWfsw/gcc29/include

/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/../../../../hppa
1.1-hp-hpux10.20/include
 /opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
 /opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/cc1plus
Token.ii -quiet -dumpbase
Token.cc -mpa-risc-1-1 -g -Wno-non-template-friend -version -fPIC -fno-imp
licit-templates -fno-for-scope -o Token.s
GNU C++ version 2.95.2 19991024 (release) (hppa1.1-hp-hpux10.20) compiled
by GNU C version 2.95.2 19991024 (release).
 /opt/TWWfsw/gcc29/hppa1.1-hp-hpux10.20/bin/as -o Token.o Token.s
compiling basic.ct ...
Reading specs from
/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/specs
gcc version 2.95.2 19991024 (release)

/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/cpp -lang-c++ -v
 -I. -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Dhppa -D
hp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D__hppa__ -D__hp900
0s800__ -D__hp9000s800 -D__hp9k8__ -D__PWB__ -D__hpux__ -D__unix__ -D__hpp
a -D__hp9000s800 -D__hp9k8 -D__PWB -D__hpux -D__unix -Asystem(unix) -Asyst
em(hpux) -Acpu(hppa) -Amachine(hppa) -D__EXCEPTIONS -g -Wno-non-template-f
riend -D__hp9000s700 -D_PA_RISC1_1 -D_HPUX_SOURCE -D_HIUX_SOURCE -D__STDC_
EXT__ basic.ct basic.ii
GNU CPP version 2.95.2 19991024 (release) (hppa)
#include "..." search starts here:
#include <...> search starts here:
 .

/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/../../../../incl
ude/g++-3
 /opt/TWWfsw/gcc29/include

/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/../../../../hppa
1.1-hp-hpux10.20/include
 /opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
 /opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/cc1plus
basic.ii -quiet -dumpbase
basic.cc -mpa-risc-1-1 -g -Wno-non-template-friend -version -fPIC -fno-for
-scope -o basic.s
GNU C++ version 2.95.2 19991024 (release) (hppa1.1-hp-hpux10.20) compiled
by GNU C version 2.95.2 19991024 (release).
 /opt/TWWfsw/gcc29/hppa1.1-hp-hpux10.20/bin/as -o basic.o basic.s
linking shared library basics ...
Reading specs from
/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/specs
gcc version 2.95.2 19991024 (release)

/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/collect2 -z -b -
o
libBasics.sl -L/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2 -
L/usr/ccs/bin -L/usr/ccs/lib -L/opt/TWWfsw/gcc29/lib Token.o
basic.o -lstdc++ -lm -lgcc -lgcc
compiling TokenT.c test ...
Reading specs from
/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/specs
gcc version 2.95.2 19991024 (release)

/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/cpp -lang-c++ -v
 -I
./ -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Dhppa -Dhp
9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D__hppa__ -D__hp9000s
800__ -D__hp9000s800 -D__hp9k8__ -D__PWB__ -D__hpux__ -D__unix__ -D__hppa 
-D__hp9000s800 -D__hp9k8 -D__PWB -D__hpux -D__unix -Asystem(unix) -Asystem
(hpux) -Acpu(hppa) -Amachine(hppa) -D__EXCEPTIONS -g -Wno-non-template-fri
end -D__hp9000s700 -D_PA_RISC1_1 -D_HPUX_SOURCE -D_HIUX_SOURCE -D__STDC_EX
T__ TokenT.c TokenT.ii
GNU CPP version 2.95.2 19991024 (release) (hppa)
#include "..." search starts here:
#include <...> search starts here:
 .

/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/../../../../incl
ude/g++-3
 /opt/TWWfsw/gcc29/include

/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/../../../../hppa
1.1-hp-hpux10.20/include
 /opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
 /opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/cc1plus
TokenT.ii -quiet -dumpbase
TokenT.cc -mpa-risc-1-1 -g -Wno-non-template-friend -version -fno-for-scop
e -o TokenT.s
GNU C++ version 2.95.2 19991024 (release) (hppa1.1-hp-hpux10.20) compiled
by GNU C version 2.95.2 19991024 (release).
 /opt/TWWfsw/gcc29/hppa1.1-hp-hpux10.20/bin/as -o TokenT.o TokenT.s
linking TokenT executable ...
Reading specs from
/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/specs
gcc version 2.95.2 19991024 (release)

/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/collect2 -L/lib/
pa1.1 -L/usr/lib/pa1.1 -z -u main -o TokenT /usr/ccs/lib/crt0.o -L
. -L/opt/TWWfsw/gcc29/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2 -L/usr/ccs/b
in -L/usr/ccs/lib -L/opt/TWWfsw/gcc29/lib
TokenT.o -lBasics -lstdc++ -lm -lgcc -lc -lgcc


   _____________________________________________________________________

    Tracy Vandeventer          e-mail: tracy_vandeventer@agilent.com
    Agilent Technologies       USmail: 1900 Garden of the Gods Road
    Colorado Springs Division          PO Box 2197
    Phone:  (719) 590-2640             Colorado Springs, CO  80901-2197
   _____________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stuff-b.bz2
Type: application/x-bzip2
Size: 48930 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000425/d5c8a895/attachment.bz2>


More information about the Gcc-bugs mailing list