Project

Profile

Help

How to use SaxonC 11.1 HE and EE on the same Linux system at the same time?

Added by Martin Honnen almost 3 years ago

I was wondering whether/how it is possible to install and run SaxonC 11.1 HE and EE on the same Linux system side by side.

The installation instructions are the same to do e.g.

  1. sudo cp libsaxon[EDITION].so /usr/lib/.
  2. sudo cp -r rt /usr/lib/.
  3. sudo cp -r saxon-data /usr/lib/.

but for me diff -qr libsaxon-HEC-11.1/rt libsaxon-EEC-11.1/rt gives Files libsaxon-HEC-11.1/rt/lib/rt.jar and libsaxon-EEC-11.1/rt/lib/rt.jar differ so I guess I can't just install one edition and hope the rt will work for both of them.

Any hint on how to install HE and EE side by side?


Replies (4)

Please register to reply

RE: How to use SaxonC 11.1 HE and EE on the same Linux system at the same time? - Added by O'Neil Delpratt almost 3 years ago

This should be possible for the C++ API, but not currently for Python and PHP extensions.

To get this to work across all APIs some configuration changes are needed.

RE: How to use SaxonC 11.1 HE and EE on the same Linux system at the same time? - Added by O'Neil Delpratt over 2 years ago

Hi, I had another think about this and I think it should be possible with the current releases. In terms of the SaxonC files the only real different between the products are the following:

  1. The libsaxon[edition].so library files, which you would have copied in the location /usr/lib or use SAXONC_HOME to specify their location
  2. The SaxonCGlue.h and SaxonCGlue.c which has references to the library files.

You would have to build the python libraries for each edition. My only reservation is I am not sure how these would live together on the same system when you install the extension library. When you import saxonc from your python script where does it look for the library. The same applies to PHP. One solution is to have one reference to the edition on the PYTHONPATH environment variable you intend to run.

I hope that helps.

RE: How to use SaxonC 11.1 HE and EE on the same Linux system at the same time? - Added by Martin Honnen over 2 years ago

On Windows I have SaxonC HE and EE in two different directories, all compiled, and to use them at the same time I can just have two different command lines or Powershell windows, one setting SAXONC_HOME (and for Python PYTHONPATH) to the relevant SaxonC HE directories, the other setting those two variables to the relevant SaxonC EE directory.

On Linux it would be nice to be able to do the same, i.e. to just switch the SAXONC_HOME (plus for Python PYTHONPATH) in two different terminal/shell windows. If the default for SAXONC_HOME on Linux is /usr/lib and I would install HE there, what would be a good place to install EE to?

RE: How to use SaxonC 11.1 HE and EE on the same Linux system at the same time? - Added by O'Neil Delpratt over 2 years ago

Hi,

As a suggestion maybe install library to /usr/local/HE or /usr/local/lib/HE and for EE: /usr/lib or /usr/local/EE. Its up to you, any option should work. In your scripts just set SAXONC_HOME accordingly.

    (1-4/4)

    Please register to reply