ustring problem

Murray Cumming murrayc at murrayc.com
Fri Sep 2 06:05:27 UTC 2005


On Thu, 2005-09-01 at 22:45 +0200, Erwin Rol wrote:
> OK after recompiling the srpm from
> http://download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/glibmm24-2.6.1-1.src.rpm
> on my system it works correctly. During the configure of i can see the
> following line ;
> 
> checking whether the compiler allows a static member variable to be initialized inline to std::string::npos... no

This suggests that you are not using the same compiler as was used to
build the original fedora extras RPM. Maybe it's even a new minor
version of the compiler that has introduced some small regression.
Please do try to investigate, with the fedora extras people.

It's nice to see that the Irix MipsPro build was useful for us too.

> which seems to do the trick, the question is why are the binary rpms not
> working, are they just compiled with a older/different compiler ? 
> 
> - Erwin
> 
> 
> On Thu, 2005-09-01 at 22:15 +0200, Erwin Rol wrote:
> > Hey all,
> > 
> > while working on a wrapper for gdl I ran into a problem with
> > Glib:ustring. The following "program" gives a compile error.
> > 
> > #include <gtkmm.h>
> > 
> > int main(int argc, char* argv[])
> > {
> >         Glib::ustring tmp;
> >         return 0;
> > }
> > 
> > The error is;
> > 
> > g++ -g -c `pkg-config gtkmm-2.4 --cflags` main.cpp
> > /usr/include/glibmm-2.4/glibmm/ustring.h:236: error: field initializer is not constant
> > make: *** [main.o] Error 1
> > 
> > The lines in ustring.h that the compiler complains about are;
> > 
> > 
> >     235 #ifdef GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS
> >     236   static const size_type npos = std::string::npos;
> >     237 #else
> >     238   //The IRIX MipsPro compiler says "The indicated constant value is not known",
> >     239   //so we need to initalize the static member data elsewhere.
> >     240   static const size_type npos;
> >     241 #endif
> > 
> > 
> > The following RPM are installed on my x86_64 (running in 64bit mode)
> > rawhide system.
> > 
> > gtkmm24-2.6.2-2
> > gtkmm24-devel-2.6.2-2
> > glibmm24-devel-2.6.1-1
> > glibmm24-2.6.1-1
> > libgcc-4.0.1-12
> > gcc-4.0.1-12
> > gcc-c++-4.0.1-12
> > 
> > Anybody seen this problem before ? Can I just #undef
> > GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS somehow to "fix" it ?
> > 
> > TIA,
> > 
> > Erwin
> > 
> > 
> > 
> > _______________________________________________
> > gtkmm-list mailing list
> > gtkmm-list at gnome.org
> > http://mail.gnome.org/mailman/listinfo/gtkmm-list
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list at gnome.org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
-- 
Murray Cumming
murrayc at murrayc.com
www.murrayc.com
www.openismus.com





More information about the devel mailing list