nautilus-1.0.6-r2 gives a compile error, due to the stricter C++ of gcc 3.0.3, the following patch fixes the problem. This needs to be tested against a 2.95.3 compiler. -------------- diff -u -r nautilus-1.0.6.orig/components/mozilla/nautilus-mozilla-embed-extensions.cpp nautilus-1.0.6/components/mozilla/nautilus-mozilla-embed-extensions.cpp --- nautilus-1.0.6.orig/components/mozilla/nautilus-mozilla-embed-extensions.cpp Wed Jan 23 00:14:48 2002 +++ nautilus-1.0.6/components/mozilla/nautilus-mozilla-embed-extensions.cpp Wed Jan 23 00:28:35 2002 @@ -51,8 +51,8 @@ * by the "string" directory in the mozilla include directory. So we do the * following as a workaround. */ -#include <std/bastring.h> -typedef basic_string<char> string; +#include <bits/std_string.h> +typedef std::basic_string<char> string; struct Encoding { @@ -79,11 +79,11 @@ static guint encoding_group_get_count (void); static char * convert_to_c_string (const nsString &ns_string); -static vector<Encoding> +static std::vector<Encoding> encoding_get_encoding_table (void) { - static vector<Encoding> empty_encodings; - static vector<Encoding> encodings; + static std::vector<Encoding> empty_encodings; + static std::vector<Encoding> encodings; if (encodings.size () > 0) { return encodings; @@ -149,7 +149,7 @@ { g_return_val_if_fail (GTK_IS_MOZ_EMBED (mozilla_embed), 0); - vector<Encoding> encodings = encoding_get_encoding_table (); + std::vector<Encoding> encodings = encoding_get_encoding_table (); return encodings.size (); } @@ -161,7 +161,7 @@ g_return_val_if_fail (GTK_IS_MOZ_EMBED (mozilla_embed), NULL); g_return_val_if_fail (n < mozilla_charset_get_num_encodings (mozilla_embed), NULL); - vector<Encoding> encodings = encoding_get_encoding_table (); + std::vector<Encoding> encodings = encoding_get_encoding_table (); return g_strdup (encodings[n].m_encoding.c_str ()); } @@ -173,7 +173,7 @@ g_return_val_if_fail (GTK_IS_MOZ_EMBED (mozilla_embed), NULL); g_return_val_if_fail (n < mozilla_charset_get_num_encodings (mozilla_embed), NULL); - vector<Encoding> encodings = encoding_get_encoding_table (); + std::vector<Encoding> encodings = encoding_get_encoding_table (); return g_strdup (encodings[n].m_encoding_title.c_str ()); } @@ -185,7 +185,7 @@ g_return_val_if_fail (GTK_IS_MOZ_EMBED (mozilla_embed), NULL); g_return_val_if_fail (n < mozilla_charset_get_num_encodings (mozilla_embed), NULL); - vector<Encoding> encodings = encoding_get_encoding_table (); + std::vector<Encoding> encodings = encoding_get_encoding_table (); return g_strdup (encodings[n].m_translated_encoding_title.c_str ()); }
hmm .. is this sent to the Nautilus maintainers? Since this fix should go in there rather than into gentoo (we don't support GCC 3.0 at the moment)
I don't see a problem, as long as the patch doesn't break 2.95 compilation. Of course, sending the patch upstream is still a good idea. . ..
that is what I meant, it _should_ be sent to the Nautilus maintainers since that is the correct place for it. I can try it on right now.
The build with 2.95 failed due to: nautilus-mozilla-embed-extensions.cpp nautilus-mozilla-embed-extensions.cpp:54: bits/std_string.h: No such file or directory nautilus-mozilla-embed-extensions.cpp:55: syntax error before `;' nautilus-mozilla-embed-extensions.cpp:68: syntax error before `;' nautilus-mozilla-embed-extensions.cpp:69: syntax error before `;' nautilus-mozilla-embed-extensions.cpp:70: syntax error before `;' nautilus-mozilla-embed-extensions.cpp: In method `Encoding::Encoding(const char *, const char *, const char *)': nautilus-mozilla-embed-extensions.cpp:62: class `Encoding' does not have any field named `m_encoding' nautilus-mozilla-embed-extensions.cpp:63: class `Encoding' does not have any field named `m_encoding_title' nautilus-mozilla-embed-extensions.cpp:64: class `Encoding' does not have any field named `m_translated_encoding_title' nautilus-mozilla-embed-extensions.cpp: In function `char * mozilla_charset_get_nth_encoding(const GtkMozEmbed *, unsigned int)': nautilus-mozilla-embed-extensions.cpp:166: `struct Encoding' has no member named `m_encoding' nautilus-mozilla-embed-extensions.cpp: In function `char * mozilla_charset_get_nth_encoding_title(const GtkMozEmbed *, unsigned int)': nautilus-mozilla-embed-extensions.cpp:178: `struct Encoding' has no member named `m_encoding_title' nautilus-mozilla-embed-extensions.cpp: In function `char * mozilla_charset_get_nth_translated_encoding_title(const GtkMozEmbed *, unsigned int)': nautilus-mozilla-embed-extensions.cpp:190: `struct Encoding' has no member named `m_translated_encoding_title' make[3]: *** [nautilus-mozilla-embed-extensions.o] Error 1 make[3]: Leaving directory `/usr/portage-tmp/nautilus-1.0.6-r3/work/nautilus-1.0.6/components/mozilla' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/portage-tmp/nautilus-1.0.6-r3/work/nautilus-1.0.6/components' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/portage-tmp/nautilus-1.0.6-r3/work/nautilus-1.0.6' make: *** [all-recursive-am] Error 2
Tod: can you find the right person (or mailing list, or bug tracker) for Nautilus bugs and send this to them for me? Thanks :)
Hi! I submitted this to the Gnome bugzilla, Nautilus component. It is bug#70378 found at http://bugzilla.gnome.org/show_bug.cgi?id=70378 I will wait and see if there is any response, if not I'll try a mailing list or something. tod P.S. How should I resolve this bug?
A possible solution, will be to have in you src_unpack(), a line that runs gcc -v, and check the version (cut/awk/whatever). If its 3.0 or bigger, apply patch, else do nothing.
I like that solution azarah, I'll give it a try. The nautilus folks have looked at the patch and they are going to incorporate something similiar in the future, so hopefully this will go away with new nautilus versions.
I should mention that most of the patch is not necessary. For gcc 3.0, you could simply comment out: #include <std/bastring.h> typedef basic_string<char> string; And put in its place: #include <string> using namespace std; Theres a comment in the code about GCC getting confused with some other string they created. This might happen in 2.95.3, but not in 3.0.
Matt, is this an issue with 3.1 now?
Yes. Nautilus does fail for gcc3.1, so does ORBit incidentally. 2929 and 2979 provide some clues... but this one here's a compile problem.
Nautilus builds fine with gcc3.1-r4
Doh. I was mistaken. Still craps out for gcc3.1
created patch (similar to PreZ's idea). it's in nautilus-1.0.6-r9. resolved