Mail Archives: cygwin/2003/04/28/23:59:20
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" <greg AT coolbrew DOT com>
To: <cygwin AT cygwin DOT com>
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/
- Raw text -