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

Error load library #43

Open
UgoSansH opened this issue Dec 30, 2012 · 8 comments
Open

Error load library #43

UgoSansH opened this issue Dec 30, 2012 · 8 comments

Comments

@UgoSansH
Copy link

  • Ubuntu server 12.10
  • Php : 5.4.6

CLI, I get this error:

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

on apache2

Apache2, I added an ini file in / etc/php5/apache2/conf.d/git2.ini.
Apache2 chage what file (phpinfo ()), but the library is not loaded.

I can not understand why.

I followed this procedure:

git clone https://github.com/libgit2/php-git.git --recursive
cd libgit2
mkdir build && cd build
cmake ..
cmake -DBUILD_SHARED_LIBS=OFF -build .
make
cd ../../
phpize
./configure
make
make install
sudo make install

Php re

php --re git2

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/git2.so' - /usr/lib/php5/20100525/git2.so: undefined symbol: git_tree_create_fromindex in Unknown on line 0
Exception: Extension git2 does not exist

@gwijayas
Copy link

gwijayas commented Jan 3, 2013

maybe you can try again? A couple days ago I got the same error messages like you. Today I try again with php 5.3.20 and PHP 5.4.10, and load succesfully without that error message

@gwijayas
Copy link

gwijayas commented Jan 4, 2013

hmmm
I have 2 computer each with Ubuntu 12.10 and 5.4.6. On one computer, with php ubuntu stock. Another computer with php build and compiled by myself (5.4.10 and 5.3.20). Checking with php ubuntu stock, yes, I got the same error, while on another, successfully loaded...

@UgoSansH
Copy link
Author

UgoSansH commented Jan 4, 2013

I'm not used to compile from source, maybe I go the wrong way.

But I tried several times before posting this note.

You got the error with php 5.4?

Under what conditions you do not have an error?

@UgoSansH
Copy link
Author

UgoSansH commented Jan 4, 2013

Could you share your *.so ?

@gwijayas
Copy link

gwijayas commented Jan 5, 2013

I have tested with PHP 5.4.6, 5.4.7, 5.4.8, 5.4.9, and built module with it, no error

I have tried too, transfer my so to 'ubuntu stock one', got this error message (module built with 5.4.6, compiled myself):

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

@UgoSansH
Copy link
Author

UgoSansH commented Jan 5, 2013

What I do not understand is that you get a compile and use.

I should not compile correctly, or make improper handling

@gwijayas
Copy link

gwijayas commented Jan 5, 2013

I got git2.so compiled and used because compiled it against PHP from php.net, not against ubuntu's one, eventhough I use Ubuntu OS 12.10. On PHP packages from ubuntu, there are about 60 patches, but I don't know much about C so I don't know which patch make git2 failed loaded on PHP packages.

@UgoSansH
Copy link
Author

UgoSansH commented Jan 5, 2013

I understand. I'll try to compile php myself.
I had already done that once or twice I should succeed.

This is a dev server, so I can afford;)

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

2 participants