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).
Trying to compile plXPCOM (taken from CVS repository) with xulrunner
My .mozconfig is
<start>
# 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
<end>
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
<snip>