Skip to content
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

PHP Startup: Unable to load dynamic library ! #20

Closed
aymanrb opened this issue Jan 11, 2016 · 15 comments
Closed

PHP Startup: Unable to load dynamic library ! #20

aymanrb opened this issue Jan 11, 2016 · 15 comments

Comments

@aymanrb
Copy link

aymanrb commented Jan 11, 2016

Whenever I try to restart apache now I get the following error:

  PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/facedetect.so' - /usr/lib/php5/20131226/facedetect.so: undefined symbol: cvLoadImage in Unknown on line 0

  PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/facedetect.so' - /usr/lib/php5/20131226/facedetect.so: undefined symbol: cvLoadImage in Unknown on line 0

  AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2e configured -- resuming normal operations

An ofcourse it won't work since it wasn't loaded !! Any clue what went wrong ?

PHP Version 5.6.17
OpenCV Verison 3.1.0

@jammon88
Copy link

I've the same issue!

PHP Version PHP 5.6.19-1
OpenCV Version 3.1.0

@sergiomb2
Copy link

+1
facedetect.so: undefined symbol: cvLoadImage, OpenCV Version 3.1.0

@sergiomb2
Copy link

sergiomb2 commented May 10, 2016

I found the fix ,
https://pkgs.fedoraproject.org/cgit/rpms/opencv.git/commit/?id=8332955846ff0d567d346b23248561b37eb855f2

we can't compile opencv with -Wl,--as-needed , because seems that clean cvLoadImage symbol ...

Update this is not the correct fix

@infusion
Copy link
Owner

Could you please send a PR when it's working for you? I don't have time atm to work on it :/

@sergiomb2
Copy link

The fix is in build of opencv unfortunately ...

@slothentic
Copy link

Same issue - Installed on Ubuntu 16 latest OpenCV and Facedetected install from source.

@remicollet
Copy link
Contributor

Shoudl be fixed by pr #26

@velpaxl
Copy link

velpaxl commented May 31, 2017

Same issue with PHP7.1 & opencv-3.1.0
Is there a workaround?

@sergiomb2
Copy link

yes
https://src.fedoraproject.org/cgit/rpms/php-facedetect.git/tree/php-facedetect-pkgconfig.patch

@velpaxl
Copy link

velpaxl commented Jun 1, 2017

Thanks @sergiomb2

@Meloman-zz
Copy link

Meloman-zz commented Jul 25, 2017

Hi,

I have the same issue at service apache2 restart.
I'm on PHP7.0 / Ubuntu 16.4 LTS / OpenCV 3.2

pkg-config --cflags --libs opencv :
-I/usr/local/include/opencv
-I/usr/local/include
-L/usr/local/lib
-lopencv_dnn
-lopencv_ml
-lopencv_objdetect
-lopencv_shape
-lopencv_stitching
-lopencv_superres
-lopencv_videostab
-lopencv_calib3d
-lopencv_features2d
-lopencv_highgui
-lopencv_videoio
-lopencv_imgcodecs
-lopencv_video
-lopencv_photo
-lopencv_imgproc
-lopencv_flann
-lopencv_core

I tried to compile the infusion and sathieu fork. but no success.

How to patch ?

Thanks

@sergiomb2
Copy link

sergiomb2 commented Jul 30, 2017

@Meloman-zz , after all we don't need patch opencv , we need patch php-facedetect-pkgconfig

https://src.fedoraproject.org/cgit/rpms/php-facedetect.git/tree/php-facedetect-pkgconfig.patch

@sergiomb2
Copy link

sergiomb2 commented Jul 30, 2017

#23 if the problem is in stop

@sergiomb2
Copy link

@Meloman-zz "retrieve opencv build options from pkg_config #26" was merged .

@infusion
Copy link
Owner

infusion commented Mar 6, 2018

Could you guys please test the current master branch? I rewrote the code almost completely for PHP7 and to come by the old OpenCV C-interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants