infinity0 / mozilla-gnome-keyring-legacy

A firefox extension that enables Gnome Keyring integration (legacy version)
https://bugzilla.mozilla.org/show_bug.cgi?id=309807
Other
55 stars 8 forks source link

Does not build with XULRunner 17 #27

Closed seschwar closed 11 years ago

seschwar commented 11 years ago

mozilla-gnome-keyring 4a9993e fails to build with XULRunner 17.0:

$ make
g++ xpcom_abi.cpp -o xpcom_abi `pkg-config --cflags libxul` `pkg-config --libs libxul` `pkg-config --libs-only-L libxul | sed -e 's/-L\(\S*\).*/-Wl,-rpath=\1/' | sed -n -e 'p;s/^\(.*\)-devel\(.*\)\/lib$/\1\2/gp'` -Wall -fno-rtti -fno-exceptions -fPIC -std=gnu++0x  HashFunctions.cpp
xpcom_abi.cpp: In function ‘int main(int, char**)’:
xpcom_abi.cpp:24:46: error: ‘nsnull’ was not declared in this scope
make: *** [xpcom_abi] Error 1

And not only xpcom_abi fails, but more importantly also libgnomekeyring.so:

$ touch xpcom_abi
$ make PLATFORM=Linux_x86-gcc3
make -f Makefile mozilla-gnome-keyring-0.6.5.xpi
make[1]: Entering directory `/home/seschwar/code/mozilla-gnome-keyring'
g++ GnomeKeyring.cpp -o libgnomekeyring.so -shared \
    `pkg-config --cflags libxul` `pkg-config --libs libxul` `pkg-config --cflags gnome-keyring-1` `pkg-config --libs gnome-keyring-1` -Wall -fno-rtti -fno-exceptions -fPIC -std=gnu++0x 
GnomeKeyring.cpp: In constructor ‘AutoPtr<T, F>::AutoPtr()’:
GnomeKeyring.cpp:142:22: error: ‘nsnull’ was not declared in this scope
GnomeKeyring.cpp: In function ‘nsILoginInfo* foundToLoginInfo(GnomeKeyringFound*)’:
GnomeKeyring.cpp:452:12: error: ‘nsnull’ was not declared in this scope
GnomeKeyring.cpp: In member function ‘virtual nsrefcnt GnomeKeyring::Release()’:
GnomeKeyring.cpp:560:1: warning: deleting object of polymorphic class type ‘GnomeKeyring’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
GnomeKeyring.cpp: In member function ‘virtual nsresult GnomeKeyring::Init()’:
GnomeKeyring.cpp:590:36: error: ‘nsnull’ was not declared in this scope
make[1]: *** [libgnomekeyring.so] Error 1
make[1]: Leaving directory `/home/seschwar/code/mozilla-gnome-keyring'
make: *** [build-xpi] Error 2
pehlm commented 11 years ago

Have the same issue building on ubuntu 12.04 precise with fat-lobyte's source. exactly as this:

xpcomabi.cpp: In function ‘int main(int, char*)’: xpcomabi.cpp:24:46: error: ‘nsnull’ was not declared in this scope make: ** [xpcom_abi] Error 1

fat-lobyte commented 11 years ago

nsnull seems to have been removed from XPCOM. Since we build with "--std=c++0x" anyway I think it's safe to replace all occurences of "nsnull" with "nullptr".

seschwar commented 11 years ago

On 2012-11-23 at 02:45 -0800 Alexander Korsunsky wrote:

I think it's safe to replace all occurences of "nsnull" with "nullptr".

OK, I replaced nsnull with nullptr and so far everything build and runs just fine.

pehlm commented 11 years ago

Thank you, it's now working again.

infinity0 commented 11 years ago

Thanks!