Problem with Linux Builds

Discussion about official Mozilla Firefox builds
DonPete
Posts: 269
Joined: July 7th, 2003, 5:10 pm

Problem with Linux Builds

Post by DonPete »

I've been without Internet access for a while, so it's been a while since I last updated my build. I compiled a new trunk build for myself (twice), but when I try to run the resulting binary, nothing happens. I then downloaded an official trunk build, and experience the same thing (for the past 4 nightlies; I haven't tried earlier than that). However, the latest 0.7 build starts up fine.

I tried searching the forums to see if anyone else is experiencing the same problem, but came up dry. Have I missed something, or has anyone else seen this?
Old Persist
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Persist »

Well I'm glad to see this post as I thought it was just me. I built this Firebird on the 28th of sept, I didn't build the next day but on the 30th I tried again with the result you described. I got a nice looking MozillaFirebird folder with all the bits in but when I try and run it - nothing happens. If I launch it from the terminal there's no error message and if I move my profile and launch it it starts to create a new profile but fails before it's complete. I've tried downloading the whole tree from cvs and downloading the source tarball, all with the same result. If I build from the 0.6.1 source tarball that works fine. That bird flies. I thought I must have installed something which was breaking the build I was about to reinstall Mandrake. I'd looked through what I needed to backup and thought I'd just have one more look to see if anyone else had posted with this problem. I build with gtk2 and xft if that's relevant.
Edit - I've just downloaded the current nightly and it's like you say - that doesn't work either. I had looked to see if they were posting builds but as they were offering them for download I just assumed that they worked. Official builds don't work quite as well as my own builds for me. The realplayer plugin and the BBC radio player don't work and the download window stays on top of Firebird when I'm downloading something, so I prefer to use my own builds and didn't even bother trying the official gtk2+xft build.
Edit (again) - I've just downloaded the standard (non-gtk2) official build and it's working, I'm using it to post this now. So it looks to me like the problem is with gtk2+xft builds.
psoares
Posts: 4
Joined: October 2nd, 2003, 8:02 am
Location: Lisboa - Portugal

GTK2 and Linux

Post by psoares »

I have a similar problem with all gtk2 buids for Linux. When I try to run Firebird (or Thunderbird) from the command line it complains something about bluecurve and refuses to run. This happened with a lot of recent builds and I was finding strange that no one had this same problem.

----------------------------------------------
RH8.0 + gcc 3.2
Paulo Soares
DonPete
Posts: 269
Joined: July 7th, 2003, 5:10 pm

Post by DonPete »

I should have noted that all the builds I tried were xft/gtk2. I downloaded the current non-gtk2 nightly, and it works fine for me too. However, it's just too ugly for me to use.
Yek
Posts: 463
Joined: December 10th, 2002, 8:23 pm

Post by Yek »

I'm using my own daily gtk2 builds and haven't had this problem, but I always note these messages in the log after firebird startup:

Code: Select all

Oct  2 12:00:33 yek gconfd (root-4173): starting (version 2.2.0), pid 4173 user 'yek'
Oct  2 12:00:33 yek gconfd (root-4173): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only config source at position 0
Oct  2 12:00:33 yek gconfd (root-4173): Resolved address "xml:readwrite:/root/.gconf" to a writable config source at position 1
Oct  2 12:00:33 yek gconfd (root-4173): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only config source at position 2




Are you getting any log messages that it either attempted to kickoff "gconfd-2" or could that be part of the problem? Just do a grep -i 'gconf' /var/log/messages for the period after you fail to start firebird. For me this is in the GConf2-2.2.0-1 package on rh9.
Old Persist
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Persist »

Yes,if I enter grep -i 'gconf' /var/log/messages as root into a terminal I get this stuff

Code: Select all

Oct  2 14:28:49 localhost gconfd (andy-1897): Received signal 1, shutting down cleanly
Oct  2 14:28:49 localhost gconfd (andy-1897): Exiting
Oct  2 15:58:07 localhost gconfd (andy-1882): starting (version 2.2.0), pid 1882 user 'andy'
Oct  2 15:58:07 localhost gconfd (andy-1882): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only config source at position 0
Oct  2 15:58:07 localhost gconfd (andy-1882): Resolved address "xml:readwrite:/home/andy/.gconf" to a writable config source at position 1
Oct  2 15:58:07 localhost gconfd (andy-1882): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only config source at position 2
But what does it mean? and what can I do to get new gtk2 builds of Firebird working? The build I'm using from the 28th of sept doesn't make these entries in the log so how can I stop new gtk2 builds doing it?
Looking at your log it looks like you're running Firebird as root - am I right? Has that got something to do with it?
Yek
Posts: 463
Joined: December 10th, 2002, 8:23 pm

Post by Yek »

Persist wrote:Yes,if I enter grep -i 'gconf' /var/log/messages as root into a terminal I get this stuff

Code: Select all

Oct  2 14:28:49 localhost gconfd (andy-1897): Received signal 1, shutting down cleanly
Oct  2 14:28:49 localhost gconfd (andy-1897): Exiting
Oct  2 15:58:07 localhost gconfd (andy-1882): starting (version 2.2.0), pid 1882 user 'andy'
Oct  2 15:58:07 localhost gconfd (andy-1882): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only config source at position 0
Oct  2 15:58:07 localhost gconfd (andy-1882): Resolved address "xml:readwrite:/home/andy/.gconf" to a writable config source at position 1
Oct  2 15:58:07 localhost gconfd (andy-1882): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only config source at position 2
But what does it mean? and what can I do to get new gtk2 builds of Firebird working? The build I'm using from the 28th of sept doesn't make these entries in the log so how can I stop new gtk2 builds doing it?
Looking at your log it looks like you're running Firebird as root - am I right? Has that got something to do with it?


I ran it both as root and as a user to check that before I finished posting, because my bad habits of doing kernel stuff as root and staying logged in that way can sometimes mask problems. Anyway, it wasn't because I was logged in as root (for me anyway, but you might try it as root).

Since I either run (I just deleted gnome off my system) XFCE4 or KDE3 for desktops, I installed GConf for anything that'd need gtk2. Gconf is kind of like the registry is to MS systems, except it's only for the gtk2 toolkit in this case. It's a library of gnome junk that's needed since we build with the gtk2 toolkit. It looks at /etc/gnome/1 and /etc/gnome/2 and gets path and library information for gtk2 users when it's invoked.

I had some problems the first time I build with gtk2 (not as root) and noticed that on mine, only owner had any privileges in the /etc/gconf dir so I chmod'd the entire directory recursively just to get things rolling. This really doesn't sound like your problem .. unfortunately. The build that doesn't make the entries in the log is a gtk2 build? Unless you're already running gnome as your desktop, those entries have always appeared in my log and I *think* they're supposed to as an indication of proper application-sharing-locking behavour. Which date was the last that worked (with gtk2 ) for you?

**Edit**

Here's another possibility, but a slim one. What happens if you just mv your ~/username/.gconfd to ~/username/.gconfd.sav and try running firebird? Maybe something got corrupted in there or changed due to some little CVS tweak. I know that there was a source tweak to gtk2 last week, but I can't figure out why it would affect you.
Old Persist
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Persist »

Further experimentation has shown me that these messages in the log are not related to me trying to launch Firebird, they only refer to different users loging on or off. I don't think this is related to the problem with the current gtk2 builds. It's interesting that they work on your machine as you don't have Gnome installed. Maybe it's a gtk2-gnome issue. I've tried using KDE and that didn't work. I've also tried running Firebird as root and again it didn't work
Yek
Posts: 463
Joined: December 10th, 2002, 8:23 pm

Post by Yek »

Persist wrote:Further experimentation has shown me that these messages in the log are not related to me trying to launch Firebird, they only refer to different users loging on or off. I don't think this is related to the problem with the current gtk2 builds. It's interesting that they work on your machine as you don't have Gnome installed. Maybe it's a gtk2-gnome issue. I've tried using KDE and that didn't work. I've also tried running Firebird as root and again it didn't work


There's (at least) one other thing that'd possibly explain this, or you could look for a problem along these general lines. Around the timeframe your builds stopped working with gtk2 in, there was, for example, a problem with java + gtk2 (that I've got a fix for from a non-committed patch). This java bug would crash your browser (no error message) on any webpage that had java on it, but only if you were using a gtk2 built browser. The checkin that sent everything bad was on the 23rd or 24th. Gtk2 builds before that or in the other branches work fine. If your homepage had some java on it, you'd never get the thing launched. I think there was one other similar gtk2 problem but I've forgotten what it was, if you show checkin's for the last 10 days, you could search for 'gtk2' in the modified title list. g/l
Old Persist
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Persist »

Yes the patch for the Java bug is the reason I really want to get a working gtk2 build going as I'd like to apply that patch http://bugzilla.mozilla.org/show_bug.cgi?id=219705 . I haven't tried your build as it says it's Athlon only. I've just checked the official gtk2 builds and the one from the 29th of Sept works but the one from the 1st of Oct doesn't so that narrows it down a bit. It probably wasn't a checkin that related to gtk2 that broke the build or surely they'd have checked that gtk2 builds worked before they checked it in. I think it's just something unrelated that's stoping them working. I think I should start a new thread in Firebird bugs as the official gtk2 builds aren't working, other people will be having trouble and the title of this thread doesn't mention gtk2
Yek
Posts: 463
Joined: December 10th, 2002, 8:23 pm

Post by Yek »

Persist wrote:Yes the patch for the Java bug is the reason I really want to get a working gtk2 build going as I'd like to apply that patch http://bugzilla.mozilla.org/show_bug.cgi?id=219705 . I haven't tried your build as it says it's Athlon only. I've just checked the official gtk2 builds and the one from the 29th of Sept works but the one from the 1st of Oct doesn't so that narrows it down a bit. It probably wasn't a checkin that related to gtk2 that broke the build or surely they'd have checked that gtk2 builds worked before they checked it in. I think it's just something unrelated that's stoping them working. I think I should start a new thread in Firebird bugs as the official gtk2 builds aren't working, other people will be having trouble and the title of this thread doesn't mention gtk2


Oh -- Ok :) I can crank up a build for you that is generic (no optimizations if you like) for testing, but I just did an experiment to test what your'e saying as well: I downloaded the 02Oct official linux-gtk2/xft build from ftp.moz*** and it works fine for me, but then again, I don't have any java homepages. Just leave a note here if you want me to crank up a generic build for you to try that has the patch applied.
Old Persist
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Persist »

Sorry, I should have said, I'm living without the java plugin. My homepage is a .jpg satalite image http://image.weather.com/images/sat/uksat_600x405.jpg . I don't think this problem is java related as the 29th of Sept build works and the 1st of Oct doesn't.
As far as the build goes, if you wouldn't mind, that'd be great. It'd be good to see if a current gtk2 build can work for me. I built again this morning and it didn't work, same as the official builds. Actually what I'd really like is for you to explain how to apply the patch. I know it has to go in mozilla/modules/plugin/base/src/nsPluginNativeWindowGtk2.cpp but which bit of code should I delete (if any) and exactly where should it go?
Yek
Posts: 463
Joined: December 10th, 2002, 8:23 pm

Post by Yek »

Persist wrote:Sorry, I should have said, I'm living without the java plugin. My homepage is a .jpg satalite image http://image.weather.com/images/sat/uksat_600x405.jpg . I don't think this problem is java related as the 29th of Sept build works and the 1st of Oct doesn't.
As far as the build goes, if you wouldn't mind, that'd be great. It'd be good to see if a current gtk2 build can work for me. I built again this morning and it didn't work, same as the official builds. Actually what I'd really like is for you to explain how to apply the patch. I know it has to go in mozilla/modules/plugin/base/src/nsPluginNativeWindowGtk2.cpp but which bit of code should I delete (if any) and exactly where should it go?


Sure, np to either: Here's how to do the patch:

Save this code section to a file (say call it .. patchJava in the dir above ~/mozilla cvs.

Code: Select all

Index: plugin/base/src/nsPluginNativeWindowGtk2.cpp
===================================================================
RCS file: /cvsroot/mozilla/modules/plugin/base/src/nsPluginNativeWindowGtk2.cpp,v
retrieving revision 1.1
diff -u -r1.1 nsPluginNativeWindowGtk2.cpp
--- plugin/base/src/nsPluginNativeWindowGtk2.cpp   16 Sep 2003 01:44:14 -0000   1.1
+++ plugin/base/src/nsPluginNativeWindowGtk2.cpp   30 Sep 2003 04:44:03 -0000
@@ -48,6 +48,13 @@
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
 #include <gdk/gdk.h>
+#ifdef OJI
+#include "plstr.h"
+#include "nsIPlugin.h"
+#include "nsIPluginHost.h"
+
+static NS_DEFINE_CID(kPluginManagerCID, NS_PLUGINMANAGER_CID);
+#endif
 
 class nsPluginNativeWindowGtk2 : public nsPluginNativeWindow {
 public:
@@ -58,6 +65,9 @@
 private:
   GtkWidget*  mGtkSocket;
   nsresult  CreateXEmbedWindow();
+#ifdef OJI
+  PRBool    CanGetValueFromPlugin(nsCOMPtr<nsIPluginInstance> &aPluginInstance);
+#endif
 };
 
 nsPluginNativeWindowGtk2::nsPluginNativeWindowGtk2() : nsPluginNativeWindow()
@@ -103,8 +113,11 @@
     nsresult rv;
     PRBool val = PR_FALSE;
     if(!mGtkSocket) {
-      rv = aPluginInstance->GetValue
-        ((nsPluginInstanceVariable)NPPVpluginNeedsXEmbed, &val);
+#ifdef OJI
+      if (CanGetValueFromPlugin(aPluginInstance))
+#endif
+        rv = aPluginInstance->GetValue
+               ((nsPluginInstanceVariable)NPPVpluginNeedsXEmbed, &val);
     }
 #ifdef DEBUG
     printf("nsPluginNativeWindowGtk2: NPPVpluginNeedsXEmbed=%d\n", &val);
@@ -155,3 +168,47 @@
 
   return NS_OK;
 }
+
+#ifdef OJI
+PRBool nsPluginNativeWindowGtk2::CanGetValueFromPlugin(nsCOMPtr<nsIPluginInstance> &aPluginInstance)
+{
+  if(aPluginInstance) {
+    nsresult rv;
+    nsIPluginInstancePeer *aPeer;
+
+    rv = aPluginInstance->GetPeer(&aPeer);
+    if (NS_SUCCEEDED(rv) && aPeer) {
+      const char *aMimeType = nsnull;
+
+      aPeer->GetMIMEType((nsMIMEType*)&aMimeType);
+      if (aMimeType &&
+          (PL_strncasecmp(aMimeType, "application/x-java-vm", 21) == 0 ||
+           PL_strncasecmp(aMimeType, "application/x-java-applet", 25) == 0)) {
+        nsCOMPtr<nsIPluginHost> pluginHost = do_GetService(kPluginManagerCID, &rv);
+        if (NS_SUCCEEDED(rv) && pluginHost) {
+          nsIPlugin* pluginFactory = NULL;
+
+          rv = pluginHost->GetPluginFactory("application/x-java-vm", &pluginFactory);
+          if (NS_SUCCEEDED(rv) && pluginFactory) {
+            const char * jpiDescription;
+
+            pluginFactory->GetValue(nsPluginVariable_DescriptionString, (void*)&jpiDescription);
+            /**
+             * "Java(TM) Plug-in" is Sun's Java Plugin Trademark,
+             * so we are sure that this is Sun 's Java Plugin if
+             * the description start with "Java(TM) Plug-in"
+             **/
+            if (PL_strncasecmp(jpiDescription, "Java(TM) Plug-in", 16) == 0) {
+              // Java Plugin support Xembed from JRE 1.5
+              if (PL_strcasecmp(jpiDescription + 17, "1.5") < 0)
+                return PR_FALSE;
+            }
+          }
+        }
+      }
+    }
+  }

+  return PR_TRUE;
+}
+#endif



then note that the patch was created using a diff from the directory above plugin/base/src, so that'd be modules. Do a cd to modules and use this form of patch "patch -p1 <../pathtothepatch/patchJava". If there's any errors returned from patch, it'll ask you if you want to do something or other, but just exit it (ctrl-c) and let me know what it asked.

Then just configure and make. I'm also cranking out a generic build with opt=O2 and no venkman/domi today.
Old Persist
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Persist »

Thanks for the patch, it didn't take first time but the error messages explained what to do
psoares
Posts: 4
Joined: October 2nd, 2003, 8:02 am
Location: Lisboa - Portugal

Post by psoares »

This build:

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6a) Gecko/20030924 Firebird/0.7+ (daihard; XFT+GTK2; optimized for P4/SSE),

works for me but any one newer from daihard that I 've tried fails to run.
I have never been able to use any build of Thunderbird with gtk2+xft. I believe that the problem is common to both.

The error message is (in Portuguese):

(MozillaFirebird-bin:2749): Gtk-WARNING **: Incapaz de localizar motor de temas na module_path: "bluecurve",

which means "Unable to find theme engine in module_path: "bluecurve""
Paulo Soares
Post Reply