About this list Date view Thread view Subject view Author view Attachment view

From: Sam Vilain (sam_at_vilain.net)
Date: Wed 24 Apr 2002 - 18:41:25 BST


I'm getting this wierd compile error on one of my test machines:

linux10321:~/vserver/dist/vserver-0.17$ make
gcc -funsigned-char -Wall -g -DVERSION=\"0.17\" chcontext.cc syscall.o -o chcontext \
        -lstdc++
In file included from /usr/include/sys/wait.h:39,
                 from vutil.h:7,
                 from chcontext.cc:17:
/usr/include/bits/waitflags.h:26: warning: `WNOHANG' redefined
/usr/include/linux/wait.h:4: warning: this is the location of the previous definition
/usr/include/bits/waitflags.h:27: warning: `WUNTRACED' redefined
/usr/include/linux/wait.h:5: warning: this is the location of the previous definition
In file included from /usr/include/g++-2/alloc.h:21,
                 from /usr/include/g++-2/std/bastring.h:39,
                 from /usr/include/g++-2/string:6,
                 from vutil.h:8,
                 from chcontext.cc:17:
/usr/include/g++-2/stl_alloc.h:320: parse error before `.'
/usr/include/g++-2/stl_alloc.h:320: missing ';' before right brace
/usr/include/g++-2/stl_alloc.h:322: parse error before `.'
/usr/include/g++-2/stl_alloc.h: In function `size_t ROUND_UP(size_t)':
/usr/include/g++-2/stl_alloc.h:325: parse error before `.'
/usr/include/g++-2/stl_alloc.h:325: parse error before `.'
/usr/include/g++-2/stl_alloc.h:326: warning: control reaches end of non-void function `ROUND_UP(size_t)'
/usr/include/g++-2/stl_alloc.h: At top level:
/usr/include/g++-2/stl_alloc.h:327: parse error before `private'
/usr/include/g++-2/stl_alloc.h:331: parse error before `}'
/usr/include/g++-2/stl_alloc.h: In function `size_t FREELIST_INDEX(size_t)':
/usr/include/g++-2/stl_alloc.h:340: parse error before `.'
/usr/include/g++-2/stl_alloc.h:341: warning: control reaches end of non-void function `FREELIST_INDEX(size_t)'
/usr/include/g++-2/stl_alloc.h: In method `lock::lock()':
/usr/include/g++-2/stl_alloc.h:382: `threads' undeclared (first use this function)
/usr/include/g++-2/stl_alloc.h:382: (Each undeclared identifier is reported only once
/usr/include/g++-2/stl_alloc.h:382: for each function it appears in.)
/usr/include/g++-2/stl_alloc.h: In method `lock::~lock()':
/usr/include/g++-2/stl_alloc.h:383: confused by earlier errors, bailing out
make: *** [chcontext] Error 1
linux10321:~/vserver/dist/vserver-0.17$

Any ideas? Something odd seems to be going wrong with the `#include <string>' in vutils.h

Versions 0.16 and 0.14 have a different problem:

linux10321:~/vserver/dist/vserver-0.16$ make
g++ -c -o syscall.o syscall.cc
gcc -funsigned-char -Wall -g -DVERSION=\"0.16\" chbind.cc syscall.o -o chbind
/tmp/cc1gxINB.o: In function `__rb_tree_base_iterator::decrement(void)':
/usr/include/g++-2/stl_tree.h(.__malloc_alloc_template<0>::gnu.linkonce.t.oom_malloc(unsigned int)+0x17): undefined reference to `endl(ostream &)'
/usr/include/g++-2/stl_tree.h(.__malloc_alloc_template<0>::gnu.linkonce.t.oom_malloc(unsigned int)+0x21): undefined reference to `cerr'
/usr/include/g++-2/stl_tree.h(.__malloc_alloc_template<0>::gnu.linkonce.t.oom_malloc(unsigned int)+0x26): undefined reference to `ostream::operator<<(char const *)'
/usr/include/g++-2/stl_tree.h(.__malloc_alloc_template<0>::gnu.linkonce.t.oom_malloc(unsigned int)+0x31): undefined reference to `ostream::operator<<(ostream &(*)(ostream &))'
/usr/include/g++-2/stl_tree.h(.basic_string<char, string_char_traits<char>, __default_alloc_template<1, 0> >::Rep::gnu.linkonce.t.copy(unsigned int, char const *, unsigned int)+0x2a): undefined reference to `string_char_traits<char>::copy(char *, char const *, unsigned int)'
/usr/include/g++-2/stl_tree.h(.basic_string<char, string_char_traits<char>, __default_alloc_template<1, 0> >::Rep::gnu.linkonce.t.move(unsigned int, char const *, unsigned int)+0x2a): undefined reference to `string_char_traits<char>::move(char *, char const *, unsigned int)'
/usr/include/g++-2/stl_tree.h(.basic_string<char, string_char_traits<char>, __default_alloc_template<1, 0> >::gnu.linkonce.t.replace(unsigned int, unsigned int, char const *, unsigned int)+0x2e): undefined reference to `__out_of_range(char const *)'
/tmp/cc1gxINB.o: In function `chbind_devexist(char const *)':
/home/sv/vserver/dist/vserver-0.16/chbind.cc:39: undefined reference to `__length_error(char const *)'
/home/sv/vserver/dist/vserver-0.16/chbind.cc:35: undefined reference to `__out_of_range(char const *)'
/home/sv/vserver/dist/vserver-0.16/chbind.cc:40: undefined reference to `__length_error(char const *)'
/tmp/cc1gxINB.o: In function `ifconfig_getaddr(char const *, unsigned long &, unsigned long &)':
/home/sv/vserver/dist/vserver-0.16/chbind.cc:75: undefined reference to `string_char_traits<char>::assign(char &, char const &)'
/home/sv/vserver/dist/vserver-0.16/chbind.cc:87: undefined reference to `string_char_traits<char>::assign(char &, char const &)'
/tmp/cc1gxINB.o: In function `__rb_tree_base_iterator::decrement(void)':
/usr/include/g++-2/stl_tree.h(.basic_string<char, string_char_traits<char>, __default_alloc_template<1, 0> >::gnu.linkonce.t.compare(basic_string<char, string_char_traits<char>, __default_alloc_template<1, 0> > const &, unsigned int, unsigned int) const+0x26): undefined reference to `__out_of_range(char const *)'
/tmp/cc1gxINB.o: In function `chbind_devexist(char const *)':
/home/sv/vserver/dist/vserver-0.16/chbind.cc:40: undefined reference to `string_char_traits<char>::compare(char const *, char const *, unsigned int)'
/tmp/cc1gxINB.o: In function `__rb_tree_base_iterator::decrement(void)':
/usr/include/g++-2/stl_tree.h(.gnu.linkonce.t.__ls__H3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b1i0_R7ostreamRCt12basic_string3ZX01ZX11ZX21_R7ostream+0x26): undefined reference to `ostream::write(char const *, int)'
/tmp/cc1gxINB.o: In function `chbind_devexist(char const *)':
/home/sv/vserver/dist/vserver-0.16/chbind.cc:35: undefined reference to `__out_of_range(char const *)'
collect2: ld returned 1 exit status
make: *** [chbind] Error 1

The latest version I could compile on that machine was 0.13.

On a later release of RedHat (7.1 instead of 6.2), it compiles fine.


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 06 Nov 2002 - 07:03:40 GMT by hypermail 2.1.3