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-GIT does not compile #46

Closed
brianlayman opened this issue Mar 1, 2013 · 6 comments
Closed

PHP-GIT does not compile #46

brianlayman opened this issue Mar 1, 2013 · 6 comments

Comments

@brianlayman
Copy link

I've spent several hours trying to get some version of this to compile. I've even tried older version of the repo, and only hit other walls. If anyone can get this to compile I would be extremely appreciative of the instruction set - even if it involves source changes.

So here is the repo README.md instructions:

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
 # add `extension=git2.so` to your php.ini

Line 2 bombs, so I assume it should be
cd php-git/libgit2

That works fine till you get down to the make command which bombs out with syntax error:

Linking C static library libgit2.a
[ 25%] Built target git2
[ 26%] Generating ../tests-clar/clar_main.c, ../tests-clar/clar.h
  File "clar", line 65
    self.clar_path = os.path.abspath(clar_path) if clar_path else None
                                                 ^
SyntaxError: invalid syntax
make[2]: *** [../tests-clar/clar_main.c] Error 1
make[1]: *** [CMakeFiles/libgit2_clar.dir/all] Error 2
make: *** [all] Error 2

If I try other revisions I get different errors, but I don't want to cloud the issue.

As with anything, this issue is somewhat urgent. Any help would certainly be appreciated!

@chobie
Copy link
Member

chobie commented Mar 6, 2013

@brianlayman sorry to late response. can you tell me your environment? i could compile it with my machine.
clar test framework requires python as i known.

$ python --version
Python 2.7.3

$ uname -a
Linux devbox 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:42:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc-4.6.real
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 

@brianlayman
Copy link
Author

@chobie Thanks for your reply. This server has Python 2.4.3 - though I can dual install 2.7.3 if needed.
I wonder if that's it. Though would that cause a syntax error to be spit out of make?

uname -a

Linux hosting.example.com 2.6.32-042stab075.2 #1 SMP Tue Mar 5 15:21:53 MSK 2013 i686 i686 i386 GNU/Linux

gcc -v

Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)

@onlinecco
Copy link

having the same issue. Python is the newest version.

Upgrading gcc 4.1.2 to 4.4.7...still doesn't work

@chobie
Copy link
Member

chobie commented Dec 24, 2013

Python is the newest version.

what is your python version? at least clar requires 2.5 above.

@chobie chobie closed this as completed Dec 24, 2013
@onlinecco
Copy link

like i said my python's version is 2.7

@chobie
Copy link
Member

chobie commented Dec 28, 2013

@onlinecco could you report specifically?
python also has 3.x version. so I can't figured out which version have you used.

It seems different problem at this time because you have used python 2.7.
for now, can you copy & paste your build error here?

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

3 participants