Jump to content


P4PHP make error?

php make error compile build

  • Please log in to reply
4 replies to this topic

#1 RensterUK

RensterUK

    Member

  • Members
  • PipPip
  • 13 posts

Posted 21 February 2014 - 04:03 PM

Hi All,

Just starting to explore the world of P4PHP (Also may be looking at P4Ruby, but that's another matter!)... Anyway, I've downloaded P4PHP and P4API archives, and unzipped both. As per the RELNOTES.txt I ran phpize, then ./configure --with-perforce=<path to Perforce C++ API> then make....

phpize produced :

[shall@mars-stream14 p4php-2013.1.644389]$ phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20050922
Zend Extension Api No:   220051025
config.m4:163: warning: AC_CANONICAL_HOST invoked multiple times
config.m4:163: warning: AC_CANONICAL_HOST invoked multiple times

I'll not paste the configure output here - too much of it - but no errors!

However, when I then tried the make:


[shall@mars-stream14 p4php-2013.1.644389]$ make
/bin/sh /home/shall/p4php-2013.1.644389/libtool --mode=compile g++  -I. -I/home/shall/p4php-2013.1.644389 -DPHP_ATOM_INC -I/home/shall/p4php-2013.1.644389/include -I/home/shall/p4php-2013.1.644389/main -I/home/shall/p4php-2013.1.644389 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/home/shall/p4api-2013.3.784164/include/p4  -DHAVE_CONFIG_H     -c /home/shall/p4php-2013.1.644389/php_clientuser.cc -o php_clientuser.lo
g++ -I. -I/home/shall/p4php-2013.1.644389 -DPHP_ATOM_INC -I/home/shall/p4php-2013.1.644389/include -I/home/shall/p4php-2013.1.644389/main -I/home/shall/p4php-2013.1.644389 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/home/shall/p4api-2013.3.784164/include/p4 -DHAVE_CONFIG_H -c /home/shall/p4php-2013.1.644389/php_clientuser.cc  -fPIC -DPIC -o .libs/php_clientuser.o
/home/shall/p4php-2013.1.644389/php_clientuser.cc: In member function 'bool PHPClientUser::CallOutputMethod(const char*, zval*)':
/home/shall/p4php-2013.1.644389/php_clientuser.cc:159: error: invalid conversion from 'const char*' to 'char*'
make: *** [php_clientuser.lo] Error 1



Can anyone offer a reason as for the type conversion failure? After all, this is an "as supplied" source file in the PHP API?

Thanks

Steve

#2 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 21 February 2014 - 05:25 PM

Can you run 'php --version' for me? Also what OS are you on?

#3 RensterUK

RensterUK

    Member

  • Members
  • PipPip
  • 13 posts

Posted 24 February 2014 - 12:24 PM

Hope this helps - thanks :)

[shall@mars-stream14 html]$ cat /etc/redhat-release
yellow release 5.8.0 (Final)

[shall@mars-stream14 html]$ php --version
PHP 5.1.6 (cli) (built: Jun 27 2012 12:21:13)
Copyright © 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright © 1998-2006 Zend Technologies
[shall@mars-stream14 html]$

#4 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 24 February 2014 - 05:52 PM

That's the ticket; P4PHP requires PHP 5.4.

#5 RensterUK

RensterUK

    Member

  • Members
  • PipPip
  • 13 posts

Posted 25 February 2014 - 09:05 AM

Ahhh bingo bongo :)

Thanks Matt!





Also tagged with one or more of these keywords: php, make, error, compile, build

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users