Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280 - nautilus-1.0.6-r2 will not compile with gcc 3.0.3 (FIX included)
Summary: nautilus-1.0.6-r2 will not compile with gcc 3.0.3 (FIX included)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Matthew Kennedy (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-22 22:29 UTC by Jared H. Hudson
Modified: 2003-02-04 19:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jared H. Hudson 2002-01-22 22:29:35 UTC
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 ());
 }
Comment 1 Mikael Hallendal (hallski) (RETIRED) gentoo-dev 2002-01-23 03:28:08 UTC
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)
Comment 2 Grant Goodyear (RETIRED) gentoo-dev 2002-01-23 12:06:25 UTC
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. . ..
Comment 3 Mikael Hallendal (hallski) (RETIRED) gentoo-dev 2002-01-23 12:37:33 UTC
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.
Comment 4 Mikael Hallendal (hallski) (RETIRED) gentoo-dev 2002-01-23 15:59:31 UTC
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
Comment 5 Daniel Robbins (RETIRED) gentoo-dev 2002-02-02 11:48:39 UTC
Tod: can you find the right person (or mailing list, or bug tracker) for
Nautilus bugs and send this to them for me?  Thanks :)
Comment 6 Tod M. Neidt (RETIRED) gentoo-dev 2002-02-02 13:22:15 UTC
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?
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2002-02-02 16:09:27 UTC
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.
Comment 8 Tod M. Neidt (RETIRED) gentoo-dev 2002-02-12 17:05:43 UTC
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. 
Comment 9 Preston A. Elder 2002-03-27 10:58:46 UTC
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.
Comment 10 Seemant Kulleen (RETIRED) gentoo-dev 2002-05-24 03:57:44 UTC
Matt, is this an issue with 3.1 now?
Comment 11 Matthew Kennedy (RETIRED) gentoo-dev 2002-05-24 13:25:45 UTC
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.
Comment 12 Matthew Kennedy (RETIRED) gentoo-dev 2002-05-26 15:39:03 UTC
Nautilus builds fine with gcc3.1-r4 
Comment 13 Matthew Kennedy (RETIRED) gentoo-dev 2002-06-01 15:14:08 UTC
Doh. I was mistaken. Still craps out for gcc3.1
Comment 14 Matthew Kennedy (RETIRED) gentoo-dev 2002-06-01 16:02:51 UTC
created patch (similar to PreZ's idea). it's in nautilus-1.0.6-r9.
resolved