Trying to run gccxml-0.9.0 against a header file that just has
#include <set>
gives an error about weakrefs and static linkage (see the end of this email).
I've compiled gccxml (I checked it out yesterday from the cvs with the cvs
command 'co gccxml', so that's presumably the stable branch?) on the same RHEL3
machine, gcc3.2.3:
$ gcc --version
gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-59)
$ ./gccxml --version
GCC-XML version 0.9.0
$ ./gccxml_cc1plus --version
GNU C++ version 4.2.1 (gccxml.org) (x86_64-unknown-1-gnu)
compiled by GNU C version 3.2.3 20030502 (Red Hat Linux 3.2.3-59).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
This looks very similar to a problem reported at
http://www.cmake.org/pipermail/gccxml/2008-August/001171.html, but that was
against 3.4.6. I'm afraid I didn't quite follow the thread, but it looked as
if the original discussion about __GXX_WEAK__ being inconsistently defined was
not correct, and the fix was to patch the
gccxml-0.9/GCC/3.4/bits/gthr-default.h file.
But there isn't a gthr-default.h supplied for 3.2.3. I tried naively copying
/usr/include/c++/3.2.3/x86_64-redhat-linux/bits/gthr-default.h into the
gccxml/GCC/3.2 tree and applying the same patch, but unsurprisingly it didn't
work (error: stray '##' in program).
Can anyone help me?
James.
Original error below:
In file included from /usr/include/c++/3.2.3/x86_64-redhat-linux/bits/gthr.h:98,
from
/usr/include/c++/3.2.3/x86_64-redhat-linux/bits/c++io.h:37,
from /usr/include/c++/3.2.3/bits/fpos.h:44,
from /usr/include/c++/3.2.3/iosfwd:46,
from /usr/include/c++/3.2.3/bits/stl_algobase.h:70,
from
/mnt/hgfs/homejamesg/lonlnx6403/p4/jamesg_lonlnx6403/packages/linux-amd64-gcc_3_2/gccxml-0_9_0/share/gccxml-0.9/GCC/3.2/bits/stl_tree.h:
86,
from /usr/include/c++/3.2.3/set:66,
from only-includes-set.h:1:
/usr/include/c++/3.2.3/x86_64-redhat-linux/bits/gthr-default.h:50: error:
weakref 'int __gthrw_pthread_once(pthread_once_t*, void (*)())' must have
static linkage
/usr/include/c++/3.2.3/x86_64-redhat-linux/bits/gthr-default.h:51: error:
weakref 'int __gthrw_pthread_key_create(pthread_key_t*, void (*)(void*))' must
have static linkage
/usr/include/c++/3.2.3/x86_64-redhat-linux/bits/gthr-default.h:52: error:
weakref 'int __gthrw_pthread_key_delete(pthread_key_t)' must have static linkage
/usr/include/c++/3.2.3/x86_64-redhat-linux/bits/gthr-default.h:53: error:
weakref 'void* __gthrw_pthread_getspecific(pthread_key_t)' must have static
linkage
/usr/include/c++/3.2.3/x86_64-redhat-linux/bits/gthr-default.h:54: error:
weakref 'int __gthrw_pthread_setspecific(pthread_key_t, const void*)' must have
static linkage
/usr/include/c++/3.2.3/x86_64-redhat-linux/bits/gthr-default.h:55: error:
weakref 'int __gthrw_pthread_create(pthread_t*, const pthread_attr_t*, void*
(*)(void*), void*)' must have static linkage
/usr/include/c++/3.2.3/x86_64-redhat-linux/bits/gthr-default.h:57: error:
weakref 'int __gthrw_pthread_mutex_lock(pthread_mutex_t*)' must have static
linkage
/usr/include/c++/3.2.3/x86_64-redhat-linux/bits/gthr-default.h:58: error:
weakref 'int __gthrw_pthread_mutex_trylock(pthread_mutex_t*)' must have static
linkage
/usr/include/c++/3.2.3/x86_64-redhat-linux/bits/gthr-default.h:59: error:
weakref 'int __gthrw_pthread_mutex_unlock(pthread_mutex_t*)' must have static
linkage
--
Ring the bells that still can ring...
Forget your perfect offering.
There is a crack in everything
That's how the light gets in.
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.gccxml.org/mailman/listinfo/gccxml