# Problem with installing net/php5-xmlrpc port



## allan_sundry (May 14, 2014)

Hi

I have a problem with installing the net/php5-xmlrpc port:

```
....
 cc -I/var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/libxmlrpc -DVERSION=0.50 -I. -I/var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc -DPHP_ATOM_INC -I/var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/include -I/var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/main -I/var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/libxml2 -DHAVE_CONFIG_H -O2 -pipe -fno-strict-aliasing -c /var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/libxmlrpc/system_methods.c  -fPIC -DPIC -o libxmlrpc/.libs/system_methods.o
/var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/libxmlrpc/encodings.c:51:19: error: iconv.h: No such file or directory
/var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/libxmlrpc/encodings.c: In function 'convert':
/var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/libxmlrpc/encodings.c:67: error: 'iconv_t' undeclared (first use in this function)
/var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/libxmlrpc/encodings.c:67: error: (Each undeclared identifier is reported only once
/var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/libxmlrpc/encodings.c:67: error: for each function it appears in.)
/var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/libxmlrpc/encodings.c:67: error: expected ';' before 'ic'
/var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/libxmlrpc/encodings.c:73: error: 'ic' undeclared (first use in this function)
*** [libxmlrpc/encodings.lo] Error code 1
In file included from /usr/local/include/php/Zend/zend_compile.h:690,
                 from /usr/local/include/php/Zend/zend_modules.h:26,
                 from /usr/local/include/php/Zend/zend_API.h:26,
                 from /usr/local/include/php/main/php.h:38,
                 from /var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/xmlrpc-epi-php.c:68:
/usr/local/include/php/Zend/zend_vm_opcodes.h:168:7: warning: no newline at end of file
In file included from /usr/local/include/php/Zend/zend_compile.h:690,
                 from /usr/local/include/php/Zend/zend_modules.h:26,
                 from /usr/local/include/php/Zend/zend_API.h:26,
                 from /usr/local/include/php/main/php.h:38,
                 from /var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/libxmlrpc/xml_to_xmlrpc.c:36:
/usr/local/include/php/Zend/zend_vm_opcodes.h:168:7: warning: no newline at end of file
1 error
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** [do-build] Error code 1

Stop in /basejail/usr/ports/net/php5-xmlrpc.
```

A complete PHP reinstall did not help. I'm building a port net/php5-xmlrpc in an ezjail jail.

Information about the system:

```
# uname -a
FreeBSD mx.domain.net 9.2-RELEASE-p5 FreeBSD 9.2-RELEASE-p5 #0 r265136: Wed Apr 30 15:25:13 EEST 2014     root@domain.net:/usr/obj/nanobsd.full/usr/src/sys/MY_KERNEL  amd64

# cat /etc/make.conf
WRKDIRPREFIX=           /var/ports
DISTDIR=                /var/ports/distfiles
PACKAGES=               /var/ports/packages
INDEXDIR=               /var/ports

# PKGNG
WITH_PKGNG=yes
```

Help solve the problem.


----------



## Anonymous (May 15, 2014)

_I'm getting the s_ame error when I try it with clang33 or clang34. But I am able to compile it with gcc48.


----------



## SirDice (May 15, 2014)

This seems to be the culprit:

```
/var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/libxmlrpc/encodings.c:51:19: error: iconv.h: No such file or directory
```
I don't think it has anything to do with the compiler. Is converters/libiconv installed?


----------



## allan_sundry (May 15, 2014)

talsamon said:
			
		

> _I'm getting the s_ame error when I try it with clang33 or clang34. But I am able to compile it with gcc48.



I used the default system compiler FreeBSD 9.2.



			
				SirDice said:
			
		

> This seems to be the culprit:
> 
> ```
> /var/ports/basejail/usr/ports/net/php5-xmlrpc/work/php-5.4.28/ext/xmlrpc/libxmlrpc/encodings.c:51:19: error: iconv.h: No such file or directory
> ...



Port converters/libiconv installed in the system


```
# pkg info | grep libiconv
libiconv-1.14_3                Character set conversion library
```


----------



## Anonymous (May 15, 2014)

I deleted the port and make a `portsnap`. After this it compiles normal.
There is a new file in the port 15 Mai 10:08 patch-config.m4


----------



## allan_sundry (May 15, 2014)

talsamon said:
			
		

> I deleted the port and make a `portsnap`. After this it compiles normal.
> There ist a new file in the port 15 Mai 10:08 patch-config.m4




```
# pkg version -v | grep -v =
php5-xmlrpc-5.4.27                 <   needs updating (port has 5.4.28)
# portsnap fetch update
Looking up portsnap.FreeBSD.org mirrors... 7 mirrors found.
Fetching snapshot tag from ec2-eu-west-1.portsnap.freebsd.org... done.
Fetching snapshot metadata... done.
Updating from Thu May 15 09:37:40 EEST 2014 to Thu May 15 13:59:46 EEST 2014.
Fetching 4 metadata patches... done.
Applying metadata patches... done.
Fetching 0 metadata files... done.
Fetching 14 patches.....10.. done.
Applying patches... done.
Fetching 0 new ports or files... done.
Removing old files and directories... done.
Extracting new files:
/usr/ports/devel/flatzebra/
/usr/ports/dns/unbound/
/usr/ports/lang/php5/
/usr/ports/lang/php55/
/usr/ports/multimedia/handbrake/
/usr/ports/multimedia/libdvdcss/
/usr/ports/multimedia/libdvdread/
/usr/ports/multimedia/libxine/
/usr/ports/multimedia/xine/
/usr/ports/net/php5-xmlrpc/
/usr/ports/net/php55-xmlrpc/
/usr/ports/security/libp11/
/usr/ports/sysutils/dvdvideo/
/usr/ports/sysutils/qjail/
Building new INDEX files... done.

...
Build complete.
Don't forget to run 'make test'.
===>  Staging for php5-xmlrpc-5.4.28
===>   php5-xmlrpc-5.4.28 depends on file: /usr/local/include/php/main/php.h - found
===>   php5-xmlrpc-5.4.28 depends on file: /usr/local/lib/php/20100525/xml.so - found
===>   Generating temporary packing list
====> Compressing man pages (compress-man)
--->  Backing up the old version
--->  Uninstalling the old version
[Reading data from pkg(8) ... - 179 packages found - done]
--->  Deinstalling 'php5-xmlrpc-5.4.27'
pkg: You are trying to delete package(s) which has dependencies that are still required:
net/php5-xmlrpc: mail/postfixadmin
... delete these packages anyway in forced mode
Deinstallation has been requested for the following 1 packages:

	php5-xmlrpc-5.4.27

The deinstallation will free 165 kB
[1/1] Deleting php5-xmlrpc-5.4.27...
php5-xmlrpc-5.4.27 is required by: postfixadmin-2.3.6, deleting anyway
 done
[Reading data from pkg(8) ... - 178 packages found - done]
--->  Installing the new version via the port
===>  Installing for php5-xmlrpc-5.4.28
===>   php5-xmlrpc-5.4.28 depends on file: /usr/local/include/php/main/php.h - found
===>   php5-xmlrpc-5.4.28 depends on file: /usr/local/lib/php/20100525/xml.so - found
===>   php5-xmlrpc-5.4.28 depends on shared library: libiconv.so.3 - found
===>   php5-xmlrpc-5.4.28 depends on shared library: libxml2.so - found
===>   Registering installation for php5-xmlrpc-5.4.28
Installing php5-xmlrpc-5.4.28... done
===>  Cleaning for php5-xmlrpc-5.4.28
--->  Cleaning out obsolete shared libraries
```

Today the port fixed - everything was installed without problems.


----------

