Next pkgsrc problem

Well, as my mechanical friends say, I’ve moved the fail point. Now I’ve got pkgsrc (I hope), and I’m trying to bootstrap. I get a ways along and then:

configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
gcc -DHAVE_CONFIG_H -I. -I. -DHOST=\"i386-pc-nto-qnx6.3.2\" -DVERSION=\"20040821\" -I../libnbcompat -g -O2 -c process.c -o process.o
In file included from /usr/qnx630/target/qnx6/usr/include/net/if.h:113,
                 from /usr/qnx630/target/qnx6/usr/include/sys/sockio.h:46,
                 from /usr/qnx630/target/qnx6/usr/include/sys/ioctl.h:52,
                 from process.c:92:
/usr/qnx630/target/qnx6/usr/include/sys/socket.h:512: error: conflicting types for `restrict'
/usr/qnx630/target/qnx6/usr/include/sys/socket.h:512: error: previous declaration of `restrict'
/usr/qnx630/target/qnx6/usr/include/sys/socket.h:514: error: conflicting types for `restrict'
/usr/qnx630/target/qnx6/usr/include/sys/socket.h:514: error: previous declaration of `restrict'
/usr/qnx630/target/qnx6/usr/include/sys/socket.h:516: error: conflicting types for `restrict'
/usr/qnx630/target/qnx6/usr/include/sys/socket.h:516: error: previous declaration of `restrict'
/usr/qnx630/target/qnx6/usr/include/sys/socket.h:520: error: conflicting types for `restrict'
/usr/qnx630/target/qnx6/usr/include/sys/socket.h:520: error: previous declaration of `restrict'
/usr/qnx630/target/qnx6/usr/include/sys/socket.h:520: error: conflicting types for `restrict'
/usr/qnx630/target/qnx6/usr/include/sys/socket.h:520: error: previous declaration of `restrict'
*** Error code 1

Stop.
bmake: stopped in /root/pkgsrc/bootstrap/work/sed
===> exited with status 1
aborted.

The scary thing about this, of course, is that it’s all about stuff in qnx header files. So I really can’t go messing with them. I did look at them, and I really can’t see why it’s complaining. the various lines in socket.h are NOT defining restrict, they’re just using it.

Any ideas?

Thanks,
James

Did you install pkgsrc_qnxutil-0.14.tar.gz ?
See the bootstrap page and the download section.
And you’re on 6.3.2 right?

community.qnx.com/sf/wiki/do/vie … /Bootstrap

Yes.

I did.

Possibly not, depending on how you look at it. Here’s the result of qconfig:

/usr/include ># qconfig
QNX Installations

  Installation Name: QNX Momentics 6.3.0 Service Pack 3
            Version: 6.3.0 SP3
     Base Directory: /usr/qnx630/
           QNX_HOST: /usr/qnx630/host/qnx6/x86/
         QNX_TARGET: /usr/qnx630/target/qnx6/

Additional Packages

          Package Name: QNX Neutrino Core OS
               Version: 6.3.2
                  Base: QNX Momentics 6.3.0 SP1, SP2 or SP3
          Install Path: /usr/qnx630

So technically I’m on 6.3.0, Service Pack 3, with the 6.3.2 Core OS update.

In case you’re wondering about my version of gcc, mentioned on the bootstrap page, I’ve actually gotten rid of 2.9.x, and only 3.3.5 is on my stystem:

/root ># gcc --version
gcc (GCC) 3.3.5 (qnx-nto)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

/root ># qcc -V
cc: targets available in /usr/qnx630/host/qnx6/x86/etc/qcc:
        3.3.5,gcc_ntox86        (default)
        3.3.5,gcc_ntox86_acpp
        3.3.5,gcc_ntox86_acpp-ne
        3.3.5,gcc_ntox86_cpp
        3.3.5,gcc_ntox86_cpp-ne
        3.3.5,gcc_ntox86_ecpp
        3.3.5,gcc_ntox86_ecpp-ne
        3.3.5,gcc_ntox86_gpp

Thanks,
James

That’s not the same as 6.3.2 and that explain why you didn’t have SVN and I suspect you will have a bunch of other issues as well. You need to use Momentic 6.3.2.

Having no business case for spending another eight grand (or maybe half that if QSSL let’s me upgrade from SE) to spend on PE, I don’t see that happening. There’s no such thing as Momentics SE 6.3.2. And somehow I don’t see the situation getting any better with 6.4, though perhaps I’ll be pleasantly surprised.

Ah, well. Thanks, anyway, everyone.

-James Ingraham

From the GNU GCC documentation at gcc.gnu.org/onlinedocs/gcc-3.3.6 … nters.html

So why does socket.h have lines like this?

int getpeername __P((int, struct sockaddr * __restrict, socklen_t * __restrict));

And an even more difficult question; do I have the guts to go remove the __restrict modifiers out of a QNX system header file?

-James Ingraham

Why would you have to remove it? What’s the problem. It doesn’t have to be specify but it doesn’t hurt.

If you look at my first post, you’ll see it is in fact hurting me. I don’t know WHY it’s hurting me, but it’s hurting me. I can’t build pkgsrc with those lines in there.

Sure enough, if I remove the type modifiers from socket.h pkgsrc will contiune to build. In fact, pkgsrc appears to be working. At least, I managed to the example of a “bmake install” on figlet, and pkg_info does show it.

Success!(?)

-James Ingraham

Well it doesn’t seems to be working since you have to modify socket.h ;-)

Also you didn’t follow the bootstrap instruction. If set properly pkgsrc gcc is not used directly but qcc instead.

Actually, I DID follow the bootstrap instruction. You don’t get to switch pkgsrc to using qcc instead of gcc until AFTER it’s installed and you can modify the mk.conf. In the bootstrap process you’re stuck with gcc. I actually tried to force it to use qcc instead. I can’t remember now what didn’t work about that.

-James Ingraham