Solved [Solved] Building php55-iconv on FreeBSD 10

CAVEAT! While FreeBSD 10 is not yet released, its release is (likely) imminent so please no "questions regarding unsupported versions" comments.

While upgrading to FreeBSD 10 (which has "builtin" iconv.h) the recommended upgrade path is to rebuild your ports (as usual). While building php55-iconv I get:

Code:
/usr/obj/ports/usr/ports/converters/php55-iconv/work/php-5.5.7/ext/iconv/iconv.c:252:9: error: use of undeclared identifier '_libiconv_version'
                    ((_libiconv_version >> 8) & 0x0f), (_libiconv_version & 0x0f));
^
What is the best way to solve this? Installing converters/libiconv, of course, gives:
Code:
        converters/libiconv should not be used with iconv from base.  Please fix the port which tries to use it

Pointers appreciated about the way to solve this. I'd rather spend my time fixing up patches that can be upstreamed than a local hack
 
Re: Building php55-iconv on FreeBSD 10

Can you check if you still have any iconv port related files under /usr/local/include and /usr/local/lib. Those should be cleaned up before trying to compile anything that uses the base system iconv.
 
Re: Building php55-iconv on FreeBSD 10

There is nothing that is obvious at least:

Code:
root@limbo ~ : ls /usr/local/lib | grep iconv    
root@limbo ~ : ls /usr/local/include | grep iconv
root@limbo ~ :

I followed the ports/UPDATING instructions related to iconv in base for FBSD FreeBSD 10 before all this.
 
Re: Building php55-iconv on FreeBSD 10

The port does build for me under ports-mgmt/poudriere-devel that does the build in a completely clean environment so there must be some leftovers from the iconv port in your system that the build is picking up. Have you recompiled the PHP port and all its add-on modules?
 
Re: Building php55-iconv on FreeBSD 10

Yes, php55 and the enabled extensions were all rebuilt as part of the update/upgrade process to v10.

Code:
clang -I/usr/include -I. -I/usr/obj/ports/usr/ports/converters/php55-iconv/work/php-5.5.7/ext/iconv -DPHP_ATOM_INC -I/usr/obj/ports/usr/ports/converters/php55-iconv/work/php-5.5.7/ext/iconv/include -I/usr/obj/ports/usr/ports/converters/php55-iconv/work/php-5.5.7/ext/iconv/main -I/usr/obj/ports/usr/ports/converters/php55-iconv/work/php-5.5.7/ext/iconv -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 -DHAVE_CONFIG_H -I/usr/include -O2 -pipe -fno-strict-aliasing -c /usr/obj/ports/usr/ports/converters/php55-iconv/work/php-5.5.7/ext/iconv/iconv.c  -fPIC -DPIC -o .libs/iconv.o
/usr/obj/ports/usr/ports/converters/php55-iconv/work/php-5.5.7/ext/iconv/iconv.c:252:9: error: use of undeclared identifier '_libiconv_version'
                    ((_libiconv_version >> 8) & 0x0f), (_libiconv_version & 0x0f));
^
You must be right, though I fail to find it. Will need to dig deeper.
 
Re: Building php55-iconv on FreeBSD 10

Found the issue:
/usr/local/include/php/ext/iconv/config.h
Code:
#define HAVE_LIBICONV 1

Removing that made converters/php55-iconv buildable on FreeBSD 10

This was not handled proper by converters/php55-iconv itself. It could be due to lang/php55 was version 5.5.5 on FreeeBSD 9.2, then followed upgrade to v10-RC2 via freebsd-update. As part of the upgrade process all the ports were rebuilt. I followed the upgrade steps as outlined in the v10-RC2 announcement http://lists.freebsd.org/pipermail/freebsd-stable/2013-December/076480.html were performed so this could serve as a point to take note of for those upgrading to FreeBSD 10 with converters/php55-iconv (presumably ports converters/php54-iconv,converters/php53-iconv and converters/php52-iconv could have the same issue)
 
Back
Top