1828239 Members
2449 Online
109975 Solutions
New Discussion

Re: Syslog link errors

 
SOLVED
Go to solution
David E. Cross
New Member

Syslog link errors

Hi,

I'm new to OpenVMS and getting to grips with the ONC RPC examples. My code works but I get 'undefined symbol SYSLOG' emanating from the RPC libraries. Should I have included some standard library or set up some default which is so obvious that nobody bothers to document it?
9 REPLIES 9
Martin Vorlaender
Honored Contributor

Re: Syslog link errors

Dave,

I have no idea what you mean by "THE" ONC RPC examples. The RPC examples provided with HP TCP/IP V5.4 (in SYS$COMMON:[SYSHLP.EXAMPLES.TCPIP.RPC]) build cleanly on my OpenVMS ALpha V7.3-2 system.

So, obviously you mean some ONC RPC examples you've brought over from *ix. If that's the case, the answer is: there is neither a syslog() system function in OpenVMS' C RTL, nor is there a syslogd provided with the OS.

That said, you can build your own syslogd, see e.g. http://vms.process.com/scripts/fileserv/fileserv.com?SYSLOGD (the site seems to be down at the moment).

HTH,
Martin
David E. Cross
New Member

Re: Syslog link errors

I meant the examples in the text of the doc 'HP TCP/IP Services for OpenVMS - ONC RPC Programming'.

I've found out that OpenVMS doesn't have a Syslog whcih confuses me even more.
Martin Vorlaender
Honored Contributor

Re: Syslog link errors

Dave,

>>>
I meant the examples in the text of the doc 'HP TCP/IP Services for OpenVMS - ONC RPC Programming'.
<<<

I just looked through the examples in chapter 2 (http://h71000.www7.hp.com/doc/82FINAL/6528/6528pro_001.html#rpcgen_chap), but the code for those is in SYS$COMMON:[SYSHLP.EXAMPLES.TCPIP.RPC] and doesn't have a call to syslog().

Which specific example are you refering to?

cu,
Martin
David E. Cross
New Member

Re: Syslog link errors

Hi,

Stripped to the bare bones, this is the problem.

EV6::DEH.DINTSRC> type mintest.c
/* Mintest.c */

#include /* always needed */
/* partial contents of RPCGEN generated file copied below */
//#include "TCPIP$RPC:TYPES.H"
#define MYSERVER ((u_long)0x20000017)
#define MYSERVERVER ((u_long)1)

main(argc, argv) int argc; char *argv[];
{
CLIENT *cl;
cl = clnt_create("EV6", MYSERVER, MYSERVERVER, "tcp");
exit(0);
}
EV6::DEH.DINTSRC> cc/decc mintest.c
EV6::DEH.DINTSRC> LINK mintest,TCPIP$RPC:TCPIP$RPCXDR/LIBRARY
%LINK-W-NUDFSYMS, 1 undefined symbol:
%LINK-I-UDFSYM, SYSLOG
%LINK-W-USEUNDEF, undefined symbol SYSLOG referenced
in psect $LINK$ offset %X00000100
in module XDR file SYS$COMMON:[TCPIP$LIB.RPC]TCPIP$RPCXDR.OLB;1
%LINK-W-USEUNDEF, undefined symbol SYSLOG referenced
in psect $LINK$ offset %X000000F0
in module CLNT_TCP file SYS$COMMON:[TCPIP$LIB.RPC]TCPIP$RPCXDR.OLB;1
%LINK-W-USEUNDEF, undefined symbol SYSLOG referenced
in psect $LINK$ offset %X00000050
in module CLNT_UDP file SYS$COMMON:[TCPIP$LIB.RPC]TCPIP$RPCXDR.OLB;1
%LINK-W-USEUNDEF, undefined symbol SYSLOG referenced
in psect $LINK$ offset %X00000030
in module XDR_REC file SYS$COMMON:[TCPIP$LIB.RPC]TCPIP$RPCXDR.OLB;1
EV6::DEH.DINTSRC>

Dave.
Volker Halle
Honored Contributor
Solution

Re: Syslog link errors

Dave,

which version of TCPIP and on which architecture:

$ TCPIP SHOW VERSION

This would smell like a bug in TCPIP, if they would deliver a version of TCPIP$RPCXDR.OLB with external references to SYSLOG... - did you try linking with the shareable image SYS$SHARE:TCPIP$RPCXDR_SHR as described in the documentation ?

Volker.
Craig A Berry
Honored Contributor

Re: Syslog link errors

Yes, it does appear the object library has a goof or there is something missing from your linker search path. You should log a call if you have a support contract. If you don't have any special requirement that mandates static linking, you can link against the shareable image (aka dynamic library) instead. To do that, just create a linker options file and add it to your link command like so:

$ type mintest.opt
SYS$SHARE:TCPIP$RPCXDR_SHR/SHARE
$ link mintest,mintest/options
Martin Vorlaender
Honored Contributor

Re: Syslog link errors

>>>
just create a linker options file and add it to your link command
<<<

Or specify it directly on the command line/in the build DCL procedure file:

$ link mintest,sys$input:/options
SYS$SHARE:TCPIP$RPCXDR_SHR/SHARE
$

HTH,
Martin
David E. Cross
New Member

Re: Syslog link errors

Thanks Guys,

Using the shareable library solved the problem.

For reference Show Version reports:

HP TCP/IP Services for OpenVMS Alpha Version V5.5 - ECO 1
on an AlphaServer DS20 500 MHz running OpenVMS V8.2


Regards,
Dave.
David E. Cross
New Member

Re: Syslog link errors

Solution provided works OK