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
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
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
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
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
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
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
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
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
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
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
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
And, yes, this setup is indeed 6.3.0sp1
Evan
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
Colin Burgess wrote:
For kicks try ntox86-gcc-3.3.1 instead of gcc (without the -V3.3.1)
Cool, ./configure works now.
“make” next … it fails on the very first compile.
================================================================
make[2]: Entering directory /root/progs/boinc_public/api' source='boinc_api.C' object='boinc_api.o' libtool=no \ DEPDIR=.deps depmode=gcc /bin/sh ../depcomp \ g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../api -I../db -I../RSAEuro/source -I../client -I../tools -I../sched -include ../config.h -D__NO_CTYPE -I../lib - I../api -I../db -I../RSAEuro/source -I../client -I../tools -I../sched -include ../config.h -I/usr/include -c -o boinc_api.o boinc_api.C In file included from boinc_api.C:41: .../lib/diagnostics.h:152: warning: invalid character in macro parameter name .../lib/diagnostics.h:152: badly punctuated parameter list in
#define’
make[2]: *** [boinc_api.o] Error 1
================================================================
I’m guessing I’m getting into portability territory now. Here is line 152 from …/lib/diagnostics.h
#define BOINCTRACE(…)
I’m afraid that three dots not something I’m familiar with - removed.
Next error:
================================================================
boinc_api.C: In function int set_worker_timer()': boinc_api.C:668:
SA_RESTART’ undeclared (first use this function)
boinc_api.C:668: (Each undeclared identifier is reported only once
boinc_api.C:668: for each function it appears in.)
================================================================
It don’t make much sense but ped says that line 668 is the first line of the following:
struct sigaction sa;
itimerval value;
sa.sa_handler = timer_signal_handler;
sa.sa_flags = SA_RESTART;
retval = sigaction(SIGALRM, &sa, NULL);
Bedtime calls … night all.
Evan
Evan Hillas wrote:
Colin Burgess wrote:
For kicks try ntox86-gcc-3.3.1 instead of gcc (without the -V3.3.1)
Cool, ./configure works now. >
“make” next … it fails on the very first compile. >
================================================================
make[2]: Entering directory /root/progs/boinc_public/api' source='boinc_api.C' object='boinc_api.o' libtool=no \ DEPDIR=.deps depmode=gcc /bin/sh ../depcomp \ g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../api -I../db -I../RSAEuro/source -I../client -I../tools -I../sched -include ../config.h -D__NO_CTYPE -I../lib - I../api -I../db -I../RSAEuro/source -I../client -I../tools -I../sched -include ../config.h -I/usr/include -c -o boinc_api.o boinc_api.C In file included from boinc_api.C:41: ../lib/diagnostics.h:152: warning: invalid character in macro parameter name ../lib/diagnostics.h:152: badly punctuated parameter list in
#define’
make[2]: *** [boinc_api.o] Error 1
================================================================
Now it’s switched to using g++ again - try forcing it to use
ntox86-g+±3.3.1
I’m guessing I’m getting into portability territory now. Here is line
152 from …/lib/diagnostics.h
#define BOINCTRACE(…)
I’m afraid that three dots not something I’m familiar with - removed.
Next error:
================================================================
boinc_api.C: In function int set_worker_timer()': boinc_api.C:668:
SA_RESTART’ undeclared (first use this function)
boinc_api.C:668: (Each undeclared identifier is reported only once
boinc_api.C:668: for each function it appears in.)
================================================================
It don’t make much sense but ped says that line 668 is the first line of
the following:
struct sigaction sa;
itimerval value;
sa.sa_handler = timer_signal_handler;
sa.sa_flags = SA_RESTART;
retval = sigaction(SIGALRM, &sa, NULL);
QNX doesn’t support SA_RESTART - although we USED to have it defined in
our headers.
–
cburgess@qnx.com
I solved the version issue completely I think, the final piece was to define CPPFLAGS instead of CFLAGS + CXXFLAGS
So the final configure command looks like this:
CPPFLAGS="-I/usr/include" LDFLAGS="-I/usr/lib" CC=“ntox86-gcc-3.3.1” CXX=“ntox86-g+±3.3.1” ./configure
Now back to making, the error list has simply exploded. I’m getting a little worried this is requiring a lot more infrastructure than QNX is providing.
Here is just the start of pages and pages of errors for the API compile …
make[2]: Entering directory /root/progs/boinc_public/api' if ntox86-g++-3.3.1 -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../api -I../db -I.. /RSAEuro/source -I../client -I../tools -I../sched -include ../config.h -I/usr/ include -D__NO_CTYPE -I../lib -I../api -I../db -I../RSAEuro/source -I../client - I../tools -I../sched -include ../config.h -g -O2 -MT boinc_api.o -MD -MP -MF ".deps/boinc_api.Tpo" -c -o boinc_api.o boinc_api.C; \ then mv -f ".deps/boinc_api.Tpo" ".deps/boinc_api.Po"; else rm -f ".deps/boinc_a pi.Tpo"; exit 1; fi In file included from ../config.h:370, from <command line>:24: .../lib/std_fixes.h:56:21: algorithm: No such file or directory .../lib/std_fixes.h:57:20: iterator: No such file or directory In file included from ../config.h:370, from <command line>:24: .../lib/std_fixes.h:96: error:
std::FILE* fopen(const char*, const char*)’
conflicts with previous using declaration std::FILE* std::fopen(const char*, const char*)' .../lib/std_fixes.h:96: error:
std::FILE* fopen(const char*, const char*)’
conflicts with used function
/usr/include/stdio.h:211: error: std::FILE* std::fopen(const char*, const char*)' previously declared here .../lib/std_fixes.h:97: error:
std::FILE* freopen(const char*, const char*,
std::FILE*)’ conflicts with previous using declaration std::FILE* std::freopen(const char*, const char*, std::FILE*)' .../lib/std_fixes.h:97: error:
std::FILE* freopen(const char*, const char*,
std::FILE*)’ conflicts with used function
And here’s lines 55, 56 and 57 from “…/lib/std_fixes.h”
#ifndef HAVE_STD_TRANSFORM
#include
#include
Umm, maybe a missing c++ include path me thinks …
Evan
Hello, Evan!
EH> So the final configure command looks like this:
EH> CPPFLAGS="-I/usr/include" LDFLAGS="-I/usr/lib" CC=“ntox86-gcc-3.3.1”
EH> CXX=“ntox86-g+±3.3.1” ./configure
My congrats, you have throw away the C and C++ flags and adds the
preprocessor flags only.
With best regards, Mike Gorchak. E-mail: mike@malva.com.ua