Building zotero standalone from git

For a long time I was successfully able to build zotero standalone on linux from a cloned git tree. More recently, however, the build.sh script has changed and now requires a '-f FILE (ZIP file to build from)' option to be supplied and it is not clear (to me at least) what the build procedure might now be.

So, are there updated instructions anywhere that I can follow?

(In passing I will note that the fetch_xulrunner.sh script downloads the most recent xulrunner (41.0.2) but this segfaults for me - the most recent version that will work for me is 39.0.3).

The reason that rebuilding standalone is urgent for me is that opening snapshots from standalone has stopped working. Presumably for the following reason:

/usr/local/src/zotero-standalone-build/staging/Zotero_linux-x86_64/xulrunner/libnss3.so: version `NSS_3.22' not found (required by /usr/lib64/firefox/libxul.so), i.e. a mis-match between the zotero stuff and firefox (48.0).

Many thanks.
  • 1) I assume there's a reason you're not just using the official version of Zotero Standalone?

    2) If it's urgent and you don't want to use our Linux version or distro-specific packaged versions, you can always just check out an older zotero-standalone-build commit before these changes.

    3) We're aware of the segfault with newer xulrunner versions. We haven't put out a release from a newer version yet because of this.

    4) The zotero-standalone-build scripts now depend on an XPI produced by the main Zotero build files in https://github.com/zotero/zotero-build (in the 'xpi' directory).
  • Thanks for the quick response.

    Using git is mainly historical but until now there have not been any build problems except with a too-recent version of xulrunner.

    I have now tried 4.0.29.10 standalone with 4.0.29.11 as the firefox(48.0) connector and still get the same problem in standalone when trying to view snapshots (similarly with 'View online' from the context menu):

    [...]/Zotero/xulrunner/libnss3.so: version `NSS_3.22' not found (required by /usr/lib64/firefox/libxul.so).

    No problem natively from within firefox.

    Looking at the update logs on my system I see that nothing earlier than nss-3.23 has been installed since early June (currently 3.26) at which time I am certain that I was not seeing any problems - although I can't be definite about when they started.
  • I have now tried 4.0.29.10 standalone
    Meaning the tarball from zotero.org, or one you built yourself?

    Zotero certainly shouldn't be using the system libxul.so, and doesn't for me on Ubuntu — an "lsof | grep zotero | grep libxul" shows the libxul.so within the xulrunner directory from the tarball.
  • 4.0.29.10 standalone is from the official zotero.org distribution.

    I have found that results vary depending on how zotero from that distribution is started:

    a) failing to open snapshots, view online, etc:

    $ ./run-zotero.sh

    $ lsof | grep zotero | grep libxul
    zotero 8777 user mem REG 8,7 61853408 26608617 [...]/Zotero/Zotero_linux-x86_64-4.0.29.10/xulrunner/libxul.so

    b) successfully opening snapshots, view online, etc.:

    $ ./zotero

    $ lsof | grep zotero | grep libxul
    zotero 10343 user mem REG 8,7 61853408 26608617 [...]//Zotero/Zotero_linux-x86_64-4.0.29.10/xulrunner/libxul.so

    which is weird as the (edited-for-space) output from lsof is the same in both instances.

    Looking at the environment for each running process (cat /proc/<pid>/env | tr \\0 \\n | egrep 'LD_LIBRARY_PATH|LIBRARY_PATH|LIBPATH') for a) shows only local directories belonging to the zotero distribution (xulrunner{,/plugins,/components}; while b) shows no output.

    So, why things fail using ./run-zotero.sh when it appears to be doing the right thing in the environment isn't obvious when using ./zotero doesn't modify the environment but then works as expected.
  • Despite the name, ./run-zotero.sh isn't meant to be used. (That's just an artifact of the Mozilla build process.) ./zotero is the way to start Zotero.
  • Well, that clears that one up then ..., thanks very much.

    I'll pursue the git building aspect when I get some time and if there seems any gain in doing so.

    Thanks again.
Sign In or Register to comment.