# [PATCH] Link against libiconv on IRIX

4 messages from 2010-03-29 to 2010-04-05. Participants: Holger Weiß, Brandon Casey, Junio C Hamano.
Thread: https://gitlist.dev/t/23225

## Holger Weiß, 2010-03-29 10:57

Subject: [PATCH] Link against libiconv on IRIX
Message-ID: <20100329105748.GD14869@CIS.FU-Berlin.DE>
URL: https://gitlist.dev/e/20100329105748.GD14869%40CIS.FU-Berlin.DE

```
On IRIX, "-liconv" must be added to the linker command line in order to
get iconv(3) support; set the according Makefile variable appropriately.

Signed-off-by: Holger Weiß <holger@zedat.fu-berlin.de>
---
 Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 3a6c6ea..8a0f5c4 100644
--- a/Makefile
+++ b/Makefile
@@ -919,6 +919,7 @@ ifeq ($(uname_S),IRIX)
 	SNPRINTF_RETURNS_BOGUS = YesPlease
 	SHELL_PATH = /usr/gnu/bin/bash
 	NEEDS_LIBGEN = YesPlease
+	NEEDS_LIBICONV = YesPlease
 endif
 ifeq ($(uname_S),IRIX64)
 	NO_SETENV=YesPlease
@@ -937,6 +938,7 @@ ifeq ($(uname_S),IRIX64)
 	SNPRINTF_RETURNS_BOGUS = YesPlease
 	SHELL_PATH=/usr/gnu/bin/bash
 	NEEDS_LIBGEN = YesPlease
+	NEEDS_LIBICONV = YesPlease
 endif
 ifeq ($(uname_S),HP-UX)
 	NO_IPV6=YesPlease
-- 
1.7.0.3

```

## Brandon Casey, 2010-04-05 16:45

Subject: Re: [PATCH] Link against libiconv on IRIX
Message-ID: <1UypQMCHLT57SnjSQIM66RTkLalsvavG8xXoQJv4rEQ@cipher.nrlssc.navy.mil>
URL: https://gitlist.dev/e/1UypQMCHLT57SnjSQIM66RTkLalsvavG8xXoQJv4rEQ%40cipher.nrlssc.navy.mil
In-Reply-To: <20100329105748.GD14869@CIS.FU-Berlin.DE>

```
On 03/29/2010 05:57 AM, Holger Weiß wrote:
> On IRIX, "-liconv" must be added to the linker command line in order to
> get iconv(3) support; set the according Makefile variable appropriately.

This breaks compilation on IRIX 6.5.29m for me since there
is no separate libiconv.so.

What version of IRIX are you using?

On my system, even the iconv utility doesn't link against
a libiconv shared object.  It seems the iconv functionality is in libc.

   # ldd /usr/bin/iconv
           libc.so.1  =>    /usr/lib32/libc.so.1

Could it be that you are using a third party iconv library?
I've experienced this on another system and the problem was related
to curl.  In that case, curl was linked against an external iconv and
not the native library, so if I tried to build with curl support, I had
to also build against the external iconv library.

-brandon


> Signed-off-by: Holger Weiß <holger@zedat.fu-berlin.de>
> ---
>  Makefile |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 3a6c6ea..8a0f5c4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -919,6 +919,7 @@ ifeq ($(uname_S),IRIX)
>  	SNPRINTF_RETURNS_BOGUS = YesPlease
>  	SHELL_PATH = /usr/gnu/bin/bash
>  	NEEDS_LIBGEN = YesPlease
> +	NEEDS_LIBICONV = YesPlease
>  endif
>  ifeq ($(uname_S),IRIX64)
>  	NO_SETENV=YesPlease
> @@ -937,6 +938,7 @@ ifeq ($(uname_S),IRIX64)
>  	SNPRINTF_RETURNS_BOGUS = YesPlease
>  	SHELL_PATH=/usr/gnu/bin/bash
>  	NEEDS_LIBGEN = YesPlease
> +	NEEDS_LIBICONV = YesPlease
>  endif
>  ifeq ($(uname_S),HP-UX)
>  	NO_IPV6=YesPlease

```

## Junio C Hamano, 2010-04-05 17:15

Subject: Re: [PATCH] Link against libiconv on IRIX
Message-ID: <7vfx39q0q8.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vfx39q0q8.fsf%40alter.siamese.dyndns.org
In-Reply-To: <1UypQMCHLT57SnjSQIM66RTkLalsvavG8xXoQJv4rEQ@cipher.nrlssc.navy.mil>

```
Thanks for the report.

In the meantime I'll revert 2170422 (Link against libiconv on IRIX,
2010-03-29) and wait for an improved, probably a conditional, change.

```

## Holger Weiß, 2010-04-05 19:44

Subject: Re: [PATCH] Link against libiconv on IRIX
Message-ID: <20100405194454.GA3808951@CIS.FU-Berlin.DE>
URL: https://gitlist.dev/e/20100405194454.GA3808951%40CIS.FU-Berlin.DE
In-Reply-To: <1UypQMCHLT57SnjSQIM66RTkLalsvavG8xXoQJv4rEQ@cipher.nrlssc.navy.mil>

```
* Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil> [2010-04-05 11:45]:
> Could it be that you are using a third party iconv library?
> I've experienced this on another system and the problem was related
> to curl.  In that case, curl was linked against an external iconv and
> not the native library, so if I tried to build with curl support, I had
> to also build against the external iconv library.

This was exactly the problem in our case, too.  I'm sorry for the
incorrect patch.

Holger

```
