INSTALL 3.05 KB
Newer Older
1
2
3
GNU R package sybilSBML: Link to libSBML for sybil


4
5
6
7
# ---------------------------------------------------------------------------- #
# All Systems
# ---------------------------------------------------------------------------- #

8
First make sure you have installed libsbml >= 5.16 with the FBC and groups
9
10
package. At http://sbml.org/Software/libSBML you can find installers for various
plattforms and the source to compile by yourself. In this case download the file
11
libSBML-5.16.0-core-plus-packages-src.* from their sourceforge page and use the 
12
configure options "--enable-fbc --enable-groups".
13

14
15
16
17
18
19
20
The installation procedure for the sybilSBML package needs to know where to
find the libSBML include directory and where to find the callable library.

# ---------------------------------------------------------------------------- #
# Linux and MacOS X installation
# ---------------------------------------------------------------------------- #

21
22
23
24
NOTE for MacOS: Onward from OS X 10.11 you might need to deactivate the System
Integrity Protection (SIP). Otherwise R won't be able to load the compiled
library.

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
There are basically four different ways of installing the sybilSBML package:

1) Use --with-sbml-<ARG>

   --with-sbml-include=PATH     with PATH being the include directory of libSBML

   --with-sbml-lib=PATH         with PATH being the directory containing the
                                callable library.

   R CMD INSTALL --configure-args=" \
       --with-sbml-include=/path/to/include/dir \
       --with-sbml-lib=/path/to/lib/dir" sybilSBML_X.X.X.tar.gz


   When using --with-sbml-<ARG>, both arguments must be given.

2) Use of environment variables

   PKG_CPPFLAGS                giving the PATH to the include directory of libSBML
   PKG_LIBS                    giving the PATH to the directory containing the
                               callable library and the libraries to link to.

3) Use --prefix

   --prefix=PATH               with path being the installation directory of
                               sybilSBML. The include directory is assumed to be
                               PATH/include and the callable library should be
                               in PATH/lib.

   If either --with-sbml-<ARG> nor --prefix is given, it is checked wether
   libSBML is located in /usr/local/include and /usr/local/lib[64] and
   /usr/include and /usr/lib[64].


4) Use pkg-config

   If pkg-config is available on your system, the pkg-config information
   of libSBML will be used.


# ---------------------------------------------------------------------------- #
# Windows installation
# ---------------------------------------------------------------------------- #

For the installation on Windows systems the file Makewars.win in src/ is
required. The file looks like this:

PKG_CPPFLAGS= -D_R_=1 -DUSE_R=1 -I"$(LIB_SBML)/include"

PKG_LIBS = -L"$(LIB_SBML)/bin" -lsbml

all: $(SHLIB)
	mkdir -p "$(R_PACKAGE_DIR)/libs$(R_ARCH)"
	cp "$(LIB_SBML)/bin/libsbml.dll" "$(R_PACKAGE_DIR)\libs$(R_ARCH)"

with the environment variable LIB_SBML being the installation directory
of libSBML.