# libxml2 wants to install libiconv



## underscore (Jan 31, 2014)

Hello, 

since FreeBSD 10 ships iconv directly with the system I removed converters/libiconv and am trying to re-install all depending ports.
But textproc/libxml2 always wants to install converters/libiconv again. 

How do I prevent this? (Especially since the installation of converters/libiconv fails, rightfully so). 
What is the proper way to upgrade from converters/libiconv to the native iconv?
This is happening in a jail, if this could be of interest.

Thanks for your help!


----------



## SirDice (Jan 31, 2014)

There's an entry in /usr/ports/UPDATING that covers this:

```
20130904:
  AFFECTS: 10-CURRENT users with any port depending on converters/libiconv
  AUTHOR: madpilot@FreeBSD.org

  10-CURRENT after r254273 (committed on August 13, 2013) has an
  implementation of iconv enabled by default in libc.

  Due to this change some major overhauling of the ports tree has
  been necessary to move the ports to using that implementation.

  People using pkgng binary packages should have little problems,
  "pkg upgrade" will update all software to not depend on libiconv
  anymore, once updated packages are available. Please make sure to
  perform a "pkg autoremove" after that and check that libiconv is
  correctly removed by it.

  If you are using ports the update requires some manual intervention.
  The following procedure should be followed:

  # pkg query %ro libiconv >ports_to_update
  # pkg delete -f libiconv
  # cat ports_to_update | xargs portmaster

  or:

  # pkg query %ro libiconv >ports_to_update
  # pkg delete -f libiconv
  # cat ports_to_update | xargs portupgrade -f
```


----------



## underscore (Jan 31, 2014)

Ah, I failed to mention: I did exactly that, but as soon as portmaster comes to textproc/libxml2 and also converters/php5-iconv it re-installs converters/libiconv   x(


----------



## underscore (Jan 31, 2014)

I just replicated the problem under a fresh jail created via `ezjail-admin`, even though iconv is found under /usr/include/sys/iconv.h...
So this could be a problem with ezjail and FreeBSD 10?


----------



## EasyTarget (Jan 31, 2014)

For converters/php5-iconv see PR 184596; the iconv() in base does not provide some functions required by the port; so a mechanism has been implemented to let them keep using converters/libiconv from ports until such time as the base iconv supports them. I'd assume it is similar for textproc/libxml2, and that your only option is to not worry and let it build this port.


----------



## underscore (Jan 31, 2014)

Ah, thats very good to know! But how do I install converters/libiconv then?

It fails here:


```
===>  Installing for libiconv-1.14_1
===>  Checking if converters/libiconv already installed
===>   Registering installation for libiconv-1.14_1
pkg-static: lstat(/var/ports/usr/ports/converters/libiconv/work/stage/usr/local/lib/libcharset.so): No such file or directory
pkg-static: lstat(/var/ports/usr/ports/converters/libiconv/work/stage/usr/local/lib/libcharset.so.1): No such file or directory
pkg-static: lstat(/var/ports/usr/ports/converters/libiconv/work/stage/usr/local/lib/libiconv.so): No such file or directory
pkg-static: lstat(/var/ports/usr/ports/converters/libiconv/work/stage/usr/local/lib/libiconv.so.3): No such file or directory
*** [fake-pkg] Error code 74

Stop in /usr/ports/converters/libiconv.
*** [install] Error code 1
```


----------



## nanotek (Feb 1, 2014)

Same problem here [*].

Trying to update a few ports and `portmaster` insists on bringing in libiconv. I'm not going ahead with the upgrade, though, because I know something will break. Starting to regret upgrading to 10.0-RELEASE; should have waited.

[*] viewtopic.php?f=5&t=44658


----------

