Skip to contentSkip to conversation

Link against libiconv on IRIX

PATCH In review Holger Weiß 4 participants 4 messages Jun 15, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Link against libiconv on IRIX

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

---
 Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Makefile +2 -0
index 3a6c6ea..8a0f5c4 100644
@@ -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
Signature · 1 line
1.7.0.3
#1 lore raw
Quoted 2 lines · Holger Weiß

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

Quoted 25 lines
---
 Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Makefile +2 -0
index 3a6c6ea..8a0f5c4 100644
@@ -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
#2 lore raw
Quoted 5 lines · Brandon Casey

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