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

Re: Is NO_ICONV misnamed or is it broken?

From
Christian Couder <christian.couder@gmail.com>
Date
Jun 17, 2018, 02:57 UTC
Message-ID
<CAP8UFD2SJF_gbP-mdXoAH0t_OmLjRbPuVK5vZZjgs2N9eJz5KQ@mail.gmail.com>
In-Reply-To
<CACcTrKePbgyCbXneN5NZ+cS-tiDyYe_dkdwttXpP0CUeEicvHw@mail.gmail.com>
Hi,
On Fri, Jun 15, 2018 at 12:47 AM, Mahmoud Al-Qudsi <mqudsi@neosmart.net> wrote:
Show 6 quoted lines
> Hello list,
>
> With regards to the Makefile define/variable `NO_ICONV` - the Makefile
> comments imply that it should be used if "your libc doesn't properly support
> iconv," which could mean anything from "a patch will be applied" to "iconv
> won't be used."

b6e56eca8a (Allow building Git in systems without iconv, 2006-02-16) which added NO_ICONV says:

    Systems using some uClibc versions do not properly support
    iconv stuff. This patch allows Git to be built on those
    systems by passing NO_ICONV=YesPlease to make. The only
    drawback is mailinfo won't do charset conversion in those
    systems.
Show 15 quoted lines
> Based off the name of the varibale, the assumption is that iconv is an
> optional dependency that can be omitted if compiled with NO_ICONV. However, in
> practice attempting to compile git with `make ... NO_ICONV=1` and libiconv not
> installed results in linker errors as follows:
>
> ```
> ~> make clean
> # omitted
> ~> make NO_ICONV=1
> # ommitted
>     LINK git-credential-store
> /usr/bin/ld: cannot find -liconv
> cc: error: linker command failed with exit code 1 (use -v to see invocation)
> gmake: *** [Makefile:2327: git-credential-store] Error 1
> ```
Yeah, this might be an issue with the Makefile options.
> Am I misunderstanding the intended behavior when NO_ICONV is defined (i.e. it
> does not remove the dependency on libiconv) or is this a bug and iconv should
> not, in fact, be required?
It's difficult to tell from reading the comments and commit messages.

I think 597c9cc540 (Flatten tools/ directory to make build procedure simpler., 2005-09-07) which introduces NEEDS_LIBICONV is even older than the commit that introduced NO_ICONV (see above), so you might want to play with NEEDS_LIBICONV too and see if it works better for you.

(I understand that "you might want to play with such and such other options" is perhaps not as helpful as what you expected, but I previously tried to tighten the way we handle dependencies in the Makefile and it was considered "too heavy handed". So yeah, we consider it ok if people have to tinker a bit when they want to build Git.)

I CC'ed the people involved in related commits. Maybe they can give you a better answer. It might also help if you could tell us on which OS/Platform and perhaps for which purpose you want to compile Git.

Best, Christian.

Previous: Mahmoud Al-QudsiNext: Eric Sunshine
Message 14 of 15 in “Is NO_ICONV misnamed or is it broken?”
  1. Mahmoud Al-QudsiJun 14, 2018
  2. Makefile: make NO_ICONV really mean "no iconv"Eric Sunshine, Jun 15, 2018
  3. Jeff KingJun 15, 2018
  4. Eric SunshineJun 15, 2018
  5. Jeff KingJun 15, 2018
  6. Simon RuderichJun 15, 2018
  7. Eric SunshineJun 15, 2018
  8. Kaartic SivaraamJun 17, 2018
  9. Eric SunshineJun 17, 2018
  10. Doc/SubmittingPatches: re-phrashing a sentence about alternate solutions (was Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv")Kaartic Sivaraam, Jun 17, 2018
  11. Jeff KingJun 18, 2018
  12. Junio C HamanoJun 18, 2018
  13. Mahmoud Al-QudsiJun 15, 2018
  14. Christian CouderJun 17, 2018
  15. Eric SunshineJun 17, 2018

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.