bug-gnu-libiconv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnu-libiconv] libiconv depends on libcharset?


From: Benny Siegert
Subject: [bug-gnu-libiconv] libiconv depends on libcharset?
Date: Tue, 6 Sep 2011 21:42:15 +0200

Hello,

I have problems compiling libiconv-1.14 on MirBSD, using the pkgsrc
framework. The build stops with the following error during "make
install":

/bin/sh ../libtool --mode=link mgcc -Wl,-O2 -Wl,-R/usr/pkg/lib -O2
-pipe -std=gnu99 -Os -fweb -frename-registers -Wformat
-Wstrict-aliasing -Wbounded -fwrapv -fno-align-functions
-fno-align-labels -falign-loops=4 -falign-jumps=4 -march=i486
-mpush-args -mpreferred-stack-boundary=2 -momit-leaf-frame-pointer
-fhonour-copts iconv_no_i18n.o ../srclib/libicrt.a ../lib/libiconv.la
-o iconv_no_i18n
libtool: link: mgcc -Wl,-O2 -Wl,-R/usr/pkg/lib -O2 -pipe -std=gnu99
-Os -fweb -frename-registers -Wformat -Wstrict-aliasing -Wbounded
-fwrapv -fno-align-functions -fno-align-labels -falign-loops=4
-falign-jumps=4 -march=i486 -mpush-args -mpreferred-stack-boundary=2
-momit-leaf-frame-pointer -fhonour-copts iconv_no_i18n.o -o
.libs/iconv_no_i18n ../srclib/libicrt.a ../lib/.libs/libiconv.so.2.5
-L/usr/pkgsrc/converters/libiconv/work/.buildlink/lib -Wl,-rpath
-Wl,/usr/pkg/lib
../lib/.libs/libiconv.so.2.5: warning: strcpy() is almost always
misused, consider using strlcpy()
iconv_no_i18n.o: In function `subst_mb_to_uc_fallback':
iconv_no_i18n.c:(.text+0x4ce): warning: sprintf() is often misused,
consider using snprintf()
../lib/.libs/libiconv.so.2.5: undefined reference to `libcharset_relocate'
collect2: ld returned 1 exit status
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/converters/libiconv/work/libiconv-1.14/src


Linking libiconv against libcharset solved the problem. This is the
patch that I committed in pkgsrc:

--- lib/Makefile.in.orig        Sun Aug  7 17:47:39 2011
+++ lib/Makefile.in
@@ -68,7 +68,7 @@ OBJECTS_RES_no =
 all : libiconv.la

 libiconv.la : $(OBJECTS)
-       $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) -o libiconv.la
-rpath $(libdir) -version-info $(LIBICONV_VERSION_INFO) -no-undefined
$(OBJECTS)
+       $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) -o libiconv.la
-rpath $(libdir) -version-info $(LIBICONV_VERSION_INFO) -no-undefined
$(OBJECTS) libcharset.la

 iconv.lo : $(srcdir)/iconv.c $(srcdir)/converters.h \
            $(srcdir)/encodings.def $(srcdir)/encodings_aix.def
$(srcdir)/encodings_osf1.def $(srcdir)/encodings_dos.def
$(srcdir)/encodings_local.def \


However, I am not sure that this is the right solution. If it is
though, the patch should be added upstream. What do you think?

--Benny.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]