Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Has anyone got the perl bindings to XPCOM to work recently?

Background: XULRunner can now run XUL applications independently of Firefox, meaning that XUL can be used as a toolkit for widgets. I have toyed with XUL and liked it - it does what I want. The java bindings allow actions triggered by the XUL widgets to use java for scripting. It would seem a perl binding would allow the same for perl, eg., mouseover on a button would call a perl sub.

In an article on XULRunner, Axel Hect said it would run with any language that had XPCOM bindings, including perl. However, the plXPCOM project is now listed as inactive. So where can I go for help, if not here? Python's bindings exist (pyXPCOM) and apparently work, but I dont want to learn python to use XUL.

I have looked at other modules: XUL node, WxPerl, Perl-Tk, Gtk2 bindings. They all fail in some way (here's not the place to say why).

Problem: I cant get plXPCOM to compile with XULRunner on ubuntu linux with perl 5.8.8. Can anyone help? Various output is given below. Thanks in advance.

Trying to compile plXPCOM (taken from CVS repository) with xulrunner My .mozconfig is &lt;start&gt; # This file specifies the build flags for XULRunner. . $topsrcdir/xulrunner/config/mozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@ ac_add_options --enable-extensions=default,perl ac_add_options --disable-javaxpcom &lt;end&gt; The "disable java" option was because I was getting no jvi.h although +Sun's JRE is installed. I run linux/ubuntu edgy. From gcc -v: Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran, +objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zli +b --libexecdir=/usr/lib --without-included-gettext --enable-threads=p +osix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enabl +e-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checkin +g=release i486-linux-gnu Thread model: posix gcc version 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5) Mozilla source is from: xulrunner-1.8.0.4-source.tar.bz2 Perl: v5.8.8 built for i486-linux-gnu-thread-multi The make ended with: /usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -typemap /usr/share +/perl/5.8/ExtUtils/typemap -typemap typemap Components.xs > Componen +ts.xsc && mv Components.xsc Components.c Please specify prototyping behavior for Components.xs (see perlxs manu +al) c++ -c -I../../../dist/include/system_wrappers -include ../../../con +fig/gcc_hidden.h -DOSTYPE=\"Linux2.6\" -DOSARCH=\"Linux\" -DBUILD_ID= +0000000000 -I../../../dist/include/xpcom -I../../../dist/include/str +ing -I../../../dist/include/perlxpcom -I../../../dist/include -I../.. +/../dist/include -I../../../dist/include/nspr -I../../../dist/sdk/ +include -fPIC -fno-rtti -fno-exceptions -Wall -Wconversion -Wpoi +nter-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-p +rivacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar - +pthread -pipe -DNDEBUG -DTRIMMED -O -DMOZILLA_CLIENT -include ../. +./../mozilla-config.h -D_GNU_SOURCE -O2 -DVERSION=\"0.81\" -DXS_VE +RSION=\"0.81\" -fPIC "-I/usr/lib/perl/5.8/CORE" Components.c In file included from ../../../dist/include/string/nsAString.h:68, from ../../../dist/include/string/nsSubstring.h:43, from ../../../dist/include/string/nsString.h:44, from ../perlXPUtil.h:46, from Components.xs:39: ../../../dist/include/string/nsTAString.h:41:2: error: #error Cannot u +se internal string classes without MOZILLA_INTERNAL_API defined. Use +the frozen header nsStringAPI.h instead. In file included from ../../../dist/include/string/nsAString.h:74, from ../../../dist/include/string/nsSubstring.h:43, from ../../../dist/include/string/nsString.h:44, from ../perlXPUtil.h:46, from Components.xs:39: ../../../dist/include/string/nsTAString.h:41:2: error: #error Cannot u +se internal string classes without MOZILLA_INTERNAL_API defined. Use +the frozen header nsStringAPI.h instead. ../../../dist/include/xpcom/xptinfo.h: In member function ‘const nsXPT +CMiniVariant* nsXPTConstant::GetValue() const’: ../../../dist/include/xpcom/xptinfo.h:258: warning: type-punning to in +complete type might break strict-aliasing rules Components.xs: In function ‘void XS_Components_Classes(PerlInterpreter +*, CV*)’: Components.xs:99: error: ‘nsComponentManager’ has not been declared Components.xs:111: error: ‘nsComponentManager’ has not been declared Components.xs:114: warning: dereferencing type-punned pointer will bre +ak strict-aliasing rules Components.xs: In function ‘void XS_Components_ClassesByID(PerlInterpr +eter*, CV*)’: Components.xs:138: error: ‘nsComponentManager’ has not been declared Components.xs:141: warning: dereferencing type-punned pointer will bre +ak strict-aliasing rules Components.xs: In function ‘void XS_Components_GetService(PerlInterpre +ter*, CV*)’: Components.xs:190: error: ‘nsComponentManager’ has not been declared Components.xs:221: error: ‘nsServiceManager’ has not been declared Components.xs: In function ‘void XS_Components_Constructor(PerlInterpr +eter*, CV*)’: Components.xs:240: error: ‘nsComponentManager’ has not been declared Components.xs:250: error: ‘nsComponentManager’ has not been declared Components.xs:250: warning: dereferencing type-punned pointer will bre +ak strict-aliasing rules Components.xs: In function ‘void XS_Components_Manager(PerlInterpreter +*, CV*)’: Components.xs:267: error: ‘NS_GetGlobalComponentManager’ was not decla +red in this scope Components.xs:272: error: no matching function for call to ‘perlXPUtil +::makeXPObject(int, nsIID*, nsIComponentManager*&)’ ../perlXPUtil.h:100: note: candidates are: static SV* perlXPUtil::make +XPObject(nsCID*, nsIID*, nsISupports*) Components.xs: In function ‘void XS_Components_WrapObject(PerlInterpre +ter*, CV*)’: Components.xs:291: error: ‘do_CreateInstance’ was not declared in this + scope Components.xs:297: warning: dereferencing type-punned pointer will bre +ak strict-aliasing rules Components.c: In function ‘void XS_rawISupports_DESTROY(PerlInterprete +r*, CV*)’: Components.c:401: warning: unused variable ‘THIS’ Components.c: In function ‘void XS_XPCOM__nsISupports_DESTROY(PerlInte +rpreter*, CV*)’: Components.c:980: warning: unused variable ‘THIS’ nsISupports.xs: In function ‘void XS_XPCOM__nsISupports_QueryInterface +(PerlInterpreter*, CV*)’: nsISupports.xs:91: warning: dereferencing type-punned pointer will bre +ak strict-aliasing rules nsISupports.xs: In function ‘void XS_XPCOM__nsISupports_callXPCOMMetho +d(PerlInterpreter*, CV*)’: nsISupports.xs:700: warning: deleting ‘void*’ is undefined nsISupports.xs:709: warning: deleting ‘void*’ is undefined nsISupports.xs:840: warning: deleting ‘void*’ is undefined nsISupports.xs:130: warning: unused variable ‘t_ctou’ ../../../dist/include/xpcom/nsISupportsUtils.h: In static member funct +ion ‘static const nsIID& nsCOMTypeInfo<T>::GetIID() [with T = nsIComp +onentManager]’: Components.xs:264: instantiated from here ../../../dist/include/xpcom/nsISupportsUtils.h:202: error: incomplete +type ‘nsIComponentManager’ used in nested name specifier /usr/lib/perl/5.8/CORE/reentr.inc: At global scope: /usr/lib/perl/5.8/CORE/reentr.inc:155: warning: ‘group* Perl_reentr_ge +tgrent()’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:233: warning: ‘group* Perl_reentr_ge +tgrgid(gid_t)’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:291: warning: ‘group* Perl_reentr_ge +tgrnam(const char*)’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:438: warning: ‘hostent* Perl_reentr_ +gethostbyaddr(const void*, socklen_t, int)’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:459: warning: ‘hostent* Perl_reentr_ +gethostbyname(const char*)’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:500: warning: ‘hostent* Perl_reentr_ +gethostent()’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:578: warning: ‘char* Perl_reentr_get +login()’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:713: warning: ‘netent* Perl_reentr_g +etnetbyaddr(uint32_t, int)’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:734: warning: ‘netent* Perl_reentr_g +etnetbyname(const char*)’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:792: warning: ‘netent* Perl_reentr_g +etnetent()’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:870: warning: ‘protoent* Perl_reentr +_getprotobyname(const char*)’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:911: warning: ‘protoent* Perl_reentr +_getprotobynumber(int)’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:952: warning: ‘protoent* Perl_reentr +_getprotoent()’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:1010: warning: ‘passwd* Perl_reentr_ +getpwent()’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:1088: warning: ‘passwd* Perl_reentr_ +getpwnam(const char*)’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:1146: warning: ‘passwd* Perl_reentr_ +getpwuid(uid_t)’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:1204: warning: ‘servent* Perl_reentr +_getservbyname(const char*, const char*)’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:1245: warning: ‘servent* Perl_reentr +_getservbyport(int, const char*)’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:1286: warning: ‘servent* Perl_reentr +_getservent()’ defined but not used /usr/lib/perl/5.8/CORE/reentr.inc:1344: warning: ‘spwd* Perl_reentr_ge +tspnam(const char*)’ defined but not used make[5]: *** [Components.o] Error 1 &lt;snip&gt;

In reply to Can plXPCOM be revived? by RHainsworth

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (16)
    As of 2014-07-14 15:54 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      When choosing user names for websites, I prefer to use:








      Results (268 votes), past polls