undefined reference to `MagickSetImageEndian' in 1.0.9

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
BilboUK
Posts: 6
Joined: 2012-02-29T10:25:55-07:00
Authentication code: 8675308

undefined reference to `MagickSetImageEndian' in 1.0.9

Post 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).
ryandesign
Posts: 17
Joined: 2012-05-22T18:37:42-07:00
Authentication code: 13

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Post 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.
ryandesign
Posts: 17
Joined: 2012-05-22T18:37:42-07:00
Authentication code: 13

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Post by ryandesign »

Thank you. I updated ImageMagick to 6.7.7-2 but the problem remains, even after rebuilding php-magickwand 1.0.9.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Post 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.
zhaoley
Posts: 2
Joined: 2012-06-02T03:20:56-07:00
Authentication code: 13

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Post by zhaoley »

I got a different error:

undefined reference to `MagickGetImageEndian'

It is Get not Set!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Post 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
ryandesign
Posts: 17
Joined: 2012-05-22T18:37:42-07:00
Authentication code: 13

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Post 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
zhaoley
Posts: 2
Joined: 2012-06-02T03:20:56-07:00
Authentication code: 13

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Post 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 ); 
} 
/* }}} */
BilboUK
Posts: 6
Joined: 2012-02-29T10:25:55-07:00
Authentication code: 8675308

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: undefined reference to `MagickSetImageEndian' in 1.0.9

Post by magick »

We'll get your patch into the next point release of MagickWand. It should be available within just a few days. Thanks.
Post Reply