Python Library dependencies

Bug #1256305 reported by Alfons Laarman on 2013-11-29
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Andreas Engelbredt Dalsgaard

Bug Description

Would it be possible to make some library dependencies optional, e.g.:
ply (include generated lexers/parsers)
OrderedDictionary (Only include since Python 2.7, which is not installed on most systems)

This would greatly simplify installing opaal.

The second step would be to include in the package:

The current installation process is a horror if you lack the administrator rights to use the install script

The primary goal here seems to be to support installation on cluster systems or e.g. an application server where the user does not have root access. If you look in the install script most of the installation can be done without the need for root access. There is a list of packages that the script currently requires to be installed on the root system. For Ubuntu the packages are:
 bzr build-essential libtool automake libc6-dev-i386 libboost-all-dev swig git python2.7-ply ant flex libpopt-dev libtbb-dev openjdk-7-jdk python2.7-numpy

It should be reasonable to expect an administrator would install most of these without any objections. The most doubtful package would probably be openjdk-7-jdk depending on the policies for how versions of java is maintained, e.g. seperately from the OS package management system.

For the usecase where we would want to avoid the need for admins to install any packages we should recommend the use of Enthought Python Distribution(EPD) as mentioned in the install script to ease the installation of python libraries. However, there is still a number of things that would need to be done to avoid depends on an admin to install the before mentioned packages. I've tried to make a list from memory of what the packages are used for and a fix that would enable installation without root access:
1: Packages: "bzr git" are used to checkout the latest versions of various projects. Fix: Distribute tarballs of all the projects.
2: Packages: "ant openjdk-7-jdk" are used for compiling LTSmin. Fix: change the compilation arguments of LTSmin.
3: Packages: "python2.7-ply flex" are used by the parser in pyuppaal and opaal. Fix: I recall looking into this at some point but apparently only few people are redistributing the parser without these packages. It might be possible to include the needed python files. Similarly it should be possible to avoid automatically invoking flex but both will require some further investication.
4: The package: "python2.7-numpy" is used by the precomputation for the LU-extrapolation. Fix: Should be included in EPD.
5: Packages: "build-essential libtool automake libc6-dev-i386 libboost-all-dev libpopt-dev libtbb-dev swig" are used for compiling the DBM library, python bindings for the DBM library and LTSmin. Fix: We should distribute precompiled binaries for the mentioned projects. As LTSmin and the DBM library are optimised at compile time we should maybe include a script to test if the user is trying to install it on a system that will result in poor performance, e.g., with a different cache line size.

Further discussion, patches or work on any of the issues would be most welcome!

I was testing out the installation on a machine with scientific linux+enthought python distribution today and there was a minor problem with the distutil not picking up the correct include and library paths which is provided as argument. I've included a one-liner fix/workaround for this in a new version of the install script and updated the download page.

Alfons Laarman (a-w-laarman) wrote :

To installing pyDBM on OSX I had to modify the UDBM header:

vim /opt/install/uppaal/include/dbm/Valuation.h
#modify line 70: copyFrom(original);

Otherwise I get the following error message:

/usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/install/uppaal/include -I/opt/install/uppaal/include/dbm -I/opt/install/uppaal/include/base -I/usr/local/uppaal/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c udbm_int_wrap.cpp -o build/temp.macosx-10.9-x86_64-2.7/udbm_int_wrap.o -fpermissive
clang: warning: argument unused during compilation: '-fpermissive'
In file included from udbm_int_wrap.cpp:3050:
In file included from ./udbm_int.h:21:
In file included from /opt/install/uppaal/include/dbm/fed.h:1711:
/opt/install/uppaal/include/dbm/inline_fed.h:1523:19: warning: cast to 'dbm::idbm_t *' from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
        idbmPtr = (idbm_t*) ((dim << 1) | 1);
In file included from udbm_int_wrap.cpp:3050:
In file included from ./udbm_int.h:21:
In file included from /opt/install/uppaal/include/dbm/fed.h:44:
/opt/install/uppaal/include/dbm/Valuation.h:70:13: error: use of undeclared identifier 'copyFrom'
./udbm_int.h:62:7: note: in instantiation of member function 'dbm::Valuation<int>::Valuation' requested here
class IntClockValuation {
/opt/install/uppaal/include/base/pointer.h:145:14: note: must qualify identifier to find this declaration in dependent base class
        void copyFrom(const pointer_t<T> &src)
1 warning and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1

Could you try and compile using gcc?

Following the recent changes to the install script and procedure I'll close this bug now as the python dependencies can all be installed using the new Enthought Python Distribution.

Changed in opaal:
assignee: nobody → Andreas Engelbredt Dalsgaard (andreas-dalsgaard)
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers