google-code-export / google-gadgets-for-linux

Automatically exported from code.google.com/p/google-gadgets-for-linux
0 stars 0 forks source link

gtkmoz_browser compilation problem with xulrunner-1.9 cvs20080315 and a fix proposal #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
gtkmoz_browser extenstion failed to detect and compile with xulrunner-1.9
cvs20080315.

Since xulrunner 1.9 cvs version provide mozilla-gtkmozembed.pc and
mozilla-js.pc.

the configure process should also check them, not only check
xulrunner-XXX/firefox-XXX/firefox2-XXX.
Maybe it need added to "configure.ac"

And the Trace mothed in  nsIXPCScriptable is defined as virtual.
so also need add this lines  in ExternalObject in browser_child.cc:
  NS_IMETHOD Trace(nsIXPConnectWrappedNative*, JSTracer*, JSObject*){
   return NS_ERROR_NOT_IMPLEMENTED;
  }

I am not sure about lower version of xulrunner, Maybe here need a version
check and define a macro to handle it.

The other issue is NS_HIDDEN redefined error, from gtkmozembed.h provide by
xulrunner-1.9cvs:

#ifdef MOZILLA_CLIENT
#include "nscore.h"
#else /* MOZILLA_CLIENT */
#ifndef nscore_h__
/* Because this header may be included from files which not part of the mozilla
   build system, define macros from nscore.h */

#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
#define NS_HIDDEN __attribute__((visibility("hidden")))
#else
#define NS_HIDDEN
#endif

#define NS_FROZENCALL
#define NS_EXPORT_(type) type
#define NS_IMPORT_(type) type
#endif /* nscore_h__ */
#endif /* MOZILLA_CLIENT */

So, it also need define MOZILLA_CLIENT flag becore include gtkmozembed.h in
browser_child.cc, looks like this:

#define MOZILLA_CLIENT
#include <gtkmozembed.h>
#include <gtkmozembed_internal.h>
#include <jsapi.h>

After these modification, the gtkmoz_browser extension compiles successfully.

Original issue reported on code.google.com by cjac...@gmail.com on 30 May 2008 at 5:17

GoogleCodeExporter commented 9 years ago
A patch to fix ISSUE 99 and ISSUE 100(this one).

It works on Everest Linux 0.5.2 with xulrunner cvs version, js-1.60 and 
nspr-4.7.

It should also works with fedora Core 9. anybody can try it?

Original comment by cjac...@gmail.com on 30 May 2008 at 6:01

Attachments:

GoogleCodeExporter commented 9 years ago
I gave it a try on Fedora 9 and still no go.

Original comment by BigJoe1...@gmail.com on 31 May 2008 at 12:46

GoogleCodeExporter commented 9 years ago
did you run autoreconf after patch applied?

"checking for GTKMOZEMBED" should say "yes.", But even it said no, you can 
still pass
the compilation.

and then please try js-1.60.
here is the src.rpm I compiled with.
ftp://www.linux-ren.org/pub/cjacker/js-1.60-2.src.rpm

Original comment by cjac...@gmail.com on 31 May 2008 at 4:49

GoogleCodeExporter commented 9 years ago
trying to build this srpm I get this.  do you happen to have just the tarball 
and
spec file that you could post on your site?

error: unpacking of archive failed: cpio: Bad magic
error: js-1.60-2.src.rpm cannot be installed

Original comment by BigJoe1...@gmail.com on 1 Jun 2008 at 12:28

GoogleCodeExporter commented 9 years ago
Sorry, I use lzma for rpm payload that fedora can not support it.
I will upload a fix for js-1.70 in fedora later.

Compilation fail in fedora is really a fedora problem. It missing two files 
installed
from js and break the js headers.

Original comment by cjac...@gmail.com on 2 Jun 2008 at 2:11

GoogleCodeExporter commented 9 years ago
Fedore Core 9 issue, please refer ISSUE 105

Original comment by cjac...@gmail.com on 2 Jun 2008 at 4:13

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by james...@gmail.com on 13 Jun 2008 at 2:22