-
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuring issue on centos 64bit #8
Comments
Can you dump the value of:
? |
gives PHP_LIBDIR is lib To clarify - imagick is looking in the correct directories for the file, it's just using the 32bit names instead of the 64bit names. i.e. it's looking for |
I should have said, this is compiling against ImageMagick-6.8.7-0.tar.gz in this Centos Vagrant box |
The problem is that PKG_CONFIG_PATH includes "lib" instead of "lib64" which would probably contain the right library names. However, if $PHP_LIBDIR is "lib" that makes it somewhat hard to detect that actually /usr/lib64 should be used. As far as I understand /usr/lib64 is a just a convention chosen by some distributions (there are others like /usr/lib/64 etc) so not really sure how to approach this problems. |
Let me check if any of the available variables gives the correct and expected library directory. With the current master branch you should be able to do ./configure PKG_CONFIG_PATH="/usr/lib64/pkgconfig" to set the right path. |
Thanks - setting PKG_CONFIG_PATH worked. Possibly a dumb question, but why do you export PKG_CONFIG_PATH during the normal configure process? Obviously you need to set it if the user has passed it in on the command line, but can't you just assume that it's set correctly by default, rather than always trying to set it? aka other pecl packages don't seem to set it. |
Well, first of all most PECL extensions don't use pkgconfig to get the flags. Magickwand-Config is a thin shell wrapper for pkg-config. Therefore if you have imagemagick installed to non-standard location PKG_CONFIG_PATH needs to be set to find the libs and flags (--with-imagick=/path/to sets it). |
Yeah - that's what I don't understand. I have imagemagick installed to it's default location, and am not setting --with-imagick. The script already finds the wand-config in one of the default places it's looking for it, so why does PKG_CONFIG_PATH need to be set, when it's neither passed in explicitly nor implicitly through --with-imagick. |
I think I remember why that was added. The Magickwand-Config program is search from these paths: for i in /usr/local /usr /opt /opt/local. This isn't necessarily the same as pkg-config search path and calling pkg-config foo --cflags without explicitly setting PKG_CONFIG_PATH might pick up the library from different directory from where Magickwand-Config was found. This might cause confusion when configure says "found in X" but cflags are actually picked up from different location. Makes sense? |
I just pushed some changes. Can you test the following on your machine:
Does that pick up the correct library names and paths? |
Pretty much.
Yep it does, though it gave an error on that exact spelling and asked for an absolute path, but:
worked just fine. cheers |
I guess the master is now in better shape regarding configuring. Closing this issue |
Yep good to close, though the setting should be mentioned in the install file, which doesn't seem to exist just yet. |
Hi,
I can see that you're in the middle of editing the config file 667183c so this might be slightly redundant, but it seems that in version 3.1.2 the config isn't generated correctly for 64bit centos.
Basically the wrong libs are being used, the 32bit version names of MagickWand-6.Q16 and MagickCore-6.Q16 are used instead of MagickWand and MagickCore.
The error seems to be triggered by the line
export PKG_CONFIG_PATH="$IMAGICK_MAGICK_PREFIX/lib/pkgconfig/"
With some debugging around that:
Outputs
libs before -lMagickWand -lMagickCore
libs after -lMagickWand-6.Q16 -lMagickCore-6.Q16
i.e. the export line is making imagemagick give the wrong data.
The text was updated successfully, but these errors were encountered: