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

GnomeKeyring.cpp:876:30: error: #if with no expression #38

Closed Rudloff closed 10 years ago

Rudloff commented 10 years ago

I get an error when I try to build on Debian 7.1:

pierre@Rudloff:~/Bureau/mozilla-gnome-keyring$ make
. ./config.vars; \
    make -f Makefile mozilla-gnome-keyring-0.6.9.xpi
make[1]: entrant dans le répertoire « /home/pierre/Bureau/mozilla-gnome-keyring »
g++ GnomeKeyring.cpp -o libgnomekeyring.so -shared -DHAVE_NSILMS_GETISLOGGEDIN= \
        `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 -D__STDC_LIMIT_MACROS 
GnomeKeyring.cpp:876:30: error: #if with no expression
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]
make[1]: *** [libgnomekeyring.so] Erreur 1
make[1]: quittant le répertoire « /home/pierre/Bureau/mozilla-gnome-keyring »
make: *** [build-xpi] Erreur 2
infinity0 commented 10 years ago

I would guess you don't have libgnome-keyring-dev or xulrunner-dev installed. Try installing those then doing the build again.

Rudloff commented 10 years ago

They are both installed:

pierre@Rudloff:~$ aptitude versions libgnome-keyring-dev xulrunner-dev
Paquet libgnome-keyring-dev :                        
i   3.4.1-1                                                              stable                                           500 

Paquet libgnome-keyring-dev:i386 :
p   3.4.1-1                                                              stable                                           500 

Paquet xulrunner-dev :
p   10.0.12esr-1                                                         stable                                           500 
i   17.0.8esr-1~deb7u1                                                   stable                                           500 

Paquet xulrunner-dev:i386 :
p   10.0.12esr-1                                                         stable                                           500 
p   17.0.8esr-1~deb7u1                                                   stable                                           500
infinity0 commented 10 years ago

Please run make clean-all then tell me the output of make config.vars and then cat config.vars. For example, I have:

$ make config.vars
CXX="g++" XUL_CFLAGS="`pkg-config --cflags libxul`" XUL_LDFLAGS="`pkg-config --libs libxul`" XPCOM_ABI_FLAGS="`pkg-config --libs-only-L libxul | sed -e 's/-L\(\S*\).*/-Wl,-rpath=\1/' | sed -n -e 'p;s/^\(.*\)-devel\(.*\)\/lib$/\1\2/gp'`" GNOME_CFLAGS="`pkg-config --cflags gnome-keyring-1`" GNOME_LDFLAGS="`pkg-config --libs gnome-keyring-1`" CXXFLAGS="-Wall -fno-rtti -fno-exceptions -fPIC -std=gnu++0x -D__STDC_LIMIT_MACROS" LDFLAGS="" sh config.sh GnomeKeyring.h xpcom_abi.cpp Makefile > config.vars
<stdin>:2:60: error: no ‘nsresult GnomeKeyring::GetIsLoggedIn(bool*)’ member function declared in class ‘GnomeKeyring’

$ cat config.vars 
export XUL_VERSION=17.0.7
export XUL_VER_MIN=17.0
export XUL_VER_MAX=17.*
export HAVE_NSILMS_GETISLOGGEDIN=0
export HAVE_MOZGLUE=1
export PLATFORM=Linux_x86_64-gcc3
export HAVE_CONFIG_VARS=1
Rudloff commented 10 years ago

I have no idea why but after a make clean-all it now works.