I don't exactly know when it stopped working, or if it ever worked on 10.x, but last week, I tried to use rsync with "--iconv=UTF-8,US-ASCII//IGNORE//TRANSLIT" (it translitterates letters like é to 'e to ß to ss if it can, and drop them if it cannot) to transfer files from a utf-8 host to a crappy old file server. So, anyway, I updated my crappy old file server to 10.3, and that command stopped working, saying that the remote rsync did not support --iconv, so, I had a look and changed the : .if empty(ICONV_LIB) CONFIGURE_ARGS+=ac_cv_search_libiconv_open=no .endif to .if ! ${PORT_OPTIONS:MICONV} CONFIGURE_ARGS+=ac_cv_search_libiconv_open=no .endif rebuilt, and there, it had iconv support again, and I was happy and all. But something else is fishy, today, net/rabbitmq failed to build in poudriere because: Shared object "libiconv.so.2" not found, required by "rsync" Some head scratching, and I found out that there only is a BUILD_DEPENDS on converters/libiconv, so, rsync is built with it, but depends is not registered, if I build it in poudriere testport -i, in the shell, I can remove libiconv because nothing depends on it, and then: root@10amd64-ports:~ # pkg check -Ba Checking all packages: 66% (rsync-3.1.2_2) /usr/local/bin/rsync - required shared library libiconv.so.2 not found Checking all packages: 100% root@10amd64-ports:~ # I'm not sure how to fix this, I'm tempted to change the ICONV_USES=iconv line in rsync's Makefile to ICONV_USES=iconv:translit, but I'm wondering if there's not some bug somewhere in Mk/Uses/iconv.mk's logic, and it should be fixed there. (adding Tijl to the cc because he's the one who did the last change to iconv.mk)
There are two iconv(3) implementations, one in libc and one in converters/libiconv. The one in libc does not support translit. If you need that just change USES=iconv into USES=iconv:translit. It will make the port use libiconv. The port Makefile and Uses/iconv.mk are otherwise fine I think.
Well, I do think there is something strange, on 10.1, at least, it adds a build dependency on converters/libiconv, so rsync links with it, and then, the package doesn't register a runtime dependency, and the resulting rsync is not usable.
It links with libiconv because you modified the Makefile. The build dependency is to get /usr/local/include/iconv.h because /usr/include/iconv.h still contains const qualifiers on 10.1. See ports r384038.
Well, maybe, but before I modified it, it was not linking with any iconv library, at all, when the ICONV option was enabled.
That's because it uses the iconv(3) implementation in libc. You probably got an error because this implementation does not support //IGNORE//TRANSLIT.
Actually, there is a bug in the Makefile, but it's not related to your problem. It should be: .if empty(ICONV_LIB) || ! ${PORT_OPTIONS:MICONV} CONFIGURE_ARGS+=ac_cv_search_libiconv_open=no .endif This prevents linking with libiconv on FreeBSD 9 when the ICONV option is off. The rsync configure script always adds -liconv if it finds the library.
Mmm, ok, with that, it looks more consistent, but one still can't use //TRANSLIT on 10, while it works on 9.
You can ask the maintainer to change USES=iconv into USES=iconv:translit.
Created attachment 169562 [details] patch So, add a patch
(In reply to Tijl Coosemans from comment #8) I approve this patch. Please feel free to commit.
A commit references this bug: Author: mat Date: Sat Apr 23 13:13:12 UTC 2016 New revision: 413870 URL: https://svnweb.freebsd.org/changeset/ports/413870 Log: Fix ICONV support. PR: 208958 Submitted by: mat Reviewed by: tijl Approved by: maintainer Sponsored by: Absolight Changes: head/net/rsync/Makefile