# Zotero standalone, xulrunner couldn't load xpcom



## mdl90 (Feb 26, 2016)

I am attempting to run Zotero standalone on FreeBSD 10.2, after installing EFL:


```
$ ./zotero
XPCOMGlueLoad error for file /usr/home/me/Zotero_linux-i686/xulrunner/libxul.so:
libXrender.so.1: cannot open shared object file: No such file or directory
Couldn't load XPCOM.
```

I see posts in this forum from 2010-13 concerning libxul and build dependencies, but I am not sure if that is directly related to the above error. Can anyone advise?

...


```
$ ldd /usr/home/me/Zotero_linux-i686/xulrunner/libxul.so
ldd: /usr/home/me/Zotero_linux-i686/xulrunner/libxul.so: not a FreeBSD ELF shared object
```

What does that mean?


----------



## SirDice (Feb 26, 2016)

As it's a Linux binary make sure you have emulators/linux_base-c6 installed. Besides the basic Linux support you may also need to install some additional Linux libraries.


----------



## mdl90 (Feb 26, 2016)

Yes, I have installed the emulator and used `brandelf -t Linux file`

I've checked the existence of libraries mentioned in any error messages (esp. libXrender and fontconfig which are to be found in /usr/local/bin/).

I have also looked at:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/linuxemu-lbc-install.html

What libraries might I be missing? How can I determine this?

...I see xulrunner on Mozilla:

https://developer.mozilla.org/en-US/docs/Archive/Mozilla/XULRunner/2.0

There are Linux libraries there. If I understand you correctly, I will need those, not the FreeBSD libraries I've identified in my initial post. Where do I put those Linux libraries, once unpacked? How do I link to them?


----------



## mdl90 (Feb 26, 2016)

Looking again in the docs:

10.2.1. Installing Additional Libraries Manually

I run `brandelf -t Linux ...` on library files in the orginal (Linux) Zotero extracted folder:



```
$ brandelf -t Linux xulrunner/lib
xulrunner/libfontconfig.so.1 xulrunner/libfreebl3.chk 
xulrunner/libfreebl3.so  xulrunner/libmozalloc.so 
xulrunner/libmozsqlite3.so  xulrunner/libnspr4.so 
xulrunner/libnss3.so  xulrunner/libnssckbi.so 
xulrunner/libnssdbm3.chk  xulrunner/libnssdbm3.so 
xulrunner/libnssutil3.so  xulrunner/libplc4.so 
xulrunner/libplds4.so  xulrunner/libsmime3.so 
xulrunner/libsoftokn3.chk  xulrunner/libsoftokn3.so 
xulrunner/libssl3.so  xulrunner/libXrender.so.1 
xulrunner/libxul.so 
$ brandelf -t Linux xulrunner/libXrender.so.1
$ ./zotero
XPCOMGlueLoad error for file /usr/home/me/Zotero_linux-i686/xulrunner/libxul.so:
libXrender.so.1: cannot open shared object file: No such file or directory
Couldn't load XPCOM.
```


----------



## kpa (Feb 26, 2016)

You're missing the Linux versions of the X11 libraries, the error message is about libXrender.so.1. Try installing x11/linux-c6-xorg-libs.


----------



## mdl90 (Feb 26, 2016)

Ok, then I get this:


```
[1/1] Extracting linux-c6-xorg-libs-7.4_4: 100%
$ ./zotero
XPCOMGlueLoad error for file /usr/home/mdl/Zotero_linux-i686/xulrunner/libxul.so:
libasound.so.2: cannot open shared object file: No such file or directory
Couldn't load XPCOM.
$ sudo find / -name libasound.so.2
/usr/local/lib/libasound.so.2
```

...now I found this:

http://www.freshports.org/emulators/linux-c6/

...I think I get the idea - install those libraries:

`sudo pkg install audio/linux-c6-alsa-utils`
`devel/linux-c6-dbus-glib`
`x11-toolkits/linux-c6-gtk2`

etc.

then:


```
$ ./zotero
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
process 46149: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
  D-Bus not built with -rdynamic so unable to print a backtrace
^C^CAbort trap (core dumped)
```

Fix dbus error.


```
$ ./zotero
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
```

And I am (more or less) there.


----------

