Page 1 of 1

undefined reference to `MagickSetImageEndian' in 1.0.9

Posted: 2012-02-29T13:06:04-07:00
by BilboUK
MagickWandForPHP 1.0.9 will not compile against the currently released versions of ImageMagick.

I don't know which version of ImageMagick the devs compiled it against but I tried ImageMagick-6.7.5-7 as well as the allegedly "approved" version 6.3.5-9 as specified in INSTALL (which is wrong since it's < the minimum version required by the compiler!) and version 6.3.8-11 (as specified in ./configure script).

None of these worked since the method MagickSetImageEndian() doesn't appear to exist in those versions of ImageMagick.

I reverted to MagickWandForPHP 1.0.8 and it compiles (& works) just fine with 6.7.5-7 (although the compiler reports a lot of deprecated methods and 'incompatible pointer type' warnings).


(c.f. http://trac.imagemagick.org/changeset/6652 )

(p.s. sorry for also posting in MagickWand forum - I post it here in case any of the MagickWandForPHP devs read this forum).

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Posted: 2012-05-22T18:44:26-07:00
by ryandesign
Are there no developers reading this forum? There are multiple reports of this problem all over this forum, other forums on this site, and elsewhere.

Here is the bug report the MacPorts project received about this problem, but it's not our problem to fix:

https://trac.macports.org/ticket/34089

Please fix this problem and release a new version of MagickWand for PHP containing the fix. Thank you.

-Ryan Schmidt, for the MacPorts project

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Posted: 2012-05-23T04:20:40-07:00
by magick
We'll have a patch for the problem you reported in the ImageMagick 6.7.7-1 release, available within a few days. Thanks.

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Posted: 2012-05-28T00:34:38-07:00
by ryandesign
Thank you. I updated ImageMagick to 6.7.7-2 but the problem remains, even after rebuilding php-magickwand 1.0.9.

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Posted: 2012-05-28T04:49:46-07:00
by magick
Check wand/magick-image.c and look for MagickSetImageEndian(). It should be there. If so, perhaps MagickWand for PHP is not linking against that version of the ImageMagick MagickWand library.

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Posted: 2012-06-02T03:26:23-07:00
by zhaoley
I got a different error:

undefined reference to `MagickGetImageEndian'

It is Get not Set!

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Posted: 2012-06-02T05:43:46-07:00
by magick
We'll have a patch for the problem you reported in the ImageMagick 6.7.7-6 release, available within a few days. Thanks

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Posted: 2012-07-22T02:53:56-07:00
by ryandesign
Check wand/magick-image.c and look for MagickSetImageEndian(). It should be there.
Yes it is, as is MagickGetImageEndian().
If so, perhaps MagickWand for PHP is not linking against that version of the ImageMagick MagickWand library.
There is no other version installed.

The problem remains using ImageMagick 6.7.8-5. When starting php when php-magickwand 1.0.9 is installed, a warning is printed:

Code: Select all

$ php54 -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/local/lib/php54/extensions/no-debug-non-zts-20100525/magickwand.so' - dlopen(/opt/local/lib/php54/extensions/no-debug-non-zts-20100525/magickwand.so, 9): Symbol not found: _zif_magicksetimageendian
  Referenced from: /opt/local/lib/php54/extensions/no-debug-non-zts-20100525/magickwand.so
  Expected in: flat namespace
 in /opt/local/lib/php54/extensions/no-debug-non-zts-20100525/magickwand.so in Unknown on line 0
PHP 5.4.5 (cli) (built: Jul 20 2012 03:39:26) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Posted: 2012-10-24T18:58:25-07:00
by zhaoley
for this issue, you should add the code in the file magickwand.c (which is in the package "MagickWandForPHP 1.0.9")

Code: Select all

/* {{{ proto bool MagickSetImageEndian( MagickWand magick_wand, int endian_type ) 
	*/ 
PHP_FUNCTION( magicksetimageendian ) 
{ 
	MW_PRINT_DEBUG_INFO 

	MW_GET_MAGICKWAND_SET_ENUM_RET_BOOL( EndianType, MagickSetImageEndian ); 
} 
/* }}} */

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Posted: 2012-10-25T00:19:12-07:00
by BilboUK
Thanks for the tip zhaoley.
It seems a shame that no-one is maintaining this extension any more. :( I find it very useful.

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Posted: 2012-10-25T04:06:12-07:00
by magick
We'll get your patch into the next point release of MagickWand. It should be available within just a few days. Thanks.