<p>Well, well, well: I have been doing for probably a decade or more and there are some older posts of mine floating. In fact, the blog post you use references my script via a five-year old email -- these still work for me. </p>

<p>My current version is attached below. I have been building this all these years on "whatever is the current Ubuntu version", with a slight upgrade delay.  So like you I am currently on 17.04, and I just use <code>libicu-dev</code> which gets we the <code>libicu57</code> runtime.</p>

<p>That said, you also get r-devel "prebuilt" via Docker images from our Rocker project.  This this <a href="https://arxiv.org/abs/1710.03675" rel="nofollow noreferrer">recent arXiv preprint</a> descrining the project, and mentioning <code>r-devel</code> and <code>drd</code>, both available from <a href="http://hub.docker.com" rel="nofollow noreferrer">hub.docker.com</a>.</p>

<p>My script follows.  There is no magic in. You may need to remove the <code>ccache</code> or install <code>ccache</code>.</p>

<pre><code>#!/bin/sh

cd ~/svn/r-devel

R_PAPERSIZE=letter              \
R_BATCHSAVE="--no-save --no-restore"        \
R_BROWSER=xdg-open              \
PAGER=/usr/bin/pager                \
PERL=/usr/bin/perl              \
R_UNZIPCMD=/usr/bin/unzip           \
R_ZIPCMD=/usr/bin/zip               \
R_PRINTCMD=/usr/bin/lpr             \
LIBnn=lib                   \
AWK=/usr/bin/awk                                \
CC="ccache gcc"                 \
CFLAGS="-ggdb -pipe -std=gnu99 -Wall -pedantic" \
CXX="ccache g++"                \
CXXFLAGS="-ggdb -pipe -Wall -pedantic"      \
FC="ccache gfortran"                \
F77="ccache gfortran"               \
MAKE="make -j4"                 \
./configure                     \
    --prefix=/usr/local/lib/R-devel         \
    --enable-R-shlib                \
    --without-blas              \
    --without-lapack                \
    --without-recommended-packages

make 

echo "*** Done -- now run 'make install'"
</code></pre>

<p>And for what it is worth I get the <em>exact same iconv message</em> which appears to be just informative:</p>

<pre><code>checking iconv.h usability... yes                                                                                                                                                                                  checking iconv.h presence... yes                                                                                                                                                                                   
checking for iconv.h... yes                                                                                                                                                                                        checking for iconv... yes                                                                                                                                                                                          
checking whether iconv accepts "UTF-8", "latin1", "ASCII" and "UCS-*"... yes                                                                                                                                       checking for iconvlist... no                                                                                                                                                                                       
checking for iconv... yes                                                                                                                                                                                          checking for iconv declaration...                                                                                                                                                                                  
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);                                                                                               checking wchar.h usability... yes                                                                                                                                                                                  
checking wchar.h presence... yes 
</code></pre>

<p>Your problem, then, seems to be that you lack <code>libiconv-dev</code>, and presumably <em>many more</em> such <code>-dev</code> packages: it is not just <code>libc6-dev</code>.</p>

<p><em>Edit:</em> Come to think about it, the aforementioned Dockerfiles are probably a good proxy for the packages you need.  See eg <a href="https://github.com/rocker-org/drd/blob/601c703fdf2373a06706b78cf7863f8305956f79/Dockerfile#L19-L62" rel="nofollow noreferrer">here</a> for the corresponding 43 lines (!!) from drd.</p>
Binding with libiconv failed while compiling R-devel on Ubuntu 17.04
<p>I have been spending one day to try to compile R-devel.
I have used this <a href="http://singmann.org/installing-r-devel-on-linux/" rel="nofollow noreferrer">post</a> to do so.</p>

<p>Regardless of what I do, I have:</p>

<pre><code>[...]/src/main/sysutils.c:794: undefined reference to `libiconv'
[...]
[...]/src/main/platform.c:3052: undefined reference to `u_getVersion_54'
[...]
</code></pre>

<p>add many other similar lines, similar to the last comment of <a href="http://jtremblay.github.io/software_installation/2017/06/21/Install-R-3.4.0-and-RStudio-on-Ubuntu-16.04" rel="nofollow noreferrer">this post</a>.</p>

<p>Obviously, I have:</p>

<pre><code>$ sudo apt install libc6-dev
libc6-dev is already the newest version (2.24-9ubuntu2.2).
</code></pre>

<p>The configuration step regarding libiconv seems ok:</p>

<pre><code>checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for iconv... yes
checking whether iconv accepts "UTF-8", "latin1", "ASCII" and "UCS-*"... yes
checking for iconvlist... no
checking for iconv... yes
checking for iconv declaration...
     extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
</code></pre>

<p>The command <code>iconv -l</code> seems to work fine.  The C file described in <a href="https://stackoverflow.com/questions/4709178/how-do-i-link-glibcs-implementation-of-iconv">this other post</a> compiles with no problem either.</p>

<p>Where should I look?  I use Gnome Ubuntu 17.04.</p>