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

Build errors on Ubuntu 12.04 #20

Closed ilpssun closed 11 years ago

ilpssun commented 11 years ago

The extension does not build out-of-the-box on Ubuntu 12.04. I managed to piece together a solution but I thought it would be nice to have all related issues collected in one place to make it easier for others to build the extension.

My system is currently running Ubuntu 12.04 with thunderbird 15.0+build1-0ubuntu0.12.04.1 and firefox 15.0.1+build1-0ubuntu0.12.04.

  1. The first step is to clone the git repo, obviously
  2. Install missing packages (the first two replace the xulrunner-dev package mentioned in the readme):
    • firefox-dev
    • thunderbird-dev
    • libgnome-keyring-devel
  3. Then, according to issue #10 (specificly comment https://github.com/infinity0/mozilla-gnome-keyring/issues/10#issuecomment-5408150), set up the build environment manually:
    • export XUL_CFLAGS="-I/usr/include/thunderbird -I/usr/include/thunderbird/nspr"
    • export XUL_LDFLAGS="-L/usr/lib/thunderbird-devel/lib -lxpcomglue_s -lxul -lxpcom -lmozalloc -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
    • export XPCOM_ABI_FLAGS="-Wl,-rpath=/usr/lib/thunderbird-devel/lib"
  4. According to issue #12 (specificly comment https://github.com/infinity0/mozilla-gnome-keyring/issues/12#issuecomment-6157712) set up the platform manually, because xpcom_abi segfaults: export PLATFORM="Linux_x86_64-gcc3" (obviously, you have to adjust this if you have a 32-bit OS)
  5. Run make
  6. Install the mozilla-gnome-keyring-*.xpi file into thunderbird/firefox
  7. Before restarting, think a second about where to store your passwords. If you would like to store them in your login keyring (the one that's unlocked when you sign into the computer), you need to manually create a new string key in the advanced configuration. To do so, right-click in the dialog and choose “New → String”. Create the key extensions.gnome-keyring.keyringName and set the value to the name of the keyring to use. For the login keyring, use login. The default is mozilla.
  8. Restart thunderbird/firefox and enter all your passwords anew :-)

BTW: I tested this only with tunderbird.

fat-lobyte commented 11 years ago

Building on Ubuntu is quite hard, as you probably noticed. I advise you to use my Ubuntu package. You can add my PPA: https://launchpad.net/~fat-lobyte9/+archive/ppa-public and install xul-ext-gnome-keyring.

Alternatively, you can check out my GitHub branch: https://github.com/fat-lobyte/mozilla-gnome-keyring/tree/ubuntu You can build it from source by following these steps:

  1. Install the packages cdbs, debhelper (>= 7), mozilla-devscripts (>= 0.28), firefox-dev (>= 10.0), libgnome-keyring-dev

    sudo apt-get install build-essential cdbs debhelper mozilla-devscripts firefox-dev libgnome-keyring-dev

  2. Change to the source directory and add my repo as a remote:

    cd /path/to/mozilla-gnome-keyring git remote add github-fat-lobyte https://github.com/fat-lobyte/mozilla-gnome-keyring.git

  3. Get refs from my remote

    git fetch github-fat-lobyte

  4. Check out my ubuntu branch

    git checkout ubuntu

  5. Issue the following command:

    debuild -us -uc

You should now have a file called xul-ext-gnome-keyring_0.6.4~git20120725-0ubuntu2_amd64.deb in your parent directory.

  1. Install this file with sudo dpkg -i ../xul-ext-gnome-keyring_0.6.4~git20120725-0ubuntu2_amd64.deb

@infinity0: Maybe you could put a link in your Repo description or the README to the ubuntu branch so people won't have to go through the Ubuntu build process themselves?

infinity0 commented 11 years ago

I've added it to the README, and will close this bug if everyone is happy about that. It is right at the bottom but I don't really see any other appropriate place. Perhaps a separate README.dev file?

fat-lobyte commented 11 years ago

I think the link in the README should be enough. If people run into build errors, they are likely to check the README for solutions.

ilpssun commented 11 years ago

I agree. The solution with the ReadMe file is fine.

infinity0 commented 11 years ago

OK! Closing then. :)