Using GCC 3.3.1 on QNX NC 6.3.0

bridged with qnx.development_tools
Evan Hillas

Using GCC 3.3.1 on QNX NC 6.3.0

Post by Evan Hillas » Sun Jun 05, 2005 3:09 am

Help!

I've just had a shot at configuring and compiling BOINC which requires GCC 3.x to build it but can't figure out how to convince the "expired" Momentics kit to use GCC 3.3.1 instead of GCC 2.95.3.

I've installed both autoconf 2.59 and automake 1.9.4 which are also needed, thanks heaps to lmike for those.

I tried setting the date back to July 2004 so I could use "qcc -V3.3.1,gcc_ntox86 -set-default" but ./configure didn't like the date. :( So now I'm looking for how to change the setup without qcc.


Evan

Igor Kovalenko

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by Igor Kovalenko » Tue Jun 07, 2005 4:58 am

I am not sure what the trouble is. If you have GCC3.3.1 installed already,
why do you need qcc at all? Just set CC to gcc and go.

"Evan Hillas" <evanh@clear.net.nz> wrote in message
news:d7tprf$9qv$1@inn.qnx.com...
Help!

I've just had a shot at configuring and compiling BOINC which requires GCC
3.x to build it but can't figure out how to convince the "expired"
Momentics kit to use GCC 3.3.1 instead of GCC 2.95.3.

I've installed both autoconf 2.59 and automake 1.9.4 which are also
needed, thanks heaps to lmike for those.

I tried setting the date back to July 2004 so I could use
"qcc -V3.3.1,gcc_ntox86 -set-default" but ./configure didn't like the
date. :( So now I'm looking for how to change the setup without qcc.


Evan

John Nagle

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by John Nagle » Tue Jun 07, 2005 6:40 am

Yes. "qcc" isn't a compiler. It's just a program that invokes
"gcc", but uses different options to be more POSIX-like and
work better for multi-target builds. "gcc" is doing all the work.

You could replace "qcc" and "QCC" with a small shell script.

John Nagle

Igor Kovalenko wrote:
I am not sure what the trouble is. If you have GCC3.3.1 installed already,
why do you need qcc at all? Just set CC to gcc and go.

"Evan Hillas" <evanh@clear.net.nz> wrote in message
news:d7tprf$9qv$1@inn.qnx.com...

Help!

I've just had a shot at configuring and compiling BOINC which requires GCC
3.x to build it but can't figure out how to convince the "expired"
Momentics kit to use GCC 3.3.1 instead of GCC 2.95.3.

I've installed both autoconf 2.59 and automake 1.9.4 which are also
needed, thanks heaps to lmike for those.

I tried setting the date back to July 2004 so I could use
"qcc -V3.3.1,gcc_ntox86 -set-default" but ./configure didn't like the
date. :( So now I'm looking for how to change the setup without qcc.


Evan

Evan Hillas

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by Evan Hillas » Tue Jun 07, 2005 10:27 am

Okay, that made a difference. I linked gcc and qcc to ntox86-gcc-3.3.1 and linked g++ to ntox86-g++-3.3.1. CC, cc, and some others all linked themselves to qcc already.

Now I'm getting wacky errors that didn't happen with gcc 2.95. ./configure aborts early with the following message:

# checking how to run the C++ preprocessor... /lib/cpp
# configure: error: C++ preprocessor "/lib/cpp" fails sanity check
# See `config.log' for more details.


And looking at config.log we see many worries:

=========================================================
....

Thread model: posix
gcc version 3.3.1 (qnx-nto)
configure:2548: $? = 0
configure:2550: gcc -V </dev/null >&5
gcc: `-V' option must have argument

....

configure:3012: gcc -c -g -O2 conftest.c >&5
conftest.c:2: error: parse error before "me"
configure:3018: $? = 1
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif

....

configure:3593: g++ -c -g -O2 conftest.cc >&5
conftest.cc:13:20: no include path in which to find stdlib.h
conftest.cc: In function `int main()':
conftest.cc:17: error: `exit' undeclared (first use this function)
conftest.cc:17: error: (Each undeclared identifier is reported only once for
each function it appears in.)

....

configure:5638: /lib/cpp conftest.cc
../configure: /lib/cpp: not found

....
=========================================================

The last two errors repeat many times with pieces of header files in between.


Evan

Igor Kovalenko

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by Igor Kovalenko » Tue Jun 07, 2005 6:13 pm

You may be getting wacky errors due to linking. Do not 'fix' anything by
linking - it is likely to bite you because things would 'half-work'. The GCC
compiler is pretty specific about how it is installed and where to look for
things. If something does not work, then it's not going to work until you do
it right.

I would start with making sure that GCC 3.3.1 invoked by intself manually
and without any involvement of qcc or anything else, can actually compile
and link a simple hello world (c and c++ versions). Once you get past that,
it should get easier.

-- igor

"Evan Hillas" <evanh@clear.net.nz> wrote in message
news:d83s6i$ndi$1@inn.qnx.com...
Okay, that made a difference. I linked gcc and qcc to ntox86-gcc-3.3.1
and linked g++ to ntox86-g++-3.3.1. CC, cc, and some others all linked
themselves to qcc already.

Now I'm getting wacky errors that didn't happen with gcc 2.95.
./configure aborts early with the following message:

# checking how to run the C++ preprocessor... /lib/cpp
# configure: error: C++ preprocessor "/lib/cpp" fails sanity check
# See `config.log' for more details.


And looking at config.log we see many worries:

=========================================================
...

Thread model: posix
gcc version 3.3.1 (qnx-nto)
configure:2548: $? = 0
configure:2550: gcc -V </dev/null >&5
gcc: `-V' option must have argument

...

configure:3012: gcc -c -g -O2 conftest.c >&5
conftest.c:2: error: parse error before "me"
configure:3018: $? = 1
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif

...

configure:3593: g++ -c -g -O2 conftest.cc >&5
conftest.cc:13:20: no include path in which to find stdlib.h
conftest.cc: In function `int main()':
conftest.cc:17: error: `exit' undeclared (first use this function)
conftest.cc:17: error: (Each undeclared identifier is reported only once
for each function it appears in.)

...

configure:5638: /lib/cpp conftest.cc
./configure: /lib/cpp: not found

...
=========================================================

The last two errors repeat many times with pieces of header files in
between.


Evan

Mike Gorchak

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by Mike Gorchak » Wed Jun 08, 2005 5:52 am

Hello, Evan!

EH> Now I'm getting wacky errors that didn't happen with gcc 2.95.
EH> ./configure aborts early with the following message:

Evanh, back your different gcc links back to the default settings.

Building QOpenCD packages I'm using some magic setup before running
../configure, your magic setup must be like this:

CFLAGS="-I/usr/include" CXXFALGS="-I/usr/include" LDFLAGS="-I/usr/lib"
CC="gcc -V3.3.1" ./confgiure --prefix=/usr ... etc settings.



With best regards, Mike Gorchak. E-mail: mike@malva.com.ua

Evan Hillas

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by Evan Hillas » Wed Jun 08, 2005 11:39 am

Mike Gorchak wrote:
Hello, Evan!
Hey, hey! :)

EH> Now I'm getting wacky errors that didn't happen with gcc 2.95.
EH> ./configure aborts early with the following message:

Evanh, back your different gcc links back to the default settings.
Done.

Building QOpenCD packages I'm using some magic setup before running
./configure, your magic setup must be like this:

CFLAGS="-I/usr/include" CXXFALGS="-I/usr/include" LDFLAGS="-I/usr/lib"
CC="gcc -V3.3.1" ./confgiure --prefix=/usr ... etc settings.
Okay, different results again ...

....

# checking for gcc... gcc -V3.3.1
# checking for C compiler default output file name... configure: error: C compiler cannot create executables
# See `config.log' for more details.

I just found the --help :) but still lost :(


Evan

Evan Hillas

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by Evan Hillas » Wed Jun 08, 2005 11:41 am

Igor Kovalenko wrote:
I would start with making sure that GCC 3.3.1 invoked by intself manually
and without any involvement of qcc or anything else, can actually compile
and link a simple hello world (c and c++ versions). Once you get past that,
it should get easier.
Here's the basic "hello world" one liner ...

# gcc test.c -o test -V3.3.1
gcc: installation problem, cannot exec `cpp0': No such file or directory
gcc: file path prefix `/usr/qnx630/host/qnx6/x86/usr/lib/gcc-lib/ntox86/3.3.1/'
never used

That looks familiar. :(


Evan

Mike Gorchak

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by Mike Gorchak » Thu Jun 09, 2005 9:09 am

Hello, Evan!

EH> Okay, different results again ...

EH> # checking for gcc... gcc -V3.3.1
EH> # checking for C compiler default output file name... configure: error:
EH> C compiler cannot create executables # See `config.log' for more
EH> details.

Did you saw config.log as suggested ? :) There we can see, that gcc
configuration (specs) is broken under QNX 6.3.0 SP1 (why I am not surprised
?)

With best regards, Mike Gorchak. E-mail: mike@malva.com.ua

Evan Hillas

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by Evan Hillas » Thu Jun 09, 2005 10:35 am


Evan Hillas

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by Evan Hillas » Thu Jun 09, 2005 10:41 am

btw: GCC 2.95 works just fine for HelloWorld and ./configure completes but the compile fails some way in, which I assume to be due to lack of features in 2.95.


Evan

Mike Gorchak

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by Mike Gorchak » Thu Jun 09, 2005 10:49 am

Hello, Evan!

Evan, I know what it's content :) No need to send it ;)

configure:2579: gcc -V3.3.1 -I/usr/include -I/usr/lib conftest.c >&5
gcc: installation problem, cannot exec `cpp0': No such file or directory
gcc: file path prefix
`/usr/qnx630/host/qnx6/x86/usr/lib/gcc-lib/ntox86/3.3.1/' never used

and right now check the directory
/usr/qnx630/host/qnx6/x86/usr/lib/gcc-lib/ntox86/3.3.1/ existance, and then
try to find cpp0 from 3.3.1 :)

With best regards, Mike Gorchak. E-mail: mike@malva.com.ua

Evan Hillas

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by Evan Hillas » Thu Jun 09, 2005 11:01 am

Mike Gorchak wrote:
and right now check the directory
/usr/qnx630/host/qnx6/x86/usr/lib/gcc-lib/ntox86/3.3.1/ existance, and then
try to find cpp0 from 3.3.1 :)
Ahh, I see. True, there is no such dir.

There is /usr/qnx630/host/qnx6/x86/usr/lib/gcc-lib/i386-pc-nto-qnx6.3.0/3.3.1
but it does not contain file cpp0. There is two rather large files named cc1 and cc1plus that look promising ... how to specify them?


Evan

Evan Hillas

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by Evan Hillas » Thu Jun 09, 2005 11:05 am

And, yes, this setup is indeed 6.3.0sp1


Evan

Colin Burgess

Re: Using GCC 3.3.1 on QNX NC 6.3.0

Post by Colin Burgess » Thu Jun 09, 2005 12:44 pm

For kicks try ntox86-gcc-3.3.1 instead of gcc (without the -V3.3.1)

Evan Hillas wrote:
And, yes, this setup is indeed 6.3.0sp1


Evan
--
cburgess@qnx.com

Post Reply

Return to “qnx.development_tools”