git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-core-0.99.9g: mailinfo.c:448: undefined reference to `libiconv_open'

From
RNRoberto Nibali <ratz@drugphish.ch>
Date
Nov 12, 2005, 10:30 UTC
Message-ID
<4375C45B.8000103@drugphish.ch>
In-Reply-To
<4375C37E.6030509@drugphish.ch>
As always, once you send the damn thing, the solution is obvious:
Show 16 quoted lines
> gcc -o mailinfo.o -c -g -O2 -Wall -DSHA1_HEADER='<openssl/sha.h>' mailinfo.c
> gcc -g -O2 -Wall -DSHA1_HEADER='<openssl/sha.h>' -o git-mailinfo
> mailinfo.o libgit.a
> mailinfo.o(.text+0x799): In function `convert_to_utf8':
> /data/down/git-core-0.99.9g/mailinfo.c:448: undefined reference to
> `libiconv_open'
> mailinfo.o(.text+0x7f6):/data/down/git-core-0.99.9g/mailinfo.c:460:
> undefined reference to `libiconv'
> mailinfo.o(.text+0x801):/data/down/git-core-0.99.9g/mailinfo.c:461:
> undefined reference to `libiconv_close'
> collect2: ld returned 1 exit status
> make: *** [git-mailinfo] Error 1
> 
> # nm /usr/local/lib/libiconv.so | grep -E "libiconv_open|libiconv_close"
> 0000f550 T libiconv_close
> 0000f580 T libiconv_open
# nm mailinfo.o | grep -i iconv
         U libiconv
         U libiconv_close
         U libiconv_open
The solution is simple:
make CFLAGS="-liconv"

Sorry for wasting your time, Roberto Nibali, ratz

-- 
echo
'[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc
Previous: Roberto Nibali
Message 2 of 2 in “git-core-0.99.9g: mailinfo.c:448: undefined reference to `libiconv_open'”
  1. Roberto NibaliNov 12, 2005
  2. Roberto NibaliNov 12, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.