Skip to content

Instantly share code, notes, and snippets.

@dosorio
Last active August 1, 2023 19:34
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dosorio/ea4baf66ee68821014d7dc6d92a48c55 to your computer and use it in GitHub Desktop.
Save dosorio/ea4baf66ee68821014d7dc6d92a48c55 to your computer and use it in GitHub Desktop.
Commands to install sybilSBML R package on MacOS/Linux
wget https://downloads.sourceforge.net/project/sbml/libsbml/5.17.0/stable/libSBML-5.17.0-core-plus-packages-src.tar.gz
tar -xxvf libSBML-5.17.0-core-plus-packages-src.*
cd libSBML-5.17.0-Source
./configure --prefix=/usr/local/ \
--enable-cpp-namespace \
--enable-fbc \
--enable-shared \
--with-gnu-ld \
--enable-layout \
--enable-comp \
--enable-qual \
--enable-groups \
--enable-compression \
--enable-shared-version
make
sudo make install
cd ..
# LINUX Only: sudo ldconfig
export DYLD_LIBRARY_PATH=/usr/local/lib
wget https://cran.r-project.org/src/contrib/Archive/sybilSBML/sybilSBML_3.0.1.tar.gz
R CMD INSTALL sybilSBML_3.0.1.tar.gz
@juanvillada
Copy link

Thanks!

After struggling a lot, your script worked fine and smooth.

Best wishes.

@francescodc87
Copy link

I followed this and I got this error
Error: package or namespace load failed for ‘sybilSBML’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/mqbpqfd2/R/x86_64-pc-linux-gnu-library/3.4/sybilSBML/libs/sybilSBML.so':
/home/mqbpqfd2/R/x86_64-pc-linux-gnu-library/3.4/sybilSBML/libs/sybilSBML.so: undefined symbol: FbcReactionPlugin_isSetGeneProductAssociation
Error: loading failed
Execution halted

any help?

@dosorio
Copy link
Author

dosorio commented Feb 28, 2018

Gracias @juanvillada! Me alegra que funcionara bien! Saludos!

@dosorio
Copy link
Author

dosorio commented Feb 28, 2018

@francescodc87 In some linux machines you need to link the library using the $ sudo ldconfig instruction. I've updated the script.

@ptrebulle
Copy link

After struggling for 2 days to install sybilSBML on my MacOS and every possible way, I found your script and after updating it to libSBML 5.16 everything is working perfectly ! I just created this account to thank you so much for making this script available !

@dosorio
Copy link
Author

dosorio commented Mar 24, 2018

@ptrebulle You are welcome! I'm really pleased that it works well for you.

@ampinzonv
Copy link

Awesome!!! Thanks buddy it worked like a charm (some issues with my libxml2, but thats a different story). Nice work.

@thh32
Copy link

thh32 commented Aug 28, 2018

Thank you so much for writing this!

@cskaandorp
Copy link

Like a charm, Mac Catalina, THANK YOU!

@hites77
Copy link

hites77 commented Sep 16, 2020

Yupp worked in my case too, thanks for compiling all steps in one script.
Just one query how can I install in linux server as I dont have super user right to run sudo ldconfig.

@hites77
Copy link

hites77 commented Oct 3, 2020

Just I try to update with latest version of sybilSBML and now it throws the error

checking sbml/SBMLTypes.h usability... no
checking sbml/SBMLTypes.h presence... no
checking for sbml/SBMLTypes.h... no
configure: error: Could not find SBMLTypes.h:
sybilSBML requires libSBML from http://www.sbml.org/.
use --with-sbml-include or PKG_CPPFLAGS to specify the include path.
ERROR: configuration failed for package ‘sybilSBML’

@dosorio
Copy link
Author

dosorio commented Oct 5, 2020

Hi @hites77,

Here is the official notice from libSBML: LibSBML supports two build systems: CMake, and GNU autoconf plus GNU make. CMake is preferred and is the only one supported for building SBML Level 3 package extensions; the use of GNU autoconf and GNU make is deprecated. I will work on a solution to that problem.

Best,

Daniel

@hites77
Copy link

hites77 commented Oct 17, 2020

Hi Daniel,

Thanks for sharing the libSBML notes. I followed the instructions given in https://github.com/opencor/libsbml and installed the libSBML using cmake GUI and in its configuration I also selected the R. (also installed swig). and then at last successfully installed the latest version of sybilSBML.

Copy link

ghost commented Mar 23, 2021

Hello! Thanks for sharing this wonderful script! It's really great!
I was wondering if you have also experience with installing sybilSBML on Macos Catalina (10.15.7). I tried all options (available at http://sbml.org/Software/libSBML/5.18.0/docs/cpp-api/libsbml-installation.html) but CMake fails to configure and to build libSBML. I also tried your script (which worked fantastic on Ubuntu) but I get all sorts of error from c++ (such as /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:329:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;).
Thank you so much in advance

@ntromas
Copy link

ntromas commented Apr 9, 2021

Hi everyone,
Thanks for the super useful script! I wonder if anyone have already met this issue with the package version 3.1.2?
R CMD INSTALL --configure-args="--with-sbml-include=/usr/local/include/ --with-sbml-lib=/usr/local/lib/" sybilSBML_3.1.2.tar.gz

  • installing to library ‘/home/nico/R/x86_64-pc-linux-gnu-library/4.0’
  • installing source package ‘sybilSBML’ ...
    ** package ‘sybilSBML’ successfully unpacked and MD5 sums checked
    ** using staged installation
    checking for gcc... gcc -std=gnu99
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc -std=gnu99 accepts -g... yes
    checking for gcc -std=gnu99 option to accept ISO C89... none needed
    checking how to run the C preprocessor... gcc -std=gnu99 -E
    checking for pkg-config... /usr/bin/pkg-config
    configure: set compile and link flags according to pkg-config
    configure: compile flags are -I/usr/local/include -I/usr/include/libxml2
    configure: link flags are -L/usr/local/lib -lsbml
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking sbml/SBMLTypes.h usability... yes
    checking sbml/SBMLTypes.h presence... yes
    checking for sbml/SBMLTypes.h... yes
    checking for library containing readSBML... no
    configure: error: Could not link to libSBML:
    use --with-sbml-lib or PKG_LIBS to specify the library path and the libraries to pass to the linker.
    ERROR: configuration failed for package ‘sybilSBML’
  • removing ‘/home/nico/R/x86_64-pc-linux-gnu-library/4.0/sybilSBML’

Thanks for your help!

Nico

Copy link

ghost commented Apr 11, 2021

Hi Nico,

I got this error in Ubuntu20.04 and 16.04, for sybilSBML 3.1.2 and 3.0.1.
I tested many things, in the end it worked only for sybilSBML3.0.1 after reinstalling libSBML. For libSBM I did:

$ ./configure --prefix=/usr/local/ --enable-cpp-namespace --enable-fbc --enable-shared --with-gnu-ld --enable-layout --enable-comp --enable-qual --enable-groups --enable-compression --enable-shared-version
$ make
$ sudo make install
$ sudo ldconfig
And in the end:
$ export DYLD_LIBRARY_PATH=/usr/local/lib/

After this I just installed sybilSBML with:
$ R CMD INSTALL sybilSBML_3.0.1.tar.gz

I tried to get some help from sybilSBML developers for the installation of last version (as well as for my biggest problem, the installation in Macos!), but unfortunately no success! It will be great someone could open a communication channel!

Cheers

@ntromas
Copy link

ntromas commented Apr 12, 2021

Hi!
Thanks! Unfortunately, the pipeline I am using really requires the latest version...I tried with Ubuntu 20.04 and MacOs Big Sur but no luck.
Not sure what I am doing wrong...

Cheers,

Copy link

ghost commented Apr 12, 2021

MacOS Big Sur will not work, at least until they fix the CLT (or if you are confident enough to use some CLT developer versions). It will be great if someone would manage in the end to get a chat with sybilSBML developers, the package was just updated last year. Did you also try to reinstall R?

Cheers

@silvtal
Copy link

silvtal commented May 6, 2022

Very useful, thank you so much !

@hariszaf
Copy link

Hi everyone!
I am trying to use this with Ubuntu 22 and R 4.1.2 but I keep getting the following error:

ERROR: dependency ‘sybil’ is not available for package ‘sybilSBML’

Any ideas what I could do?
Thanks a lot in advance! 🙇

@Braden-Griebel
Copy link

Thank you so much! I have been struggling to get an install of this working for so long, and this worked!

@mihai-sysbio
Copy link

I've had a go at improving the installation instructions https://github.com/SysBioChalmers/sybil-SBML#installation
Feedback is welcomed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment