Re: C++ templates and Oracle OCI on SPARC

From: Graham Dumpleton <grahamd_at_cssc-syd.tansu.com.au>
Date: 27 Feb 1994 19:18:25 +1100
Message-ID: <2kpl0h$dhq_at_manet.cssc-syd.tansu.com.au>


jmay_at_ctp.com (Jason May) writes:

>Has anyone seen this problem before?
 

>We're using Sun's SPARCCompiler C++ 3.0.1 to build a C++ program that
>uses the Oracle OCI library. The release version of this compiler could
>not handle C++ templates in libraries (static or shared).
 

>At link time, I'm getting the following errors:
 

>nm: /usr/local/oracle/lib/libsqlnet.a:(osnpop.o): no name list
>nm: /usr/local/oracle/lib/libsqlnet.a:(osntei.o): no name list
>nm: /usr/local/oracle/lib/libsqlnet.a:(osntxo.o): no name list
>nm: /usr/local/oracle/lib/libsqlnet.a:(osnt3n.o): no name list
>nm: /usr/local/oracle/lib/libsqlnet.a:(snlm.o): no name list
>nm: /usr/local/oracle/lib/libsqlnet.a:(nttost.o): no name list
>nm: /usr/local/oracle/lib/libsqlnet.a:(ntt3n.o): no name list
>CC[ptlink] warning: ##### nm failed on /usr/local/oracle/lib/libsqlnet.a, ignoring ... #####
 

>There's a similar bunch of errors for the libora.a and libnetwork.a
>libraries; after dumping out the error messages, the compile hangs.
 

>These errors never appeared when compiling with the pre-patch version of
>the compiler.
 

>I haven't been able to find any documentation for the 'no name list'
>error message. 'ptlink' is Sun's template processing module (it's a
>cfront compiler), and it appears that it's searching through the
>libraries for something and is having trouble with the Oracle libraries,
>but since this is also undocumented I have no idea what it's trying to
>do.

"no name list" essentially means that there is nothing in that object file. When "nm" encounters any empty object files, it gives back a non zero exit status. The non zero exit status cause "ptlink" to think the library is bad and thus throw away all the symbol information for it. As the Oracle libraries aren't going to have references to templates in them, this shouldn't be a problem. I cannot given an answer as to why it then hangs.

>Any suggestions are greatly appreciated.

Delete the empty object files from the libraries amd rerun "ranlib" on the libraries.

--
Graham Dumpleton (grahamd_at_research.otc.com.au)
Received on Sun Feb 27 1994 - 09:18:25 CET

Original text of this message