pkgsrc-Bugs archive

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

pkg/38674: libarchive broken on IRIX



>Number:         38674
>Category:       pkg
>Synopsis:       libarchive broken on IRIX
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 16 20:25:00 +0000 2008
>Originator:     Tobias Nygren
>Release:        n/a
>Organization:
>Environment:
IRIX irixbulk 6.5 07202013 IP32
>Description:
Build of pkg_install fails with:

libarchive/archive_string.c:261: error: wcrtomb undeclared (first use in this 
function)

The problem is that even though wchar.h exists, there is no prototype for 
wcrtomb() in the preprocessed output. It does exist in libc, though.

wchar.h contains this rather cryptic statement:
--8<--8<--8<--
#if (_MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64)
__SGI_LIBC_USING_FROM_STD(mbrlen)
__SGI_LIBC_USING_FROM_STD(mbrtowc)
__SGI_LIBC_USING_FROM_STD(wcrtomb)
#endif
--8<--8<--8<--

>How-To-Repeat:
build pkg_install on IRIX using gcc.

>Fix:
Following patch makes pkg_install build.

Index: archive_string.c
===================================================================
RCS file: 
/cvsroot/pkgsrc/archivers/libarchive/files/libarchive/archive_string.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 archive_string.c
--- archive_string.c    25 Apr 2008 15:07:25 -0000      1.1.1.3
+++ archive_string.c    16 May 2008 18:10:48 -0000
@@ -39,6 +39,10 @@
 #endif
 #ifdef HAVE_WCHAR_H
 #include <wchar.h>
+#if defined(__sgi)
+/* Not in wchar.h? prototype taken from mbrchar(3S) */
+size_t wcrtomb(char *s, wchar_t wchar, mbstate_t *ps);
+#endif
 #endif
 
 #include "archive_private.h"



Home | Main Index | Thread Index | Old Index