git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-core-0.99.9g: mailinfo.c:448: undefined reference to `libiconv_open'
@ 2005-11-12 10:27 Roberto Nibali
  2005-11-12 10:30 ` Roberto Nibali
  0 siblings, 1 reply; 2+ messages in thread
From: Roberto Nibali @ 2005-11-12 10:27 UTC (permalink / raw)
  To: git

Hello,

I've tried to compile git-core-0.99.9g on an old SuSE 9.1 box with a
self-compiled libiconv. Anyone can shed a light on the following?

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

I might be missing something really obvious. It's not very important;
just if you happen to know something regarding this issue I'd be interested.

Regards,
Roberto Nibali, ratz
-- 
echo
'[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git-core-0.99.9g: mailinfo.c:448: undefined reference to `libiconv_open'
  2005-11-12 10:27 git-core-0.99.9g: mailinfo.c:448: undefined reference to `libiconv_open' Roberto Nibali
@ 2005-11-12 10:30 ` Roberto Nibali
  0 siblings, 0 replies; 2+ messages in thread
From: Roberto Nibali @ 2005-11-12 10:30 UTC (permalink / raw)
  To: git

As always, once you send the damn thing, the solution is obvious:

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-12 10:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-12 10:27 git-core-0.99.9g: mailinfo.c:448: undefined reference to `libiconv_open' Roberto Nibali
2005-11-12 10:30 ` Roberto Nibali

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).