[R-sig-Debian] Binding with libiconv failed while compiling R-devel on Ubuntu 17.04

Dirk Eddelbuettel edd at debian.org
Tue Oct 24 14:34:26 CEST 2017


Thanks for posting here.

On 24 October 2017 at 14:14, Matthias Zytnicki wrote:
| Dear everyone,
| 
| I posted a similar question to Stack Overflow there: https://stackoverflow.com/questions/46907554/binding-with-libiconv-failed-while-compiling-r-devel-on-ubuntu-17-04 and I was suggested to post my question here.
| 
| I tried to compile R devel using Dirk Eddelbuettel's recipe (and many variants of it).  Regardless of what I do, I have:
| ===
|   	[...]/src/main/sysutils.c:794: undefined reference to `libiconv'
|   	[...]
|   	[...]/src/main/platform.c:3052: undefined reference to `u_getVersion_54'
|   	[...]
| ===
| add many other similar lines, similar to the last comment of http://jtremblay.github.io/software_installation/2017/06/21/Install-R-3.4.0-and-RStudio-on-Ubuntu-16.04
| 
| (Of note: the offending line does not contain "libiconv" per se, but instead "iconv(...)".)
| 
| It seems that libiconv is now in libc6. I checked that these packages are correctly installed, and updated (with Gnome Ubuntu 17.04):
|    - libc6-dev
|    - libicu-dev
|    - build-essential
|    - fort77
|    - xorg-dev
|    - liblzma-dev
|    - libblas-dev
|    - gfortran
|    - gcc-multilib
|    - gobjc++
|    - aptitude
|    - libreadline-dev
|    - libcurl4-openssl-dev
|    - default-jdk
|    - texlive-latex-base
|    - libcairo2-dev
| 
| The configuration step regarding libiconv seems ok:
| ===
|   	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);
| ===
| The command iconv -l seems to work fine. This C file compiles with no problem either:
| ===
|   	#include <iconv.h>
| 
|   	int main( int argc, char **argv ) {
|   					iconv_t cd = iconv_open( "UTF-8", "ISO-8859-1" );
|   					iconv_close( cd );
|   					return 0;
|   	}
| ===
| So libiconv seems to be indeed usable, but not during the linking.
| 
| Where should I look?

Something _must be_ wrong with your machine.  We probably need more complete
details of the configure and link steps.  

Do you ever have issues with building other CRAN packages from source?

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



More information about the R-SIG-Debian mailing list