Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - pkg_install fails due to __restrict (from different include files!?): (3 Items)
   
pkg_install fails due to __restrict (from different include files!?)  
Hi,

due to the sync with HEAD I'll wade through all the updates. 

pkgtools/pkg_install fails with this error:

cc -DHAVE_CONFIG_H -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DDEF_UMASK=0022 -I/usr/src/HEAD/pkgsrc/
pkgtools/pkg_install/work/bzip2 -I/usr/src/HEAD/pkgsrc/pkgtools/pkg_install/work/zlib -I/usr/src/HEAD/pkgsrc/pkgtools/
pkg_install/work/libarchive/libarchive -DHAVE_NBCOMPAT_H=1 -I/usr/src/HEAD/pkgsrc/pkgtools/pkg_install/work/libnbcompat 
-I. -I. -I../lib -O2 -c main.c
In file included from /usr/qnx632/target/qnx6/usr/include/net/if.h:113,
                 from /usr/qnx632/target/qnx6/usr/include/sys/sockio.h:46,
                 from /usr/qnx632/target/qnx6/usr/include/sys/ioctl.h:52,
                 from main.c:40:
/usr/qnx632/target/qnx6/usr/include/sys/socket.h:512: error: conflicting types for `restrict'
/usr/qnx632/target/qnx6/usr/include/sys/socket.h:512: error: previous declaration of `restrict'
/usr/qnx632/target/qnx6/usr/include/sys/socket.h:514: error: conflicting types for `restrict'
/usr/qnx632/target/qnx6/usr/include/sys/socket.h:514: error: previous declaration of `restrict'
/usr/qnx632/target/qnx6/usr/include/sys/socket.h:516: error: conflicting types for `restrict'
/usr/qnx632/target/qnx6/usr/include/sys/socket.h:516: error: previous declaration of `restrict'
/usr/qnx632/target/qnx6/usr/include/sys/socket.h:520: error: conflicting types for `restrict'
/usr/qnx632/target/qnx6/usr/include/sys/socket.h:520: error: previous declaration of `restrict'
/usr/qnx632/target/qnx6/usr/include/sys/socket.h:520: error: conflicting types for `restrict'
/usr/qnx632/target/qnx6/usr/include/sys/socket.h:520: error: previous declaration of `restrict'
*** Error code 1

Stop.
bmake: stopped in /usr/src/HEAD/pkgsrc/pkgtools/pkg_install/work/pkg_install-20070927/info
*** Error code 1

config.h does define the flag used to load the __restrict from sys/cdefs.h
/* Define to 1 if you have the <sys/cdefs.h> header file. */
#define HAVE_SYS_CDEFS_H 1

Why has it worked to build the Bootstrap Binary Kit and now it fails to build!?

Bye
Christian
Re: pkg_install fails due to __restrict (from different include files !?)  
On Tue, Oct 23, 2007 at 01:05:56PM -0400, Christian Leutloff wrote:
> Hi,
> 
> due to the sync with HEAD I'll wade through all the updates. 
> 
> pkgtools/pkg_install fails with this error:

I believe this is a bug in our <sys/platform.h>.  If
I get consensus I'll update the pkgsrc_qnxutil archive.

Stay tuned.

-seanb
Re: pkg_install fails due to __restrict (from different include files !?)  
> On Tue, Oct 23, 2007 at 01:05:56PM -0400, Christian Leutloff wrote:
> > Hi,
> > 
> > due to the sync with HEAD I'll wade through all the updates. 
> > 
> > pkgtools/pkg_install fails with this error:
> 
> I believe this is a bug in our <sys/platform.h>.  If
> I get consensus I'll update the pkgsrc_qnxutil archive.
> 
> Stay tuned.
> 
> -seanb

Some more explanation.  I suspect you have cc linked to
ntox86-gcc-2.95.3 but gcc linked to ntox86-gcc-3.3.5.
gcc>=3 don't set __STDC_VERSION__ by default and our
<sys/platform.h> assumes __STDC_VERSION__=199901L in this
case which causes some other code to assume the C99
'restrict' keyword is supported.

-seanb