MarcEdit Z39.50 on ‘Nix

I need to send this out to the 15 or so folks that have agreed to be my first guinea pigs testing out a MarcEdit build on ‘Nix and Mac systems (and btw, Mac UI rendering isn’t good.  That’s not surprising because Mono’s UI changes tend to show up correctly on ‘Nix first, then Mac — so I’m hopefully the planned 2.6 update in Sept. will correct many of the errors) but I wanted to document it here as well so I don’t forget to add it the installation instructions later.

In Windows, MarcEdit includes the yaz install as part of the application installation.  This means that when people install MarcEdit, all the dependencies that they need are installed as well.  With Linux, that won’t be the case.  On Linux, you will need to make sure that you install the yaz and yaz-devel packages.  Once installed, you need to make one more change (and here’s the trick).

In MarcEdit windows, the yaz dll has been marked, renamed as yaz3.dll.  The reason for this is that I don’t want to be accidently over-writing a previous installation of the software (in case other programs on the system are relying on older or newer versions of the library).  This works fine in Windows, but on Linux, the problem is that the yaz components are installed as yaz (not yaz2, yaz3, etc).  So, in Mono, the way that the framework makes calls to native libraries through PInvoke is to look for the linked file and then start checking the following locations for the following file names (using yaz3.dll as the example):

  • Application Path/yaz3.dll
  • Application Path/yaz3.dll.so
  • Application Path/libyaz3.so
  • Application Path/lib/yaz3.dll
  • Application Path/lib/yaz3.dll.so
  • Application Path/lib/libyaz3.so
  • System/lib/yaz3.dll
  • System/lib/yaz3.dll.so
  • System/lib/libyaz3.so

The problem is a simple one — when yaz is built either by source or package manager, you end up with a shared object called: libyaz.so.  So, the simple solution is to setup a symlink from System/lib/libyaz.so to System/lib/libyaz3.so.  So, on my Ubuntu install, that would be creating a symlink in the following path (/usr/lib/) using the following command:

  • ln libyaz.so libyaz3.so

And that’s it.  Once I made that change, the Z39.50 client started working as expected, and now this information has been documented so I can make sure it makes it into the INSTALL.txt file.

Cheers everyone,

–TR


Posted

in

by

Tags: