🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
2 messages
2 total messages Started by News System Wed, 10 Mar 1999 00:00
Perl and Syslog
#35897
Author: News System
Date: Wed, 10 Mar 1999 00:00
38 lines
2083 bytes
Hi,
I am using SuSE Linux 6.0 with Kernel 2.2.1 and Perl 5.00502.
Setting up INN 2.2 I found a problem when trying to write to
Syslog from Perl.

The following Perl programm

#!/usr/bin/perl
use Sys::Syslog;
openlog($program, 'cons,pid', 'user');
syslog('info', 'Hello world');
closelog();   

produces the error message

Can't locate stdarg.ph in @INC (did you run h2ph?) (@INC contains:
/usr/lib/perl
5/5.00502/i586-linux /usr/lib/perl5/5.00502
/usr/lib/perl5/site_perl/5.005/i586-
linux /usr/lib/perl5/site_perl/5.005 .) at
/usr/lib/perl5/site_perl/5.005/i586-l
inux/sys/syslog.ph line 160.
BEGIN failed--compilation aborted at ./tt line 2. 

The INN INSTALL file told me to do a h2ph * in /usr/include and
/usr/include/sys, but there is no stdarg.h at all.
I found stdarg.h in
./usr/lib/gcc-lib/i486-linux/egcs-2.91.60/include/stdarg.h
./usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stdarg.h   
After running h2ph -a -h in one of these directories I get
no more error messages, but I get no syslog entry at all.

Any hints ?

Thanks
Bernhard

Re: Perl and Syslog
#35889
Author: Phat Phork-Phed Phluffy
Date: Wed, 10 Mar 1999 00:00
35 lines
2053 bytes
{snecked, posted and mailed.}

>>>>> "Bernhard" == News System <verstege@hik.fzk.de> writes:

Bernhard> use Sys::Syslog;

Bernhard> After running h2ph -a -h in one of these directories I get
Bernhard> no more error messages, but I get no syslog entry at all.
Bernhard> Any hints ?

I *knew* I was forgetting something.

Grab and install
<URL:http://members.tripod.com/~gerglery/k0dez/INN_Syslog_1.0.tar.gz>
.  It's about 12K.  The only change to your script after putting in
this module will be to change the 'use Sys::Syslog;' to 'use
INN::Syslog;'

This version of the module takes the h2ph mess out of the picture if
at all possible (which is nearly all cases except for some Ultrix
cruft that won't die).  The fix for Solaris is in this one too.


If instead you want to try and make the original Sys::Syslog work, you
can try adding this undocumented call:

	Sys::Syslog::setsockopt('unix');

-- 
 "We can't legislate against every stupid thing people will do, and yet the
temptation is there to try time and time again."  --Jesse 'The Body' Ventura
               New stuff: "Meowing in Cahoots with the Vulis"
 <URL:http://www.mp3.com/music/Alternative/8446.html> (fake addy for d/l okay)

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads