[adtools] Re: Preprocessor symbol clashes

  • From: Andrija Antonijevic <antony@xxxxxxxxxxxxxxxxx>
  • To: adtools@xxxxxxxxxxxxx
  • Date: Tue, 19 Jul 2005 23:15:51 +0200 (CEST)

On 19-Jul-2005, Thomas Frieden wrote:

Andrija Antonijevic wrote:

Since there were builds of the native compiler before, and I haven't seen anybody complaining, I'd like to know if that problem is known to others as well ?

I don't think I ever encountered that.

It might be related to the new clib2 headers, since they are likely to pull in exec/types.h at one point.

I don't remember when was the last time I built the native compiler with clib2, so it's possible.


cp-demangle.c:1408: error: static declaration of 'cplus_demangle_operators' follows non-static declaration
/home/thomas/source/gcc/libstdc++-v3/../libiberty/cp-demangle.h:135: error: previous declaration of 'cplus_demangle_operators' was here
cp-demangle.c:1749: error: static declaration of 'cplus_demangle_builtin_types' follows non-static declaration
/home/thomas/source/gcc/libstdc++-v3/../libiberty/cp-demangle.h:140: error: previous declaration of 'cplus_demangle_builtin_types' was here

Something's wrong with the build process there. This situation shouldn't arrise since it seems to be taken care of with CP_STATIC_IF_GLIBCPP_V3 define and redefinition of cplus_demangle_fill_name etc in cp-demangle.c:107 and so on. It is possible that your build directory has gone wrong somehow - perhaps doing a fresh configure and build in an empty directory might do the trick?

No, tried that. Removed everything, configured again, but the problem remains. I manually changed the files now to get it to compile...

I think this problem is unrelated to the first problem with STATIC, CONST etc since the definition reads


CP_STATIC_IF_GLIBCPP_V3
const struct demangle_operator_info cplus_demangle_operators[] = ...

and CP_STATIC_IF_GLIBCPP_V3 is defined as

#ifdef IN_GLIBCPP_V3
#define CP_STATIC_IF_GLIBCPP_V3 static
#else
#define CP_STATIC_IF_GLIBCPP_V3 extern
#endif

which should definitely be defined to "static" (and doesn't use STATIC) when libstdc++-v3 is being compiled. From <build-dir>/ppc-amigaos/libstdc++-v3/libsupc++/Makefile (newlib version, though):

cp-demangle.lo: cp-demangle.c
        $(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
cp-demangle.o: cp-demangle.c
        $(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<

Also, libstdc++-v3 is compiled both with clib2 and newlib includes so that shouldn't be a problem.

If not, there's something very strange going on and the next step would probably be to use the same line that the compiler is using to compile the file but with --verbose added or asking it to just preprocess the file to see if it will reveal anything interesting.

Preprocessing doesn't reveal anything, since the problem is probably somewhat preprocessor related...


Well, if it only happens for me, it's probably my installation...

I'll see to try compiling the native compiler with clib2 in the next few days to see if I get the same behaviour.


Andrija
______________________________________________________________________________
Amiga Development tools ML - //www.freelists.org/list/adtools
Homepage...................: http://www.sourceforge.net/projects/adtools
Listserver help............: mailto:adtools-request@xxxxxxxxxxxxx?Subject=HELP

Other related posts: