Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - error: conflicting types for `fseeko' both from stdio.h : (5 Items)
   
error: conflicting types for `fseeko' both from stdio.h  
compiling the package x11/gtk2 I got this error

 cc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/usr/pkg/lib\" -DGTK_DATADIR=\"/usr/pkg/share\" -
DGTK_DATA_PREFIX=\"/usr/pkg\" -DGTK_SYSCONFDIR=\"/usr/pkg/libdata\" -DGTK_VERSION=\"2.12.0\" -DGTK_BINARY_VERSION=\"2.10
.0\" -DGTK_HOST=\"i386-pc-nto-qnx6.3.0\" -DGTK_COMPILATION -DGTK_PRINT_BACKENDS=\"file,lpr\" "-
DGTK_PRINT_PREVIEW_COMMAND=\"evince --unlink-tempfile --preview --print-settings %s %f\"" -I../gtk -I../gdk -I../gdk-
pixbuf -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -
DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED -DG_DISABLE_CAST_CHECKS -D_REENTRANT -I/usr/src/HEAD/pkgsrc/x11/gtk2/work/.
buildlink/include/glib/glib-2.0 -I/usr/src/HEAD/pkgsrc/x11/gtk2/work/.buildlink/lib/glib-2.0/include -I/usr/src/HEAD/
pkgsrc/x11/gtk2/work/.buildlink/include/pango-1.0 -I/usr/src/HEAD/pkgsrc/x11/gtk2/work/.buildlink/include/cairo -I/usr/
src/HEAD/pkgsrc/x11/gtk2/work/.buildlink/include -I/usr/src/HEAD/pkgsrc/x11/gtk2/work/.buildlink/include/freetype2 -I/
usr/src/HEAD/pkgsrc/x11/gtk2/work/.buildlink/include/libpng12 -I/usr/src/HEAD/pkgsrc/x11/gtk2/work/.buildlink/include/
atk-1.0 -DPREFIX=\"/usr/pkg\" -O2 -Wall -MT gtkdialog.lo -MD -MP -MF .deps/gtkdialog.Tpo -c gtkdialog.c  -fPIC -DPIC -o 
.libs/gtkdialog.o
In file included from /usr/src/HEAD/pkgsrc/x11/gtk2/work/.buildlink/include/pango-1.0/pango/pango-utils.h:25,
                 from /usr/src/HEAD/pkgsrc/x11/gtk2/work/.buildlink/include/pango-1.0/pango/pango.h:45,
                 from ../gdk/gdktypes.h:33,
                 from ../gdk/gdkcolor.h:31,
                 from ../gdk/gdkcairo.h:23,
                 from ../gdk/gdk.h:30,
                 from gtkbutton.h:31,
                 from gtkdialog.c:30:
/usr/qnx632/target/qnx6/usr/include/stdio.h:260: error: conflicting types for `fseeko'
/usr/qnx632/target/qnx6/usr/include/stdio.h:188: error: previous declaration of `fseeko'

The workaround is to put an additional #include <stdio.h> at the beginning of the gtkdialog.c. So I was able to build 
gtk2. I do not have investigate the problem further, but there seem to be situations where the guards arround both of 
the fseeko are evaluated to true. IMHO this should not happen.

The system is a Momentics 6.3.2 with the pkgsrc utilities and
cc (GCC) 3.3.5 (qnx-nto).
Re: error: conflicting types for `fseeko' both from stdio.h  
On Thu, Dec 13, 2007 at 05:35:04AM -0500, Christian Leutloff wrote:
> compiling the package x11/gtk2 I got this error

My guess is something like this is happening:

# cat tst.c

#include <sys/platform.h>
#define _FILE_OFFSET_BITS 64
#include <stdio.h>

ie. something brings in <sys/target_nto.h> prior to setting
_FILE_OFFSET_BITS and off_t gets typedef'd to an int32_t
rather than an int64_t and the two prototypes in stdio.h no
longer match.

I'm still trying to figure out what the two prototypes in
stdio.h are trying to accomplish...


-seanb
Re: error: conflicting types for `fseeko' both from stdio.h  
> On Thu, Dec 13, 2007 at 05:35:04AM -0500, Christian Leutloff wrote:
> > compiling the package x11/gtk2 I got this error
> 
> My guess is something like this is happening:
> 
> # cat tst.c
> 
> #include <sys/platform.h>
> #define _FILE_OFFSET_BITS 64
> #include <stdio.h>
> 
> ie. something brings in <sys/target_nto.h> prior to setting
> _FILE_OFFSET_BITS and off_t gets typedef'd to an int32_t
> rather than an int64_t and the two prototypes in stdio.h no
> longer match.
> 
> I'm still trying to figure out what the two prototypes in
> stdio.h are trying to accomplish...

This also appears to be fixed in later <stdio.h>.

-seanb
Re: error: conflicting types for `fseeko' both from stdio.h  
Is it sufficient to get the newer stdio.h and unistd.h from the Source Code Repository of the QNX core?

Will you release a new pkgsrc_qnxutil package that contains these updated Header files? So anybody wishing to compile 
pkgsrc can do it by getting the latest code from the SVN plus the pkgsrc_qnxutil package.

Re: error: conflicting types for `fseeko' both from stdio.h  
On Mon, Dec 17, 2007 at 04:33:58AM -0500, Christian Leutloff wrote:
> Is it sufficient to get the newer stdio.h and unistd.h from the Source
> Code Repository of the QNX core?
> 
> Will you release a new pkgsrc_qnxutil package that contains these
> updated Header files? So anybody wishing to compile pkgsrc can do it by
> getting the latest code from the SVN plus the pkgsrc_qnxutil package.

I've updated the pkgsrc_qnxutil with a new <sys/platform.h>,
<unistd.h> and <stdio.h>.  The <stdio.h> issue actually
spans multiple headers but I've only fixed it locally for
now so it's possible another variant of the issue might
show up if not using the trunk headers from the os project.

-seanb