Problem with compile at ubuntu
I try compile extension but have this error and i don't know how fix it.
Thx for help
→ make /bin/bash /home/prskavecl/Sites/php-git/src/libtool --mode=compile cc -I. -I/home/prskavecl/Sites/php-git/src -DPHP_ATOM_INC -I/home/prskavecl/Sites/php-git/src/include -I/home/prskavecl/Sites/php-git/src/main -I/home/prskavecl/Sites/php-git/src -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/prskavecl/Sites/php-git/src/php_git.c -o php_git.lo libtool: compile: cc -I. -I/home/prskavecl/Sites/php-git/src -DPHP_ATOM_INC -I/home/prskavecl/Sites/php-git/src/include -I/home/prskavecl/Sites/php-git/src/main -I/home/prskavecl/Sites/php-git/src -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/prskavecl/Sites/php-git/src/php_git.c -fPIC -DPIC -o .libs/php_git.o In file included from /home/prskavecl/Sites/php-git/src/php_git.c:25: /home/prskavecl/Sites/php-git/src/php_git.h:123: error: expected specifier-qualifier-list before ‘git_rawobj’ make: *** [php_git.lo] Error 1
Hi abtris,
sorry, i forgot implment thread safe support. i'll try to setup environment and check that on this weekend.
Would you wait until the update?
Cheers, Shuhei
Not problem, thx for reply
I've just fixed this probrem.could you try to compile php-git with v0.2.1? https://github.com/libgit2/php-git/tree/v0.2.1
i update from git and make:
/bin/bash /home/prskavecl/Sites/php-git/src/libtool --mode=compile cc -I. -I/home/prskavecl/Sites/php-git/src -DPHP_ATOM_INC -I/home/prskavecl/Sites/php-git/src/include -I/home/prskavecl/Sites/php-git/src/main -I/home/prskavecl/Sites/php-git/src -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/prskavecl/Sites/php-git/src/php_git.c -o php_git.lo libtool: compile: cc -I. -I/home/prskavecl/Sites/php-git/src -DPHP_ATOM_INC -I/home/prskavecl/Sites/php-git/src/include -I/home/prskavecl/Sites/php-git/src/main -I/home/prskavecl/Sites/php-git/src -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/prskavecl/Sites/php-git/src/php_git.c -fPIC -DPIC -o .libs/php_git.o In file included from /home/prskavecl/Sites/php-git/src/php_git.c:25: /home/prskavecl/Sites/php-git/src/php_git.h:123: error: expected specifier-qualifier-list before ‘git_rawobj’ make: *** [php_git.lo] Error 1
oh, i see. did you use libgit2 development branch? libgit2 development branch has many API changes. so php-git requires libgit2 v0.10.0
https://github.com/libgit2/libgit2/tree/v0.10.0
try to following install process
git clone https://github.com/libgit2/libgit2.git libgit2
cd libgit2
git checkout v0.10.0
./waf configure && ./waf build-shared
sudo ./waf install-shared
cd ..
git clone https://github.com/libgit2/php-git.git php-git
cd php-git
git checkout v0.2.1
cd src
phpize
./configure && make
sudo make install
ubuntu 10.04 2.6.32-33-server
Im trying to compile php-git by following instruction above, but no avail.
git clone https://github.com/libgit2/libgit2.git cd libgit2 git checkout v0.10.0 ./waf configure && ./waf build-shared && ./waf install-shared
git clone https://github.com/libgit2/php-git.git cd php-git/src phpize ./configure make /root/git/php-git/src/commit.c: In function ‘zim_git_commit_getTree’: /root/git/php-git/src/commit.c:305: warning: passing argument 1 of ‘git_commit_tree’ from incompatible pointer type /usr/local/include/git2/commit.h:129: note: expected ‘struct git_tree *’ but argument is of type ‘struct git_commit *’ /root/git/php-git/src/commit.c:305: error: too few arguments to function ‘git_commit_tree’ /root/git/php-git/src/commit.c: In function ‘zim_git_commit_getParent’: /root/git/php-git/src/commit.c:365: warning: passing argument 1 of ‘git_commit_parent’ from incompatible pointer type /usr/local/include/git2/commit.h:147: note: expected ‘struct git_commit *’ but argument is of type ‘struct git_commit ’ /root/git/php-git/src/commit.c:365: warning: passing argument 2 of ‘git_commit_parent’ makes pointer from integer without a cast /usr/local/include/git2/commit.h:147: note: expected ‘struct git_commit *’ but argument is of type ‘int’ /root/git/php-git/src/commit.c:365: error: too few arguments to function ‘git_commit_parent’ make: ** [commit.lo] Error 1
Once I try v0.2.1 branch, I get erred as branch info is not in packed-refs file:
cd php-git git checkout v0.2.1 error: pathspec 'v0.2.1' did not match any file(s) known to git.
Also Im interested if php-git module will be able to clone and pull via smart http with authentication. Cheers
Sorry guys nevermind, I compiled module and seems like successfully loaded.
@evilpingus thank you reporting. i'll re-check this issue when i have a chance. i really want to wrap network feature asap but i have to prepare our marriage. i'll try to make some coding time if i get a chance. please wait
I got the same problem and need some help...my friend.
@yijia2413 have you checked latest branch? (https://github.com/libgit2/php-git/tree/functions)