Re: ImageMagick and perl

2013-01-13 Thread Stuart Henderson
On 2013/01/13 07:03, Brad Smith wrote:
> On Sun, Jan 13, 2013 at 11:54:05AM +, Stuart Henderson wrote:
> > It doesn't need to actually be built with support for threads, just to
> > be linked with -lpthread.
> 
> It doesn't but there is no point putting the effort in and not doing so.
> I have run into a few Perl projects over the years that do require it.

IMO priorities for perl should be in order:

- getting it linked -lpthread, or get rid of pthread wrapped functions
in libc so libpthread can just be a 'normal' library
- handling afresh's update to 5.14.2 (not until after 5.3 is tagged)
- enabling threaded perl (probably next cycle if possible but with a bit
of a delay after 5.14.2)

I think they should not be mixed up as otherwise the source of any
issues that show up will not be clear.

> > > Once perl is built with thread support you won't need this workaround.
> > > I'm not sure when this will be done though. Someone was working on this 
> > > some
> > > time ago but I don't know how far that effort did go.
> > 
> > Actual threaded perl support had issues on some arch.
> 
> There were some issues with rthreads which threaded Perl exposed on
> alpha but that was fixed awhile ago. AFAIK all of the other archs
> were fine as is. Its about time this is fixed because this is just
> getting ridiculous.

yep.



Re: ImageMagick and perl

2013-01-13 Thread Brad Smith
On Sun, Jan 13, 2013 at 11:54:05AM +, Stuart Henderson wrote:
> It doesn't need to actually be built with support for threads, just to
> be linked with -lpthread.

It doesn't but there is no point putting the effort in and not doing so.
I have run into a few Perl projects over the years that do require it.

> > Once perl is built with thread support you won't need this workaround.
> > I'm not sure when this will be done though. Someone was working on this some
> > time ago but I don't know how far that effort did go.
> 
> Actual threaded perl support had issues on some arch.

There were some issues with rthreads which threaded Perl exposed on
alpha but that was fixed awhile ago. AFAIK all of the other archs
were fine as is. Its about time this is fixed because this is just
getting ridiculous.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



Re: ImageMagick and perl

2013-01-13 Thread Stuart Henderson
On 2013-01-12, Stefan Sperling  wrote:
> On Sat, Jan 12, 2013 at 01:51:55PM +0100, Dmitrij D. Czarkoff wrote:
>> On Sat, Jan 12, 2013 at 12:31:40PM +, Stuart Henderson wrote:
>> > Set LD_PRELOAD=/usr/lib/libpthread.so
>> > 
>> 
>> Thanks, it solved the problem for me.
>> 
>> Now, do I have to provide LD_PRELOAD in environment for any perl script using
>> ImageMagick?
>
> For now, yes. The problem is that perl isn't built with support for
> threads, while imagemagick is linked to lipthread.

It doesn't need to actually be built with support for threads, just to
be linked with -lpthread.

> Once perl is built with thread support you won't need this workaround.
> I'm not sure when this will be done though. Someone was working on this some
> time ago but I don't know how far that effort did go.

Actual threaded perl support had issues on some arch.



Re: ImageMagick and perl

2013-01-12 Thread Stefan Sperling
On Sat, Jan 12, 2013 at 01:51:55PM +0100, Dmitrij D. Czarkoff wrote:
> On Sat, Jan 12, 2013 at 12:31:40PM +, Stuart Henderson wrote:
> > Set LD_PRELOAD=/usr/lib/libpthread.so
> > 
> 
> Thanks, it solved the problem for me.
> 
> Now, do I have to provide LD_PRELOAD in environment for any perl script using
> ImageMagick?

For now, yes. The problem is that perl isn't built with support for
threads, while imagemagick is linked to lipthread.

Once perl is built with thread support you won't need this workaround.
I'm not sure when this will be done though. Someone was working on this some
time ago but I don't know how far that effort did go.



Re: ImageMagick and perl

2013-01-12 Thread Dmitrij D. Czarkoff
On Sat, Jan 12, 2013 at 12:31:40PM +, Stuart Henderson wrote:
> On 2013-01-12, Dmitrij D. Czarkoff  wrote:
> > Hello!
> >
> > I was trying to build a piece of software that uses Image::Magick, when I 
> > ran
> > into the following problem on amd64 -current:
> >
> >   $ perl -e "use Image::Magick;"
> >   Can't load 
> > '/usr/local/libdata/perl5/site_perl/amd64-openbsd/auto/Image/Magick/Magick.so'
> >  for module Image::Magick: Cannot load specified object at 
> > /usr/libdata/perl5/amd64-openbsd/5.12.2/DynaLoader.pm line 200.
> >at -e line 1
> >   Compilation failed in require at -e line 1.
> >   BEGIN failed--compilation aborted at -e line 1.
> >   &Image::Magick::constant not defined. The required ImageMagick libraries 
> > are not installed or not installed properly.
> >   END failed--call queue aborted at -e line 1.
> >
> > On my another box (i386 5.2) I get another error:
> >
> >   % perl -e "use Image::Magick;"
> >   perl:/usr/local/lib/libMagickCore.so.3.0: undefined symbol 
> > 'pthread_mutexattr_init'
> >   lazy binding failed!
> >   zsh: segmentation fault (core dumped)  perl -e "use Image::Magick;"
> >
> > Is there any way to use Image::Magick on OpenBSD? If no, why does it get
> > built?
> >
> 
> Set LD_PRELOAD=/usr/lib/libpthread.so
> 

Thanks, it solved the problem for me.

Now, do I have to provide LD_PRELOAD in environment for any perl script using
ImageMagick?

-- 
Dmitrij D. Czarkoff



Re: ImageMagick and perl

2013-01-12 Thread Stuart Henderson
On 2013-01-12, Dmitrij D. Czarkoff  wrote:
> Hello!
>
> I was trying to build a piece of software that uses Image::Magick, when I ran
> into the following problem on amd64 -current:
>
>   $ perl -e "use Image::Magick;"
>   Can't load 
> '/usr/local/libdata/perl5/site_perl/amd64-openbsd/auto/Image/Magick/Magick.so'
>  for module Image::Magick: Cannot load specified object at 
> /usr/libdata/perl5/amd64-openbsd/5.12.2/DynaLoader.pm line 200.
>at -e line 1
>   Compilation failed in require at -e line 1.
>   BEGIN failed--compilation aborted at -e line 1.
>   &Image::Magick::constant not defined. The required ImageMagick libraries 
> are not installed or not installed properly.
>   END failed--call queue aborted at -e line 1.
>
> On my another box (i386 5.2) I get another error:
>
>   % perl -e "use Image::Magick;"
>   perl:/usr/local/lib/libMagickCore.so.3.0: undefined symbol 
> 'pthread_mutexattr_init'
>   lazy binding failed!
>   zsh: segmentation fault (core dumped)  perl -e "use Image::Magick;"
>
> Is there any way to use Image::Magick on OpenBSD? If no, why does it get
> built?
>

Set LD_PRELOAD=/usr/lib/libpthread.so



ImageMagick and perl

2013-01-11 Thread Dmitrij D. Czarkoff
Hello!

I was trying to build a piece of software that uses Image::Magick, when I ran
into the following problem on amd64 -current:

  $ perl -e "use Image::Magick;"
  Can't load 
'/usr/local/libdata/perl5/site_perl/amd64-openbsd/auto/Image/Magick/Magick.so' 
for module Image::Magick: Cannot load specified object at 
/usr/libdata/perl5/amd64-openbsd/5.12.2/DynaLoader.pm line 200.
   at -e line 1
  Compilation failed in require at -e line 1.
  BEGIN failed--compilation aborted at -e line 1.
  &Image::Magick::constant not defined. The required ImageMagick libraries are 
not installed or not installed properly.
  END failed--call queue aborted at -e line 1.

On my another box (i386 5.2) I get another error:

  % perl -e "use Image::Magick;"
  perl:/usr/local/lib/libMagickCore.so.3.0: undefined symbol 
'pthread_mutexattr_init'
  lazy binding failed!
  zsh: segmentation fault (core dumped)  perl -e "use Image::Magick;"

Is there any way to use Image::Magick on OpenBSD? If no, why does it get
built?

-- 
Dmitrij D. Czarkoff