David,
Thanks for your reply. I build STAF Perl support and then ran STAFProc and
got the following error:
# STAFProc
20080620-17:28:00;1077057760;00000100;Received signal 11 (SIGSEGV)
20080620-17:28:00;1077057760;00000100;Received signal 6 (SIGABRT) Aborted
Running STAFProc in gdb
# gdb STAFProc
GNU gdb 6.3 ---gdb version stuff snipped---
(gdb)
(gdb)run
Starting program: /usr/local/staf/bin/STAFProc [Thread debugging using
libthread_db enabled] [New Thread 1077057760 (LWP 14478)] [New Thread
1079368624 (LWP 14481)] [New Thread 1081469872 (LWP 14482)] [New Thread
1083624368 (LWP 14483)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1077057760 (LWP 14478)] 0x4026e1de in free () from
/lib/tls/libc.so.6
(gdb) where
#0 0x4026e1de in free () from /lib/tls/libc.so.6
#1 0x401aac61 in operator delete () from /usr/lib/libstdc++.so.6
#2 0x401aacbd in operator delete[] () from /usr/lib/libstdc++.so.6
#3 0x400b0b76 in STAFStringFreeBuffer () from /usr/local/staf/lib/libSTAF.so
#4 0x409ade3b in toChar () from /usr/local/staf/lib/perl58/libPLSTAF.so
#5 0x409ae2ed in PreparePerlInterpreter () from
/usr/local/staf/lib/perl58/libPLSTAF.so
#6 0x409ad8ab in STAFServiceConstruct () from
/usr/local/staf/lib/perl58/libPLSTAF.so
#7 0x0820f27d in STAFExternalService::STAFExternalService ()
#8 0x08224ae8 in handleServiceConfig ()
#9 0x082283f4 in readConfigFile ()
#10 0x0806aabd in main ()
(gdb)
Looking at the above trace suggested the error is on line 1860 in the file
stafif/STAFString.cpp, in the function STAFStringFreeBuffer.
1860 delete[] (char *)buffer;
Commenting out above statement makes STAFProc run all fine, but that's wrong
and introduces a memory leak.
On commenting the line I could even get the Perl STAF service running.
Please let me know if you can see why this error is caused.
Thanks again!
Santosh
On Thu, Jun 19, 2008 at 9:16 PM, David Bender <[EMAIL PROTECTED]> wrote:
>
> I think you will need to build the STAF Perl support on your system, using
> the system's Perl 5.8.5. The following forum thread deals with the same
> problem, and includes some info on building the Perl support:
> http://sourceforge.net/forum/message.php?msg_id=4904123
>
> The STAF Developer's Guide Perl information can be found at:
> http://staf.sourceforge.net/current/stafdg.html#Header_buildPerl
>
> David Bender
> STAF/STAX Development
> 8-1268 (512-838-1268)
> IBM Austin Bldg. 903-5B002
> Internet: [EMAIL PROTECTED]
>
>
>
> *"Santosh Sugur" <[EMAIL PROTECTED]>*
> Sent by: [EMAIL PROTECTED]
>
> 06/19/2008 09:23 AM
> To
> [email protected] cc
> Santosh Sugur <[EMAIL PROTECTED]> Subject
> [staf-users] Error while loading Perl STAF service
>
>
>
>
> Hello -
>
> I have just started using STAF and was looking to write some simple
> services in perl. I was trying the run the sample service
> (DeviceService.pm) provided in the Service Developers Guide on Linux. I have
> perl 5.8.5 on my Linux box.
>
> I have done the following steps to run the sample service:
>
> 1. Created a directory called services in /usr/local/staf.
> 2. Copied DeviceService.pm to this directory
> 3. Added the line SERVICE Sample LIBRARY PLSTAF EXECUTE DeviceService
> OPTION USELIB=/usr/local/staf/services to STAF.cfg
>
> On running STAFProc I get
>
> # STAFProc
> Caught STAFException
> Name : STAFException
> Location :
> /opt/dev/autobuild/build/src/staf/stafif/STAFDynamicLibraryInlImpl.cpp(29)
> Text : STAFDynamicLibraryOpen: *libperl.so: cannot open shared object
> file: No such file or directory*
> Error code: 10
> Error reading config file
>
> To get rid of this error I created a link in /usr/local/staf/lib as follows
>
> libperl.so -> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
>
> Now on running STAFProc I get
>
> # STAFProc*
> Error: Can't locate PLSTAFService.pm in @INC* (@INC contains:
> /usr/local/staf/services
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/5.8.5/i386-linux-thread-multi
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/5.8.5
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/i386-linux-thread-multi
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/5.8.4
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/5.8.3
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/5.8.2
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/5.8.1
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/5.8.0
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4
> /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2
> /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0
> /usr/lib/perl5/site_perl
> /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4
> /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2
> /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0
> /usr/lib/perl5/vendor_perl .) at /usr/local/staf/services/DeviceService.pm
> line 10.
> BEGIN failed--compilation aborted at
> /usr/local/staf/services/DeviceService.pm line 10.
> Compilation failed in require at (eval 2) line 3.
> Error on Service definition, SERVICE Sample LIBRARY PLSTAF EXECUTE
> DeviceService OPTION USELIB=/usr/local/staf/services
> 6:Error constructing service, PLSTAF, Result: Can't locate PLSTAFService.pm
> in @INC (@INC contains: /usr/local/staf/services
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/5.8.5/i386-linux-thread-multi
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/5.8.5
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/i386-linux-thread-multi
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/5.8.4
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/5.8.3
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/5.8.2 /usr/lib/p
> Error reading config file
>
> Since I found PLSTAFService.pm in /usr/local/staf/bin, I set PERL5LIB to
> this path so that it would find the file. Now on running STAFProc I get
>
> # STAFProc*
> Error: DynaLoader object version 1.04 does not match $DynaLoader::VERSION
> 1.05 at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 106
> *.
> Compilation failed in require at
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/*threads.pm*<http://threads.pm/>line
> 42.
> Compilation failed in require at /usr/local/staf/bin//PLSTAFService.pm line
> 14.
> BEGIN failed--compilation aborted at /usr/local/staf/bin//PLSTAFService.pm
> line 14.
> Compilation failed in require at /usr/local/staf/services/DeviceService.pm
> line 10.
> BEGIN failed--compilation aborted at
> /usr/local/staf/services/DeviceService.pm line 10.
> Compilation failed in require at (eval 2) line 3.
> Error on Service definition, SERVICE Sample LIBRARY PLSTAF EXECUTE
> DeviceService OPTION USELIB=/usr/local/staf/services
> 6:Error constructing service, PLSTAF, Result: DynaLoader object version
> 1.04 does not match $DynaLoader::VERSION 1.05 at
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 106.
> Compilation failed in require at
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/*threads.pm*<http://threads.pm/>line
> 42.
> Compilation failed in require at /usr/local/staf/bin//PLSTAFService.pm line
> 14.
> BEGIN failed--compilation aborted at /usr/local/staf/bin//PLSTAFService.pm
> line 14.
> Compilation failed in require at /usr/local/staf/services/Dev
> Error reading config file
>
> I googled for this error but couldn't get any proper answer. I tried
> compiling and installing STAF so that it would use the DynaLoader version
> which is on my machine, but couldn't get that working.
>
> Can anyone tell me what is wrong and what should be done to be able to run
> the sample perl service on Linux. I can run this service on windows without
> any problem.
>
> Thanks in Advance,
> Santosh
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
>
> http://sourceforge.net/services/buy/index.php_______________________________________________
> staf-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/staf-users
>
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
staf-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/staf-users