php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56410 Compile failure
Submitted: 2005-06-05 12:40 UTC Modified: 2005-10-23 09:24 UTC
From: nohn@php.net Assigned:
Status: No Feedback Package: svn (PECL)
PHP Version: 5.0.3 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-06-05 12:40 UTC] nohn@php.net
Description:
------------
I've not done much with PECL so far, so don't blame me if it's my fault and not a bug in this package ;)

When trying to install svn, the compilation fails.

Subversion 1.1.4 is installed in /opt/subversion. PATH includes /opt/subversion/bin, ld.so.conf includes /opt/subversion/lib.

Reproduce code:
---------------
# /opt/php/bin/pecl install channel://pecl.php.net/svn-0.1


Expected result:
----------------
The code compiles.

Actual result:
--------------
downloading svn-0.1.tgz ...
Starting to download svn-0.1.tgz (14,801 bytes)
.....done: 14,801 bytes
6 source files, building
running: phpize
Configuring for:
PHP Api Version:         20031224
Zend Module Api No:      20041030
Zend Extension Api No:   220040412
building in /var/tmp/pear-build-root/svn-0.1
running: /tmp/tmppZ8DSk/svn-0.1/configure
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for PHP prefix... /opt/php
checking for PHP includes... -I/opt/php/include/php -I/opt/php/include/php/main -I/opt/php/include/php/TSRM -I/opt/php/include/php/Zend
checking for PHP extension directory... /opt/php/lib/php/extensions/no-debug-zts-20041030
checking for re2c... exit 0;
checking for mawk... mawk
checking for svn support... yes, shared
checking for svn-config... not found
configure: warning:
Did not find svn-config; please ensure that you have installed
the svn developer package or equivalent for you system.

checking for svn_client_create_context in -lsvn_client-1... no
/tmp/tmppZ8DSk/svn-0.1/configure: unset: `ac_cv_lib_svn_client-1_svn_client_create_context': not a valid identifier
configure: error: wrong svn lib version or lib not found
ERROR: `/tmp/tmppZ8DSk/svn-0.1/configure' failed


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-06 02:20 UTC] alan at akbkhome dot com
can you try out 
pecl download svn-beta
then replace the config.m4 with this file.
http://www.akbkhome.com/svn/pecl/svn/config.m4
run phpize;./configure;make clean;make install

make sure you have the development package / files installed for subversion.
 [2005-06-06 02:34 UTC] sebastian at nohn dot net
# /opt/php/bin/phpize
Configuring for:
PHP Api Version:         20031224
Zend Module Api No:      20041030
Zend Extension Api No:   220040412
# ./configure
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for PHP prefix... /opt/php
checking for PHP includes... -I/opt/php/include/php -I/opt/php/include/php/main -I/opt/php/include/php/TSRM -I/opt/php/include/php/Zend
checking for PHP extension directory... /opt/php/lib/php/extensions/no-debug-zts-20041030
checking for re2c... exit 0;
checking for mawk... mawk
checking for svn support... yes, shared
checking for svn includes...
checking for svn libraries...
checking for svn_client_create_context in -lsvn_client-1... no
./configure: unset: `ac_cv_lib_svn_client-1_svn_client_create_context': not a valid identifier
configure: error: wrong svn lib version or lib not found

# ls /opt/subversion/include/
apr-0  neon  subversion-1

(These subdirectory contain header files)

Is there any configure-option to subversion that I may have missed?
 [2005-06-06 02:46 UTC] alan at akbkhome dot com
try 
./configure --with-svn=/opt/subversion
 [2005-06-06 02:56 UTC] sebastian at nohn dot net
# ./configure --with-svn=/opt/subversion

[...]

checking for svn support... yes, shared
checking for svn includes...  -I/opt/subversion/include/subversion-1 -I/opt/subversion/include/apr-0
checking for svn libraries... -lsvn_client-1 -lapr-0
checking for svn_client_create_context in -lsvn_client-1... no
./configure: unset: `ac_cv_lib_svn_client-1_svn_client_create_context': not a valid identifier
configure: error: wrong svn lib version or lib not found
 [2005-06-06 03:11 UTC] alan at akbkhome dot com
does this show any output?
strings /opt/subversion/lib/libsvn_client-1.so | grep svn_client_create_context
 [2005-06-06 03:12 UTC] alan at akbkhome dot com
Does this file exist?
/opt/subversion/lib/libsvn_client-1.a
 [2005-06-06 03:14 UTC] sebastian at nohn dot net
It does:

# strings /opt/subversion/lib/libsvn_client-1.so | grep svn_client_create_context
svn_client_create_context
 [2005-06-06 03:14 UTC] sebastian at nohn dot net
# file /opt/subversion/lib/libsvn_client-1.a
/opt/subversion/lib/libsvn_client-1.a: current ar archive
 [2005-06-06 03:47 UTC] alan at akbkhome dot com
try this one.
http://www.akbkhome.com/svn/pecl/svn/config.m4

phpize;./configure=/opt/subversion
 [2005-06-06 03:54 UTC] sebastian at nohn dot net
Still the same error:

checking for svn includes... checking for svn_client_create_context in -lsvn_client-1... no
./configure: unset: `ac_cv_lib_svn_client-1_svn_client_create_context': not a valid identifier
configure: error: wrong svn lib version or lib not found

(Also when removing config.cache before)
 [2005-06-06 04:26 UTC] alan at akbkhome dot com
yet another go.. 
http://www.akbkhome.com/svn/pecl/svn/config.m4

This one should get you past the ./configure.. but may end up with problems at build time.
 [2005-06-06 07:11 UTC] sebastian at nohn dot net
OK. Configure runs, make fails as you said:

# make
/bin/sh /root/svn-0.1/libtool --mode=compile gcc -I/opt/subversion/include/subversion-1 -I/opt/subversion/include/apr-0 -I. -I/root/svn-0.1 -DPHP_ATOM_INC -I/root/svn-0.1/include -I/root/svn-0.1/main -I/root/svn-0.1 -I/opt/php/include/php -I/opt/php/include/php/main -I/opt/php/include/php/TSRM -I/opt/php/include/php/Zend -I/opt/subversion/include/subversion-1 -I/opt/subversion/include/apr-0  -DHAVE_CONFIG_H  -g -O2   -c /root/svn-0.1/svn.c -o svn.lo
gcc -I/opt/subversion/include/subversion-1 -I/opt/subversion/include/apr-0 -I. -I/root/svn-0.1 -DPHP_ATOM_INC -I/root/svn-0.1/include -I/root/svn-0.1/main -I/root/svn-0.1 -I/opt/php/include/php -I/opt/php/include/php/main -I/opt/php/include/php/TSRM -I/opt/php/include/php/Zend -I/opt/subversion/include/subversion-1 -I/opt/subversion/include/apr-0 -DHAVE_CONFIG_H -g -O2 -c /root/svn-0.1/svn.c  -fPIC -DPIC -o svn.lo
/root/svn-0.1/svn.c: In function `init_svn_client':
/root/svn-0.1/svn.c:247: parse error before `*'
/root/svn-0.1/svn.c:253: `providers' undeclared (first use in this function)
/root/svn-0.1/svn.c:253: (Each undeclared identifier is reported only once
/root/svn-0.1/svn.c:253: for each function it appears in.)
/root/svn-0.1/svn.c: In function `php_svn_log_message_receiver':
/root/svn-0.1/svn.c:686: parse error before `const'
make: *** [svn.lo] Error 1
 [2005-06-06 23:00 UTC] alan at akbkhome dot com
can you do 
gcc -v
and post the output.

Also can you send me a tarball of that directory in it's current state. (alan at akbkhome dot com)
 [2005-06-07 08:49 UTC] alan at akbkhome dot com
beginning to run out of ideas..

I'm guessing that it cant find the definition of apr_array_header_t.. 

do you have ..../include/apr-0 installed in any other place or is it old headers.. ?

if you have another location, you could try --with-svn-apr=/location/of/apr ...

I ran make on your tarball and it compiled perfectly here. (with gcc-3.3.6)
 [2005-06-07 09:56 UTC] sebastian at nohn dot net
No. Includes are in /opt/subversion/include/apr-0. Maybe it's my rather outdated gcc. I'll give it a try on another machine.
 [2005-10-23 09:24 UTC] mike@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC