LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Undefined reference to libiconv (http://www.linuxquestions.org/questions/slackware-14/undefined-reference-to-libiconv-341284/)

mjjzf 07-08-2005 10:52 AM

Undefined reference to libiconv
 
I was trying to install MagicPoint and got the following error message during 'make':
Code:

draw.o(.text+0x78b3): In function `xft_draw_fragment':
:undefined reference to `libiconv'
draw.o(.text+0x79c4): In function `xft_draw_fragment':
: undefined reference to `libiconv_open'

... any pointers? Libiconv is installed.

keefaz 07-08-2005 11:03 AM

Maybe you should try download and install this package :
http://www.linuxpackages.net/search_...iconv&ver=10.1

mjjzf 07-08-2005 11:05 AM

I already have it installed.

keefaz 07-08-2005 11:07 AM

Did you run ldconfig as root ?

mjjzf 07-08-2005 11:14 AM

No result. What does it do? Any other parameters than just "ldconfig"?

keefaz 07-08-2005 11:26 AM

ldconfig updates the shared libraries links, so new installed
libraries are found by ld and the undefined reference should
go away

There is no other parameter, you run ldconfig and it updates
links following /etc/ld.so.conf (In fact ldconfig has more option
but none will be usefull here)

Where the libiconv is installed ? in /usr/lib or /usr/local/lib ?
(if /usr/local/lib, make sure this dir is in /etc/ld.so.conf)

Also try a ./configure again, then make

mjjzf 07-08-2005 11:47 AM

So I should do
ldconfig /usr/lib/libiconv.so
- that is the file placement - and then reattempt ./confgure?

keefaz 07-08-2005 11:52 AM

No, just type : ldconfig
Also maybe there is a ./configure option to
disable libiconv, I don't know, try ./configure --help

ideasman 08-17-2007 04:46 AM

The application Im compiling (stepmania) dosnt have the option to disable iconv, and Im getting.


RageUtil_CharConversions.o: In function `ConvertFromCharset(StdString::CStdStr<char>&, char const*)':
RageUtil_CharConversions.cpp:(.text+0x23): undefined reference to `libiconv_open'
RageUtil_CharConversions.cpp:(.text+0x96): undefined reference to `libiconv'
RageUtil_CharConversions.cpp:(.text+0xa0): undefined reference to `libiconv_close'
collect2: ld returned 1 exit status
make[2]: *** [stepmania] Error 1


Iv also installed libiconv-1.11.tar.gz and run ldconfig, so not sure whats going on.

andyccn 09-23-2007 01:53 PM

I was getting the same errors trying to compile PHP. Interestingly I only started getting the errors after installing iconv-1.11 (I needed it for another application.)

The iconv files sit inside /usr/local/lib and /usr/local/include, and I've ran ldconfig with the right directories, and the other applications that depend on iconv have compiled successfully.

In the end I've had to add --without-iconv to PHP's configure line.

Annoying.

willysr 09-23-2007 07:15 PM

same here
i always had problem with compiling libiconv on PHP
in the end, i can't get any XSLT features again

sourceforager 11-24-2008 06:57 PM

undefined reference to `libiconv_open'
 
To fix this error:
undefined reference to `libiconv_open'

Run configure like this:
[root@hotstname project-version]# ./configure CFLAGS=-liconv

samac 11-25-2008 04:37 AM

I had a problem similar to this with Neverwinter Nights, it requires libiconv. However another piece of software requires the iconv that is part of the glibc packet. To fix the problem I had to remove libiconv, reinstall glibc and then compile the software I had the problem with. I then reinstalled libiconv for Neverwinter Nights. Both bits of software now work fine.

samac

v_2e 02-19-2013 11:39 AM

Quote:

Originally Posted by sourceforager (Post 3353338)
To fix this error:
undefined reference to `libiconv_open'

Run configure like this:
[root@hotstname project-version]# ./configure CFLAGS=-liconv

In my case this variant:
Code:

./configure LIBS="-liconv"
worked better (produced no warnings).


All times are GMT -5. The time now is 11:52 PM.