php-zbarcode icon indicating copy to clipboard operation
php-zbarcode copied to clipboard

Installation problem

Open sabdsouza opened this issue 12 years ago • 26 comments

Hello,

I am getting the following error while running ./configure

checking for zbar.h header... configure: error: Cannot locate zbar.h header. Please check your libzbar installation

Can you please let me know what I need to do.

Regards,

sabdsouza avatar Mar 06 '13 10:03 sabdsouza

Have you installed libzbar?

mkoppanen avatar Mar 07 '13 09:03 mkoppanen

Sorry, I was able to install this, however images are not showing, seems like imagick issue as imagick.so is not loading

sabdsouza avatar Mar 07 '13 11:03 sabdsouza

I am getting

No package 'MagickWand' found Package MagickWand was not found in the pkg-config search path. Perhaps you should add the directory containing `MagickWand.pc' to the PKG_CONFIG_PATH environment variable No package 'MagickWand' found checking for MagickExportImagePixels in -lMagickWand... no configure: error: not found

sabdsouza avatar Mar 07 '13 11:03 sabdsouza

after running export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"

checking for zbar_image_scanner_create in -lzbar... yes checking for zbar_symbol_get_quality in -lzbar... yes checking ImageMagick MagickWand API configuration program... found in /usr/local/bin/MagickWand-config checking for MagickExportImagePixels in -lMagickWand... no configure: error: not found

sabdsouza avatar Mar 07 '13 11:03 sabdsouza

Same here, on a Mac:

checking for zbar_symbol_get_quality in -lzbar... yes checking ImageMagick MagickWand API configuration program... found in /usr/local/bin/MagickWand-config checking for MagickExportImagePixels in -lMagickWand... no configure: error: not found

ruudk avatar Apr 22 '13 16:04 ruudk

@mkoppanen Any clue?

ruudk avatar Apr 23 '13 07:04 ruudk

Which version of ImageMagick? I'll check later today with that version

mkoppanen avatar Apr 23 '13 07:04 mkoppanen

brew info imagemagick imagemagick: stable 6.8.0-10 (bottled), HEAD http://www.imagemagick.org Depends on: libtool, pkg-config, jpeg, libpng, freetype, fontconfig, libtiff, little-cms, jasper, libwmf, librsvg, liblqr, openexr, ghostscript /usr/local/Cellar/imagemagick/6.8.0-10 (1401 files, 44M) * https://github.com/mxcl/homebrew/commits/master/Library/Formula/imagemagick.rb

brew info zbar zbar: stable 0.10 http://zbar.sourceforge.net Depends on: pkg-config, jpeg, imagemagick, ufraw /usr/local/Cellar/zbar/0.10 (29 files, 664K) * https://github.com/mxcl/homebrew/commits/master/Library/Formula/zbar.rb

Mac OS Mountain Lion, PHP 5.4.11,

Thanks in advance!

ruudk avatar Apr 23 '13 07:04 ruudk

Can you test the latest?

mkoppanen avatar Apr 23 '13 13:04 mkoppanen

Now I get this:

checking ImageMagick MagickWand API configuration program... found in /usr/local/bin/MagickWand-config checking for MagickExportImagePixels... yes checking php_imagick_shared.h header file... configure: error: not found. Run with --disable-zbarcode-imagick to disable this feature

When running it with --disable-zbarcode-imagick it does work. Thanks.

ruudk avatar Apr 23 '13 13:04 ruudk

Cool.

mkoppanen avatar Apr 23 '13 13:04 mkoppanen

Now when running make test I get this:

make test
/bin/sh /www/test/php-zbarcode/libtool --mode=compile cc  -I. -I/www/test/php-zbarcode -DPHP_ATOM_INC -I/www/test/php-zbarcode/include -I/www/test/php-zbarcode/main -I/www/test/php-zbarcode -I/usr/local/Cellar/php54/5.4.11/include/php -I/usr/local/Cellar/php54/5.4.11/include/php/main -I/usr/local/Cellar/php54/5.4.11/include/php/TSRM -I/usr/local/Cellar/php54/5.4.11/include/php/Zend -I/usr/local/Cellar/php54/5.4.11/include/php/ext -I/usr/local/Cellar/php54/5.4.11/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /www/test/php-zbarcode/zbarcode.c -o zbarcode.lo 
mkdir .libs
 cc -I. -I/www/test/php-zbarcode -DPHP_ATOM_INC -I/www/test/php-zbarcode/include -I/www/test/php-zbarcode/main -I/www/test/php-zbarcode -I/usr/local/Cellar/php54/5.4.11/include/php -I/usr/local/Cellar/php54/5.4.11/include/php/main -I/usr/local/Cellar/php54/5.4.11/include/php/TSRM -I/usr/local/Cellar/php54/5.4.11/include/php/Zend -I/usr/local/Cellar/php54/5.4.11/include/php/ext -I/usr/local/Cellar/php54/5.4.11/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /www/test/php-zbarcode/zbarcode.c  -fno-common -DPIC -o .libs/zbarcode.o
In file included from /www/test/php-zbarcode/zbarcode.c:19:
./php_zbarcode.h:35:12: fatal error: 'wand/MagickWand.h' file not found
#  include <wand/MagickWand.h>
           ^
1 error generated.
make: *** [zbarcode.lo] Error 1

ruudk avatar Apr 23 '13 13:04 ruudk

Can you retry?

mkoppanen avatar Apr 23 '13 13:04 mkoppanen

make test

Build complete.
Don't forget to run 'make test'.

dyld: lazy symbol binding failed: Symbol not found: _MagickWandGenesis
  Referenced from: /www/test/php-zbarcode/modules/zbarcode.so
  Expected in: flat namespace

dyld: Symbol not found: _MagickWandGenesis
  Referenced from: /www/test/php-zbarcode/modules/zbarcode.so
  Expected in: flat namespace

dyld: lazy symbol binding failed: Symbol not found: _MagickWandGenesis
  Referenced from: /www/test/php-zbarcode/modules/zbarcode.so
  Expected in: flat namespace

dyld: Symbol not found: _MagickWandGenesis
  Referenced from: /www/test/php-zbarcode/modules/zbarcode.so
  Expected in: flat namespace


=====================================================================
PHP         : /usr/local/Cellar/php54/5.4.11/bin/php  
CWD         : /Volumes/www/test/php-zbarcode
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
TIME START 2013-04-23 15:21:14
=====================================================================
FAIL Test construction [tests/001-construct.phpt] 
FAIL Test reading image and scanning barcode [tests/002-read-barcode.phpt] 
FAIL Test setting config [tests/003-setconfig.phpt] 
FAIL Test multipage reading and single page reading [tests/004-paged-reading.phpt] 
FAIL Test count [tests/005-count.phpt] 
FAIL Check whether imagick integration works [tests/006-imagick.phpt] 
FAIL Test GD support [tests/007-test-gd.phpt] 
=====================================================================
TIME END 2013-04-23 15:21:23

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :    1
---------------------------------------------------------------------

Number of tests :    7                 7
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    7 (100.0%) (100.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :    0 (  0.0%) (  0.0%)
---------------------------------------------------------------------
Time taken      :    9 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Test construction [tests/001-construct.phpt]
Test reading image and scanning barcode [tests/002-read-barcode.phpt]
Test setting config [tests/003-setconfig.phpt]
Test multipage reading and single page reading [tests/004-paged-reading.phpt]
Test count [tests/005-count.phpt]
Check whether imagick integration works [tests/006-imagick.phpt]
Test GD support [tests/007-test-gd.phpt]
=====================================================================

You may have found a problem in PHP.

ruudk avatar Apr 23 '13 13:04 ruudk

32bit / 64bit mismatch?

mkoppanen avatar Apr 23 '13 14:04 mkoppanen

I have a Intel Core 2 Duo 64-bits processor.

ruudk avatar Apr 23 '13 15:04 ruudk

i meant either php, php-zbarcode and imagemagick. all 32bit or 64bit?

mkoppanen avatar Apr 23 '13 15:04 mkoppanen

PHP is 64-bit. I installed imagemagick using homebrew (with no special args) so I guess it is? How can I check if php-zbarcode is 64?

ruudk avatar Apr 23 '13 15:04 ruudk

Accidentally removed some lines, should work now.

mkoppanen avatar Apr 23 '13 15:04 mkoppanen

Still no luck :(

I ran git pull, phpize, ./configure --with-php-config=/usr/local/Cellar/php54/5.4.11/bin/php-config --disable-zbarcode-imagick and then make test

/bin/sh /www/test/php-zbarcode/libtool --mode=install cp ./zbarcode.la /www/test/php-zbarcode/modules
cp ./.libs/zbarcode.so /www/test/php-zbarcode/modules/zbarcode.so
cp ./.libs/zbarcode.lai /www/test/php-zbarcode/modules/zbarcode.la
----------------------------------------------------------------------
Libraries have been installed in:
   /www/test/php-zbarcode/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

dyld: lazy symbol binding failed: Symbol not found: _MagickWandGenesis
  Referenced from: /www/test/php-zbarcode/modules/zbarcode.so
  Expected in: flat namespace

dyld: Symbol not found: _MagickWandGenesis
  Referenced from: /www/test/php-zbarcode/modules/zbarcode.so
  Expected in: flat namespace

dyld: lazy symbol binding failed: Symbol not found: _MagickWandGenesis
  Referenced from: /www/test/php-zbarcode/modules/zbarcode.so
  Expected in: flat namespace

dyld: Symbol not found: _MagickWandGenesis
  Referenced from: /www/test/php-zbarcode/modules/zbarcode.so
  Expected in: flat namespace


=====================================================================
PHP         : /usr/local/Cellar/php54/5.4.11/bin/php  
CWD         : /Volumes/www/test/php-zbarcode
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
TIME START 2013-04-23 17:58:05
=====================================================================
FAIL Test construction [tests/001-construct.phpt] 
FAIL Test reading image and scanning barcode [tests/002-read-barcode.phpt] 
FAIL Test setting config [tests/003-setconfig.phpt] 
FAIL Test multipage reading and single page reading [tests/004-paged-reading.phpt] 
FAIL Test count [tests/005-count.phpt] 
FAIL Check whether imagick integration works [tests/006-imagick.phpt] 
FAIL Test GD support [tests/007-test-gd.phpt] 
=====================================================================
TIME END 2013-04-23 17:58:14

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :    1
---------------------------------------------------------------------

Number of tests :    7                 7
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    7 (100.0%) (100.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :    0 (  0.0%) (  0.0%)
---------------------------------------------------------------------
Time taken      :    9 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Test construction [tests/001-construct.phpt]
Test reading image and scanning barcode [tests/002-read-barcode.phpt]
Test setting config [tests/003-setconfig.phpt]
Test multipage reading and single page reading [tests/004-paged-reading.phpt]
Test count [tests/005-count.phpt]
Check whether imagick integration works [tests/006-imagick.phpt]
Test GD support [tests/007-test-gd.phpt]
=====================================================================

You may have found a problem in PHP.
This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it.  You can then email it to [email protected] later.
Do you want to send this report now? [Yns]: 

ruudk avatar Apr 23 '13 15:04 ruudk

Retried it and got it working now :)

I got 1 failing test tho, but installed it anyway.

PASS Test construction [tests/001-construct.phpt] 
PASS Test reading image and scanning barcode [tests/002-read-barcode.phpt] 
PASS Test setting config [tests/003-setconfig.phpt] 
PASS Test multipage reading and single page reading [tests/004-paged-reading.phpt] 
PASS Test count [tests/005-count.phpt] 
SKIP Check whether imagick integration works [tests/006-imagick.phpt] reason: Imagick extension is not loaded
FAIL Test GD support [tests/007-test-gd.phpt] 

ruudk avatar May 16 '13 20:05 ruudk

Can you check tests/007-test-gd.diff and output?

mkoppanen avatar May 17 '13 06:05 mkoppanen

I am running OSX 10.8+ 64-bit with PHP 5.4.20 and imagick 3.2.1 (stable). I installed imagemagick using brew. I am using Cellar/imagemagick/6.8.7-0/include/ImageMagick-6

I successfully configured, made, installed. However, when I run make test no tests are run. I moved the imagick.so to XAMPP/lib/php/extensions/no-debug-non-zts-20100525 folder and try to execute simple image manipulation code and it complains "Class 'Imagick' not found" I installed ghostscript and a few other optional packages hoping I was missing something.

I ran a few examples and it appears that it works using php5 (5.4.20). XAMP uses php 5.4.7. Could the different versions be the issue. In any case, at least the "make test" command should work with php 5.4.20.

Initially I had the following errors, until I installed zbar.

yld: lazy symbol binding failed: Symbol not found: _MagickWandGenesis Referenced from: /www/test/php-zbarcode/modules/zbarcode.so Expected in: flat namespace

dyld: Symbol not found: _MagickWandGenesis Referenced from: /www/test/php-zbarcode/modules/zbarcode.so Expected in: flat namespace

dyld: lazy symbol binding failed: Symbol not found: _MagickWandGenesis Referenced from: /www/test/php-zbarcode/modules/zbarcode.so Expected in: flat namespace

dyld: Symbol not found: _MagickWandGenesis Referenced from: /www/test/php-zbarcode/modules/zbarcode.so Expected in: flat namespace

But these errors went away after installing zbar.

Any thoughts on what else I should look at? I have tried so many different things and got ot to a point where I at least have everything compiling and installing.

I'd appreciate any suggestions or ideas! Thanks!

atul-tewari avatar Oct 20 '13 08:10 atul-tewari

@atul-tewari, what is the actual issue you are facing now?

mkoppanen avatar Oct 20 '13 11:10 mkoppanen

Mikko Koppanen,Thanks for responding.  Imagick Class was not loading from within XAMPP.  I discovered this about an our ago.  As it turns out, within XAMPP, I have to disable exporting DYLD_LIBRARY_PATH.  It all worked fine after that.  I really appreciate your response.Regards,Atul

-------- Original Message -------- Subject: Re: [php-zbarcode] Installation problem (#4) From: Mikko Koppanen [email protected] Date: Sun, October 20, 2013 6:05 am To: mkoppanen/php-zbarcode [email protected] Cc: atul-tewari [email protected]@atul-tewari, what is the actual issue you are facing now? —Reply to this email directly or view it on GitHub.

atul-tewari avatar Oct 20 '13 17:10 atul-tewari

支持>php7吗???

ChouCat avatar Nov 06 '18 16:11 ChouCat