Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Originating-IP: [12.254.208.112] X-Originating-Email: [mgainty AT hotmail DOT com] From: "Martin Gainty" To: , "Greg McCrory" References: <5 DOT 2 DOT 1 DOT 1 DOT 2 DOT 20030428215943 DOT 01b9a818 AT coolbrew DOT com> <5 DOT 2 DOT 1 DOT 1 DOT 2 DOT 20030428224615 DOT 01930008 AT coolbrew DOT com> Subject: Re: Calling perl script from shell script: Win32 error 126 Date: Mon, 28 Apr 2003 21:53:10 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: X-OriginalArrivalTime: 29 Apr 2003 03:59:09.0615 (UTC) FILETIME=[AFF33BF0:01C30E03] Error 126 is Module not found (Make sure all Magick and Perl DLLs are on the path in shell) Regards, -Martin ----- Original Message ----- From: "Greg McCrory" To: Sent: Monday, April 28, 2003 9:52 PM Subject: Re: Calling perl script from shell script: Win32 error 126 > At 4/28/2003 11:35 PM -0400, Igor Pechtchanski wrote: > > >Greg, > > > >No, it's not necessary to set the PATH, I was just trying to guess why > >there was a difference between a shell script and the command line... > >Just out of curiousity, is the PATH the same in the shell script and in > >the shell? > > > >Also, are you executing Cygwin perl in both cases? Try "type -a perl" > >from the shell (bash?)... How are you invoking the script (i.e., by > >calling it directly, or through "perl scriptname")? If directly, what > >does the shebang ("#!") line at the top of the script say? > > Igor > > > I need to add new information to this issue. I mistakenly thought I was > getting this error from within a general shell script. I now see the error > actually occurs only when the script is run as a service. > > Example: > #!/bin/sh > export PERL_DL_DEBUG=1 > > while sleep 5 > do > if [ -f "/tmp/flag" ]; > then > rm /tmp/flag > perl -e 'use Image::Magick; print("Hello!");' > fi > done > > ## end script > > When run from command line, works fine. when installed as service yields: > <<< > Can't load > '/usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/Image/Magick/Magick > .dll' for module Image::Magick: dlopen: Win32 error 126 at > /usr/lib/perl5/5.6.1/ > cygwin-multi/DynaLoader.pm line 206. > >>> > > > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Problem reports: http://cygwin.com/problems.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/