[sigc] Re: [gtkmm] Problems compiling libsigc++-2.0.3 on Slackware



Am 03.08.2004 08:13:45 schrieb(en) Juergen Rose:
Hi Martin,

On Mon, 2004-08-02 at 18:23 +0200, Martin Schulze wrote:
> Am 01.08.2004 23:00:28 schrieb(en) Juergen Rose:
> > Hi all,
> >
> > I cannot build libsigc++-2.0.3 on Slackware-9.1 updated to
gcc-3.3.2
>
> The offending line is:
>
>   typedef std::list<trackable_callback> callback_list;
>
> Neither 'trackable_callback' nor the struct where this line occurs
is a
> template. I can see no reason why this shouldn't compile. Maybe
there
> is a bug in the specific stl version that comes with your Slackware

> packet. Sorry, I can't be more helpful here.

I installed today gcc-3.3.4 from sources (../gcc-3.3.4/configure --
prefix=/usr --enable-threads). Then I tryed again to compile libsigc+
+-2.0.3, I get the same errors:
...
g++ -DHAVE_CONFIG_H -I.. -I.. -g -O2 -MT signal_base.lo -MD -MP -
MF .deps/signal_base.Tpo -c signal_base.cc  -fPIC -DPIC -
o .libs/signal_base.o
In file included from signal.h:10,
                 from /usr/include/pthread.h:24,
                 from /usr/include/c++/3.3.4/i686-pc-linux-
gnu/bits/gthr-default.h:37,
                 from /usr/include/c++/3.3.4/i686-pc-linux-
gnu/bits/gthr.h:98,
from /usr/include/c++/3.3.4/i686-pc-linux-gnu/bits/c +
+io.h:37,
                 from /usr/include/c++/3.3.4/bits/fpos.h:44,
                 from /usr/include/c++/3.3.4/iosfwd:49,
                 from /usr/include/c++/3.3.4/bits/stl_algobase.h:70,
                 from /usr/include/c++/3.3.4/list:67,
                 from ../sigc++/signal_base.h:24,
                 from signal_base.cc:20:
../sigc++/trackable.h:61: error: template-id `
   list<sigc::internal::trackable_callback>' used as a declarator
../sigc++/trackable.h:61: error: parse error before `;' token
../sigc++/trackable.h:62: error: 'callback_list' is used as a type,
but
is not
   defined as a type.

So neither the old nor the new version of stl (/usr/lib/libstdc+
+.so.5.0.[56]) is a Slackware packet. Both were installed from
sources.
Could it be, that the errors are due to pthread implementation? Should
I
avoid the --enable-threads option compiling gcc? Do I need special
options compiling glibc (my pthread.h should come from
slackware-9.1/slackware/l/glibc-2.3.2-i486-1.tgz)?

I have no clue, whatsoever. It doesn't really seem to be a libsigc++ specific problem. Can you try to compile a simple test program, say, e. g.:

struct foo {
 int m;
};

struct bar {
 typedef std::list<foo> foo_list_type;
 foo_list_type foo_list;
};

int main() {
 bar my_bar;
 return 0;
}

Regards,

 Martin

P.S.: Please always cc the mailing list - libsigc-list gnome org is the one for problems related to libsigc++



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]