1) Install the required libraries: Ubuntu 16.04 $ sudo apt install build-essential libldap2-dev libpython3.5-dev python3-numpy Fedora 26 $ sudo dnf install git make gcc-c++ openldap-devel python3-devel python3-numpy 2) Get the source-code and setup the environment $ mkdir -p $(HOME)/foo/doocs $ cd $(HOME)/foo/doocs $ git clone http://doocs-git.desy.de/cgit/doocs/Ubuntu-16.04-x86_64.git $ git clone http://doocs-git.desy.de/cgit/doocs/library/common/clientlib.git library/common/clientlib $ git clone http://doocs-git.desy.de/cgit/doocs/library/python/pydoocs.git library/python/pydoocs $ export DOOCSARCH=Ubuntu-16.04-x86_64 3) Compile the clientlib $ cd library/common/clientlib * If you don't need EPICS support inside the DOOCS libraries, disable building libTTFapi. $ edit Makefile And look for the line starting with ALLLIBS and remove the libTTFapi entries. See the patch below: diff --git a/Makefile b/Makefile index 2c009e6..b84a360 100644 --- a/Makefile +++ b/Makefile @@ -645,8 +645,6 @@ LIBRARYHFILES = \ CPPFLAGS += -I$(LABVIEW)/cintools ALLLIBS = \ - $(OBJDIR)/libTTFapi.$(EXT) \ - $(OBJDIR)/libTTFapi.a \ $(OBJDIR)/libDOOCSapi.$(EXT) \ $(OBJDIR)/libDOOCSapi.a $ make -j localinstall 4) Compile pydoocs $ cd ../../python/pydoocs $ edit Makefile a) Replace all -lTTFapi with -lDOOCSapi b) Than adopt the search path for python includes and libraries (use pkg-config --list-all | grep python to find the right name) diff --git a/Makefile b/Makefile index 89537e6..606745f 100644 --- a/Makefile +++ b/Makefile @@ -26,12 +26,10 @@ OBJDIR = $(DOOCSROOT)/$(DOOCSARCH)/obj/library/python/$(PKGDIR) SRCDIR = $(DOOCSROOT)/library/python/$(PKGDIR) # FIXME These two lines needs to move to the platform-dependent CONFIG file -PYTHONPATHBASE = /opt/anaconda4 -CPPFLAGS += -I$(PYTHONPATHBASE)/include/python3.6m -CPPFLAGS += -I$(PYTHONPATHBASE)/lib/python3.6/site-packages/numpy/core/include +CPPFLAGS += `pkg-config --cflags python-3.5m` # Overwrite for now LDFLAGS to not use --no-undefined flag since ABI do not match of Anaconda libs and system libs -LDFLAGS = -L$(DOOCSLIBS) -L$(SYSDOOCSLIBS) -L$(PYTHONPATHBASE)/lib -lpython3.6m +LDFLAGS = -L$(DOOCSLIBS) -L$(SYSDOOCSLIBS) `pkg-config --libs python-3.5m` # Conditional linking for Linux ifeq ($(DOOCSARCH), Ubuntu-16.04-x86_64) $ make localinstall 5) Use the libraries $ cd $(HOME)/foo/doocs/Ubuntu-16.04-x86_64/lib $ python3 Python 3.6.3 (default, Oct 9 2017, 12:11:29) [GCC 7.2.1 20170915 (Red Hat 7.2.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pydoocs >>> pydoocs.read('TEST.DOOCS/SINGENERATOR/SIN/DATA') {'data': 1.2390155792236328, 'type': 'FLOAT', 'channel': 'TEST.DOOCS/SINGENERATOR/SIN/DATA', 'timestamp': 1510587348.238229, 'macropulse': 0} >>>