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

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

[bug-gnu-libiconv] Build failure on WinCE


From: Pierre Ynard
Subject: [bug-gnu-libiconv] Build failure on WinCE
Date: Fri, 13 Nov 2009 21:17:52 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

Hello,

The WinCE platform lacks a few headers, for instance errno.h, locale.h
and signal.h. While the use of errno is so pervasive that you would
rather patch your build environment to support it, the other ones are
generally not a big problem. The patch I just sent fixes the problem
with locale.h. With that patch, libiconv version 1.12 builds just fine.
However, version 1.13.1 fails to build here without a proper signal.h.

First, because of a missing SIGPIPE, stdio stuff is rebuilt, but this
fails with:

make[3]: Entering directory 
`/home/linkfanel/svn/vlc/extras/contrib/src/libiconv/srclib'
arm-mingw32ce-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I.. -I../lib  
-I../intl -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 
-I/home/linkfanel/svn/vlc/extras/contrib/include  -DNDEBUG -isystem 
/home/linkfanel/svn/vlc/extras/contrib/include  
-I/home/linkfanel/svn/vlc/extras/contrib/include  -DNDEBUG -isystem 
/home/linkfanel/svn/vlc/extras/contrib/include -c areadlink.c
In file included from 
/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.1.0/../../../../arm-mingw32ce/include/stdlib.h:21,
                 from ./stdlib.h:34,
                 from 
/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.1.0/../../../../arm-mingw32ce/include/stdio.h:35,
                 from ./stdio.h:35,
                 from /home/linkfanel/svn/vlc/extras/contrib/include/errno.h:76,
                 from ./errno.h:27,
                 from areadlink.c:28:
./stdio.h:109: error: expected ')' before '*' token
./stdio.h:128: error: expected ')' before '*' token
./stdio.h:475: error: expected declaration specifiers or '...' before 'FILE'
./stdio.h:481: error: expected declaration specifiers or '...' before 'FILE'
./stdio.h:493: error: expected declaration specifiers or '...' before 'FILE'
./stdio.h:505: error: expected declaration specifiers or '...' before 'FILE'
In file included from ./stdio.h:35,
                 from /home/linkfanel/svn/vlc/extras/contrib/include/errno.h:76,
                 from ./errno.h:27,
                 from areadlink.c:28:
/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.1.0/../../../../arm-mingw32ce/include/stdio.h:295:
 error: static declaration of '__printf__' follows non-static declaration
./stdio.h:150: error: previous declaration of '__printf__' was here
/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.1.0/../../../../arm-mingw32ce/include/stdio.h:321:
 error: static declaration of 'rpl_vprintf' follows non-static declaration
./stdio.h:176: error: previous declaration of 'rpl_vprintf' was here
/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.1.0/../../../../arm-mingw32ce/include/stdio.h:396:
 error: conflicting types for 'rpl_fputc'
./stdio.h:481: error: previous declaration of 'rpl_fputc' was here
/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.1.0/../../../../arm-mingw32ce/include/stdio.h:397:
 error: conflicting types for 'rpl_fputs'
./stdio.h:493: error: previous declaration of 'rpl_fputs' was here
/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.1.0/../../../../arm-mingw32ce/include/stdio.h:453:
 error: conflicting types for 'rpl_fputc'
./stdio.h:481: error: previous declaration of 'rpl_fputc' was here
/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.1.0/../../../../arm-mingw32ce/include/stdio.h:464:
 error: conflicting types for 'rpl_fwrite'
./stdio.h:505: error: previous declaration of 'rpl_fwrite' was here
make[3]: *** [areadlink.o] Error 1
make[3]: Leaving directory 
`/home/linkfanel/svn/vlc/extras/contrib/src/libiconv/srclib'

Then, errors due to missing signal.h declarations:

arm-mingw32ce-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I.. -I../lib  
-I../intl -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 
-I/home/linkfanel/svn/vlc/extras/contrib/include  -DNDEBUG -isystem 
/home/linkfanel/svn/vlc/extras/contrib/include  
-I/home/linkfanel/svn/vlc/extras/contrib/include  -DNDEBUG -isystem 
/home/linkfanel/svn/vlc/extras/contrib/include -c sigprocmask.c
In file included from ./signal.h:34,
                 from sigprocmask.c:21:
/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.1.0/../../../../arm-mingw32ce/include/signal.h:12:26:
 error: no include path in which to search for signal.h
In file included from sigprocmask.c:21:
./signal.h:110: error: conflicting types for 'sigset_t'
/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.1.0/../../../../arm-mingw32ce/include/sys/types.h:95:
 error: previous declaration of 'sigset_t' was here
sigprocmask.c:64: error: 'SIG_DFL' undeclared here (not in a function)
sigprocmask.c: In function 'ext_signal':
sigprocmask.c:80: warning: return makes pointer from integer without a cast
sigprocmask.c: In function 'sigismember':
sigprocmask.c:93: error: 'SIGABRT' undeclared (first use in this function)
sigprocmask.c:93: error: (Each undeclared identifier is reported only once
sigprocmask.c:93: error: for each function it appears in.)
sigprocmask.c: In function 'sigaddset':
sigprocmask.c:116: error: 'SIGABRT' undeclared (first use in this function)
sigprocmask.c: In function 'sigdelset':
sigprocmask.c:136: error: 'SIGABRT' undeclared (first use in this function)
sigprocmask.c: In function 'sigprocmask':
sigprocmask.c:232: error: 'SIG_ERR' undeclared (first use in this function)
sigprocmask.c: In function 'rpl_signal':
sigprocmask.c:273: error: 'SIG_ERR' undeclared (first use in this function)
sigprocmask.c:277: error: 'SIGABRT' undeclared (first use in this function)
sigprocmask.c: In function 'rpl_raise':
sigprocmask.c:321: error: 'SIG_IGN' undeclared (first use in this function)
make[3]: *** [sigprocmask.o] Error 1

It seems to me that the "error: previous declaration of 'sigset_t' was
here" is due to a bug in the configure test that checks for sigset_t,
that assumes there is always a signal.h. The rest is just missing stuff.

Applying this patch makes libiconv build for me:

diff -urNp libiconv.orig/configure libiconv/configure
--- libiconv.orig/configure     2009-06-30 22:51:53.000000000 +0200
+++ libiconv/configure  2009-11-12 04:41:02.000000000 +0100
@@ -20344,6 +20344,7 @@ rm -f conftest*
 
 
 fi
+gl_cv_header_signal_h_SIGPIPE=yes
 { $as_echo "$as_me:$LINENO: result: $gl_cv_header_signal_h_SIGPIPE" >&5
 $as_echo "$gl_cv_header_signal_h_SIGPIPE" >&6; }
 
@@ -23459,7 +23460,6 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <signal.h>
 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
 #include <sys/types.h>
 
diff -urNp libiconv.orig/signal.h libiconv/signal.h
--- libiconv.orig/signal.h      1970-01-01 01:00:00.000000000 +0100
+++ libiconv/signal.h   2009-11-12 04:39:24.000000000 +0100
@@ -0,0 +1,11 @@
+#ifndef        _SIGNAL_H_
+#define        _SIGNAL_H_
+
+#define        SIGABRT         22      /* Abnormal termination (abort) */
+
+typedef        void (*__p_sig_fn_t)(int);
+#define        SIG_DFL ((__p_sig_fn_t) 0)
+#define        SIG_IGN ((__p_sig_fn_t) 1)
+#define        SIG_ERR ((__p_sig_fn_t) -1)
+
+#endif /* Not _SIGNAL_H_ */

I use the mingw32ce toolchain from the CeGCC project.

Regards,

-- 
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."




reply via email to

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