GNOME Bugzilla – Bug 111393
galeon-1.2.10 compilation failure with gcc-2.95.3
Last modified: 2004-12-22 21:47:04 UTC
Hi, When I try to compile latest galeon with my old gcc-2.95.3, here is what I get: [...] g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src -I/usr/lib/mozilla/include -I/usr/lib/mozilla/include/nspr -I/usr/lib/mozilla/include/appcomps -I/usr/lib/mozilla/include/caps -I/usr/lib/mozilla/include/content -I/usr/lib/mozilla/include/cookie -I/usr/lib/mozilla/include/docshell -I/usr/lib/mozilla/include/dom -I/usr/lib/mozilla/include/exthandler -I/usr/lib/mozilla/include/find -I/usr/lib/mozilla/include/gfx -I/usr/lib/mozilla/include/gtkembedmoz -I/usr/lib/mozilla/include/helperAppDlg -I/usr/lib/mozilla/include/java -I/usr/lib/mozilla/include/js -I/usr/lib/mozilla/include/jsconsole -I/usr/lib/mozilla/include/layout -I/usr/lib/mozilla/include/mimetype -I/usr/lib/mozilla/include/mozxfer -I/usr/lib/mozilla/include/necko -I/usr/lib/mozilla/include/necko2 -I/usr/lib/mozilla/include/nkcache -I/usr/lib/mozilla/include/oji -I/usr/lib/mozilla/include/pref -I/usr/lib/mozilla/include/progressDlg -I/usr/lib/mozilla/include/sidebar -I/usr/lib/mozilla/include/string -I/usr/lib/mozilla/include/shistory -I/usr/lib/mozilla/include/typeaheadfind -I/usr/lib/mozilla/include/uconv -I/usr/lib/mozilla/include/uriloader -I/usr/lib/mozilla/include/wallet -I/usr/lib/mozilla/include/webbrowserpersist -I/usr/lib/mozilla/include/webbrwsr -I/usr/lib/mozilla/include/webshell -I/usr/lib/mozilla/include/widget -I/usr/lib/mozilla/include/windowwatcher -I/usr/lib/mozilla/include/xpcom -I/usr/lib/mozilla/include/xpconnect -I/usr/include/gconf/1 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/orbit-1.0 -I/usr/include/gtk-1.2 -I/usr/X11R6/include -I/usr/include/gdk-pixbuf-1.0 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/include/gnome-vfs-1.0 -I/usr/lib/gnome-vfs-1.0/include -I/usr/include/gnome-xml -I/usr/include/orbit-1.0 -I/usr/include/gconf/1 -D_REENTRANT -I/usr/include/libglade-1.0 -I/usr/include/gnome-1.0 -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include -DLIB_DIR=\"/usr/lib/galeon\" -DSHARE_DIR=\"/usr/share/galeon\" -include /usr/lib/mozilla/include/mozilla-config.h -fno-rtti -march=i686 -O3 -pipe -Wall -Wmissing-declarations -Wmissing-prototypes -Wsign-compare -c -o MyportalProtocolHandler.o `test -f 'MyportalProtocolHandler.cpp' || echo './'`MyportalProtocolHandler.cpp MyportalProtocolHandler.cpp: In method `nsresult GMyportalProtocolHandler::CreateMyportalPage(const nsACString &)': MyportalProtocolHandler.cpp:209: implicit declaration of function `int realpath(...)' MyportalProtocolHandler.cpp:209: passing `int' to argument 1 of `strlen(const char *)' lacks a cast MyportalProtocolHandler.cpp:209: no matching function for call to `nsDerivedSafe<nsIOutputStream>::Write (int, unsigned int, PRUint32 *)' /usr/lib/mozilla/include/xpcom/nsIOutputStream.h:97: candidates are: nsresult nsIOutputStream::Write(const char *, unsigned int, PRUint32 *) make[4]: *** [MyportalProtocolHandler.o] Error 1 make[4]: Leaving directory `/var/tmp/portage/galeon-1.2.10/work/galeon-1.2.10/src/mozilla' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/galeon-1.2.10/work/galeon-1.2.10/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/galeon-1.2.10/work/galeon-1.2.10/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/galeon-1.2.10/work/galeon-1.2.10' make: *** [all] Error 2 I'm able to make it compile by applying the following patch: --- src/mozilla/MyportalProtocolHandler.cpp.orig 2003-04-23 03:19:40.000000000 +0200 +++ src/mozilla/MyportalProtocolHandler.cpp 2003-04-23 03:19:42.000000000 +0200 @@ -209,7 +209,7 @@ gchar* myportal_utfstr = mozilla_locale_to_utf8(_("My Portal")); RENDER ("<html><head>\n"); RENDER ("<link rel=\"stylesheet\" href=\"file:"); - RENDER (realpath (stylesheet_filename, full_path)); + RENDER ("/usr/share/galeon/myportal.css"); RENDER ("\" type=\"text/css\">\n"); RENDER ("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n"); RENDER ("<title>"); As you can see, it's far from being a real fix. But I'm also far from being a C(++) programmer :) Do you have a better solution? Do you need some more informations? Thanks, Thomas.
The 1.2.10a tarball takes care of this. Perhaps you got the original source...
You're right, I've not seen this 1.2.10a release, so I was still using 1.2.10 sources. Thanks for this fix.