GNOME Bugzilla – Bug 120619
gnome-vfsmm-1.3.3 does not compile
Last modified: 2011-01-16 23:36:26 UTC
gcc version 2.95.4 20020723 (prerelease) g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"libgnomevfsmm\" -I../../libgnomevfs - I../../../gnome-vfsmm-1.3.3/libgnomevfs -pthread -DORBIT2=1 - I/usr/include/gtkmm-2.0 -I/usr/lib/gtkmm-2.0/include -I/usr/include/gtk- 2.0 -I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2 - I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk- 2.0/include -I/usr/include/pango-1.0 -I/usr/include/freetype2 - I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/gnome-vfs-2.0 - I/usr/lib/gnome-vfs-2.0/include -I/usr/include/bonobo-activation-2.0 - I/usr/include/orbit-2.0 -I/usr/include/gnome-vfs-module-2.0 -g -O2 - c ../../../gnome-vfsmm-1.3.3/libgnomevfs/libgnomevfsmm/file-info.cc -Wp,- MD,.deps/file-info.TPlo -fPIC -DPIC -o .libs/file-info.o ../../../gnome-vfsmm-1.3.3/libgnomevfs/libgnomevfsmm/file-info.cc: In method `enum Gnome::Vfs::FileType Gnome::Vfs::FileInfo::get_type() const': ../../../gnome-vfsmm-1.3.3/libgnomevfs/libgnomevfsmm/file-info.cc:157: static_cast from `const GnomeVFSFileType' to `Gnome::Vfs::FileType' ../../../gnome-vfsmm-1.3.3/libgnomevfs/libgnomevfsmm/file-info.cc: In method `enum Gnome::Vfs::FilePermissions Gnome::Vfs::FileInfo::get_permissions() const': ../../../gnome-vfsmm-1.3.3/libgnomevfs/libgnomevfsmm/file-info.cc:162: static_cast from `const GnomeVFSFilePermissions' to `Gnome::Vfs::FilePermissions' ../../../gnome-vfsmm-1.3.3/libgnomevfs/libgnomevfsmm/file-info.cc: In method `enum Gnome::Vfs::FileFlags Gnome::Vfs::FileInfo::get_flags() const': ../../../gnome-vfsmm-1.3.3/libgnomevfs/libgnomevfsmm/file-info.cc:167: static_cast from `const GnomeVFSFileFlags' to `Gnome::Vfs::FileFlags' make[1]: *** [file-info.lo] Error 1 make[1]: Leaving directory `/usr/src/gnome-vfsmm/gnome-vfsmm-1.3.3- build/libgnomevfs/libgnomevfsmm' This was first reported back in May: http://mail.gnome.org/archives/gnomemm-list/2003-May/msg00021.html If a newer version of GCC is required, then please, document it. The last version to work with this version of gcc was gnome-vfsmm-1.3.0.
Could you please try a normal cast there or a reinterpret_cast<>.
Created attachment 19506 [details] [review] static_cast -> plain cast for gcc 2.95.4
Anyway, that was an ugly patch. I'm hoping that it will provide a pointer as to what is wrong with gcc. I mean, there are still some static_cast's left, so it's not just that. Something this version of gcc simply doesn't like about those.
Thanks, I will try to make it generate that code for the broken compiler. Please see the patch advice here in future: http://www.gtkmm.org/bugs.shtml
I didn't create a ChangeLog entry because it's not a patch I expect to be integrated, but rather as a hint used to determine what may be the root cause. As far as cvs goes, too many issues with autoconf incompatibilities (I mean, looking at the fact that you're still using configure.in rather than configure.ac suggests you're using an older version than I am). It took enough time to do the above.
I have committed the workaround fix to the .m4 conversions file to cvs. Thanks. > configure.in rather than configure.ac configure.ac is relatively new. Not many people have changed to it yet. We generally work with very latest autotools, and try to work with the old ones too.