How to build libsbml with distrib python package?

10 views
Skip to first unread message

Matthias König

unread,
Mar 13, 2019, 1:43:37 PM3/13/19
to libsbml-development
Hi all,

I wanted to work with the current distrib code in python (testing some reading and writing).
But I cannot figure out how to build libsbml + python bindings with distrib support.

I checked out the libsbml-experimental branch and then do

cmake -DWITH_BZIP2=OFF -DWITH_ZLIB=OFF -DENABLE_L3V2EXTENDEDMATH=ON -DENABLE_ARRAYS=ON -DENABLE_COMP=ON -DENABLE_DISTRIB=ON -DENABLE_DYN=ON -DENABLE_FBC=ON -DENABLE_GROUPS=ON -DENABLE_LAYOUT=ON -DENABLE_MULTI=ON -DENABLE_QUAL=ON -DENABLE_RENDER=ON -DENABLE_REQUIREDELEMENTS=ON -DENABLE_SPATIAL=ON -DWITH_EXAMPLES=ON -DWITH_PYTHON=ON -DWITH_CREATE_PYTHON_SOURCE=ON $HOME/svn/sbml-code/libsbml

make -j8
make install

Everything works fine until here.
But when I try to install the python package via

cd $LIBSBML_BUILD/src/bindings/python/out/
python setup.py install

I get the following errors (I tried once on a local ubuntu 16.04 LTS with python 2.7 and in a docker container based on python:3.6 image:

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DLINUX -DUSE_LIBXML -DUSE_ZLIB -DUSE_BZ2 -DUSE_COMP -DUSE_GROUPS -DUSE_QUAL -DUSE_FBC -DUSE_LAYOUT -DUSE_ARRAYS -DUSE_DISTRIB -DUSE_GROUPS -DUSE_MULTI -DUSE_DYN -DUSE_RENDER -DUSE_MULTI -DUSE_REQUIREDELEMENTS -DUSE_SPATIAL -DUSE_L3V2EXTENDEDMATH -I/usr/include/libxml2 -I./base// -I./base//sbml -I./base//sbml/compress -I./base//sbml/validator/constraints -I./base//sbml/packages/comp/validator -I./base//sbml/packages/comp/validator/constraints -I. -I/usr/include/python2.7 -c ./base/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathMathMLConsistencyValidator.cpp -o build/temp.linux-x86_64-2.7/./base/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathMathMLConsistencyValidator.o
./base/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathMathMLConsistencyValidator.cpp:48:72: fatal error: constraints/L3v2extendedmathMathMLConsistencyConstraints.cpp: No such file or directory
 #include "constraints/L3v2extendedmathMathMLConsistencyConstraints.cpp"
                                                                        ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DLINUX -DUSE_LIBXML -DUSE_ZLIB -DUSE_BZ2 -DUSE_COMP -DUSE_GROUPS -DUSE_QUAL -DUSE_FBC -DUSE_LAYOUT -DUSE_ARRAYS -DUSE_DISTRIB -DUSE_GROUPS -DUSE_MULTI -DUSE_DYN -DUSE_RENDER -DUSE_MULTI -DUSE_REQUIREDELEMENTS -DUSE_SPATIAL -DUSE_L3V2EXTENDEDMATH -I/usr/include/libxml2 -I./base// -I./base//sbml -I./base//sbml/compress -I./base//sbml/validator/constraints -I./base//sbml/packages/comp/validator -I./base//sbml/packages/comp/validator/constraints -I. -I/usr/local/include/python3.6m -c ./base/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathMathMLConsistencyValidator.cpp -o build/temp.linux-x86_64-3.6/./base/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathMathMLConsistencyValidator.o
./base/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathMathMLConsistencyValidator.cpp:48:72: fatal error: constraints/L3v2extendedmathMathMLConsistencyConstraints.cpp: No such file or directory
 #include "constraints/L3v2extendedmathMathMLConsistencyConstraints.cpp"
                                                                        ^
compilation terminated.


Not sure what is going on here.
Do I have to set different cmake flags?

Best Matthias

Frank T. Bergmann

unread,
Mar 13, 2019, 2:20:11 PM3/13/19
to libsbml-development
Hello Matthias,

It looks to me that an update is needed for creating the python source archive with extended math support.

You did everything right.

I might be able to have a look tomorrow

Cheers
Frank

Brett

unread,
Mar 13, 2019, 7:23:52 PM3/13/19
to libsbml-development
Hi Frank, Matthias

Experimental update got lost somewhere (stable fine), fixed in SVN.

Cheers
Brett

Matthias König

unread,
Mar 14, 2019, 5:17:12 AM3/14/19
to libsbml-development
Hi Brett & Frank,

thanks so much for the bug fix.
Everything works.

Best Matthias
Reply all
Reply to author
Forward
0 new messages