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

Re: 1.7.9, libcharset missing from EXTLIBS

From
ДПДилян Палаузов <dilyan.palauzov@aegee.org>
Date
Feb 12, 2012, 00:55 UTC
Message-ID
<4F370DE5.70400@aegee.org>
In-Reply-To
<7vd39mph9x.fsf@alter.siamese.dyndns.org>
Hello,

please consider the patch below as fix for the problem. It checks if locale_charset is not in libiconv, but in libcharset and in this case appends -lcharset to EXTLIBS.

Със здраве
   Дилян

diff -u git-1.7.9.orig/config.mak.in git-1.7.9/config.mak.in --- git-1.7.9.orig/config.mak.in 2012-01-27 20:51:04.000000000 +0000 +++ git-1.7.9/config.mak.in 2012-02-12 00:52:41.457968080 +0000

@@ -74,3 +74,4 @@
  NO_PTHREADS=@NO_PTHREADS@
  PTHREAD_CFLAGS=@PTHREAD_CFLAGS@
  PTHREAD_LIBS=@PTHREAD_LIBS@
+LINK_CHARSET=@LINK_CHARSET@
diff -u git-1.7.9.orig/configure.ac git-1.7.9/configure.ac
--- git-1.7.9.orig/configure.ac 2012-01-27 20:51:04.000000000 +0000
+++ git-1.7.9/configure.ac      2012-02-12 00:44:29.222967868 +0000
@@ -836,6 +836,18 @@
  [HAVE_LIBCHARSET_H=YesPlease],
  [HAVE_LIBCHARSET_H=])
  AC_SUBST(HAVE_LIBCHARSET_H)
+# Define LINK_LIBCHARSET if libiconv does not export the locale_charset 
symbol
+# and liblibcharset does
+LINK_CHARSET=
+AC_CHECK_LIB([iconv], [locale_charset],
+       [],
+       [AC_CHECK_LIB([charset], [locale_charset],
+                     [LINK_CHARSET=Yes])
+       ]
+)
+AC_SUBST(LINK_CHARSET)
+
+
  #
  # Define NO_STRCASESTR if you don't have strcasestr.
  GIT_CHECK_FUNC(strcasestr,
diff -u git-1.7.9.orig/Makefile git-1.7.9/Makefile
--- git-1.7.9.orig/Makefile     2012-01-27 20:51:04.000000000 +0000
+++ git-1.7.9/Makefile  2012-02-12 00:35:23.982967555 +0000
@@ -1692,6 +1692,9 @@

  ifdef HAVE_LIBCHARSET_H
         BASIC_CFLAGS += -DHAVE_LIBCHARSET_H
+ifdef LINK_CHARSET
+       EXTLIBS += -lcharset
+endif
  endif

  ifdef HAVE_DEV_TTY

On 10.02.2012 21:25, Junio C Hamano wrote:
> Junio C Hamano<gitster@pobox.com>  writes:
>
>> Дилян Палаузов<dilyan.palauzov@aegee.org>  writes:
>>
>>>>> What I am wondering is there are systems that need to include the header,
>>>>> but locale_charset() does not live in /lib/libcharset.a, in which case we
>>>>> cannot make HAVE_LIBCHARSET_H imply use of -lcharset.
>>>
>>> I do not understand this.  If you want to use a function from
>>> libcharset, you have to use both #include<libcharset.h>  and
>>> -lcharset.
>>
>> You are mistaken.
>>
>> The only constraint is that you have to "#include<libcharset.h>" and need
>> to link with the library that has locale_charset() defined.
>
> I think the follow-ups in this thread already demonstrated why it is an
> insufficient solution to make HAVE_LIBCHARSET_H imply -lcharset.
>
> We would instead need:
>
> 	ifeq ($(uname_S),MyHomeBrewLinux)
>          	HAVE_LIBCHARSET_H = YesPlease
>                  EXTLIBS += -lcharset
> 	endif
>
> or
>
> 	# Define NEEDS_CHARSETLIB if you use HAVE_LIBCHARSET_H and
>          # need to link with -lcharset
> 	NEEDS_CHARSETLIB =
>
> 	ifeq ($(uname_S),MyHomeBrewLinux)
>          	HAVE_LIBCHARSET_H = YesPlease
> 		NEEDS_CHARSETLIB = YesPlease
> 	endif
>
> 	ifdef NEEDS_CHARSETLIB
>          	EXTLIBS += -lcharset
> 	endif
>
> or something like that, I guess.
>


begin:vcard
fn;quoted-printable:=D0=94=D0=B8=D0=BB=D1=8F=D0=BD =D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=
	=D0=B2
n;quoted-printable;quoted-printable:=D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=D0=B2;=D0=94=D0=B8=D0=BB=D1=8F=D0=BD
email;internet:dilyan.palauzov@aegee.org
tel;home:+49-721-94193270
tel;cell:+49-162-4091172
note:sip:8372@aegee.org
version:2.1
end:vcard
Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 9 of 13 in “1.7.9, libcharset missing from EXTLIBS”
  1. Дилян ПалаузовFeb 10, 2012
  2. Junio C HamanoFeb 10, 2012
  3. Ævar Arnfjörð BjarmasonFeb 10, 2012
  4. Дилян ПалаузовFeb 10, 2012
  5. Junio C HamanoFeb 10, 2012
  6. Dilyan PalauzovFeb 10, 2012
  7. Erik Faye-LundFeb 10, 2012
  8. Junio C HamanoFeb 10, 2012
  9. Дилян ПалаузовFeb 12, 2012
  10. Ævar Arnfjörð BjarmasonFeb 12, 2012
  11. Junio C HamanoFeb 12, 2012
  12. Re: 1.7.9, libcharset missing from EXTLIBSДилян Палаузов, Feb 12, 2012
  13. Jakub NarebskiFeb 10, 2012

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.