PyTango Compile Error - var has not been declared

6 views
Skip to first unread message

Lais P. Carmo

unread,
May 12, 2016, 9:23:04 AM5/12/16
to ta...@esrf.fr

Hello!
I have been researching about GUI for control systems and found Taurus framework. One of the dependencies of this framework is PyTango. Tango is installed here but PyTango is not compiling.


I am working on a Linux RHEL 6.
I first tried  PyTango 8.1.8 with Tango 9.2.2, but I got many errors, so I followed an advice to use Tango A.B.x with PyTango A.B.y.

Thus I tried PyTango 8.1.8 with Tango 8.1.2 and it turned out to be better, but then I got errors with vars not declared.


I am now trying to compile PyTango 8.1.2 with Tango 8.1.2.
However, I am still having errors with vars not declared.

This is the following issue during PyTango compilation:


cd PyTango-8.1.2

$ python2.7 setup.py build


<...compilation goes ok but then: >


gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPYTANGO_NUMPY_VERSION="1.11.0" -DPYTANGO_HAS_UNIQUE_PTR=1 -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/tango -I/usr/local/include -I/home/ABTLUS/lais.carmo/Downloads/tango/PyTango-8.1.2/src/boost/cpp -I/home/ABTLUS/lais.carmo/Downloads/tango/PyTango-8.1.2/src/boost/cpp/server -I/usr/local/include/python2.7 -c /home/ABTLUS/lais.carmo/Downloads/tango/PyTango-8.1.2/src/boost/cpp/server/device_impl.cpp -o build/temp.linux-x86_64-2.7/home/ABTLUS/lais.carmo/Downloads/tango/PyTango-8.1.2/src/boost/cpp/server/device_impl.o -std=c++0x
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1777,
                 from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from /home/ABTLUS/lais.carmo/Downloads/tango/PyTango-8.1.2/src/boost/cpp/tango_numpy.h:25,
                 from /home/ABTLUS/lais.carmo/Downloads/tango/PyTango-8.1.2/src/boost/cpp/from_py.h:24,
                 from /home/ABTLUS/lais.carmo/Downloads/tango/PyTango-8.1.2/src/boost/cpp/pytgutils.h:19,
                 from /home/ABTLUS/lais.carmo/Downloads/tango/PyTango-8.1.2/src/boost/cpp/server/device_impl.cpp:14:
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
/home/ABTLUS/lais.carmo/Downloads/tango/PyTango-8.1.2/src/boost/cpp/server/device_impl.cpp: In function ‘void PyDeviceImpl::push_change_event(Tango::DeviceImpl&, boost::python::str&, boost::python::api::object&)’:
/home/ABTLUS/lais.carmo/Downloads/tango/PyTango-8.1.2/src/boost/cpp/server/device_impl.cpp:226: error: ‘PyAttribute’ has not been declared
/home/ABTLUS/lais.carmo/Downloads/tango/PyTango-8.1.2/src/boost/cpp/server/device_impl.cpp: In function ‘void PyDeviceImpl::push_change_event(Tango::DeviceImpl&, boost::python::str&, boost::python::str&, boost::python::str&)’:
/home/ABTLUS/lais.carmo/Downloads/tango/PyTango-8.1.2/src/boost/cpp/server/device_impl.cpp:234: error: ‘PyAttribute’ has not been declared


<.. more similar error>


Actuallly I had this same issue with the var PyCmd in src/boost/cpp/server/device_class.cpp and I solved it with adding an #include "command.h" (because PyCmd is declared there), but it is strange to change the source code to make it compile.

Can I get any help in this case?

Thanks in advance!


'''

Laís Pessine do Carmo

Computer Engineering Trainee at Beamline Software Group

Brazilian Synchrotron Light Laboratory - LNLS
Center of Research in Energy and Materials - CNPEM

+ 55 (11) 94233-7721
       lais.carmo@lnls.br
www.lnls.cnpem.br
'''

message-footer.txt

Andy Gotz

unread,
May 12, 2016, 9:36:33 AM5/12/16
to ta...@esrf.fr
Dear Lais,

I am in now way an expert in PyTango and Taurus (our local expert is out of town) but have you tried to install PyTango from PyPi?

Indeed PyTango 8.x will not work with Tango 9.x. There is a pre-release of PyTango 9.2 on github (https://github.com/tango-cs/PyTango/tree/tango9).

Have you tried that? I hope you have some success soon ...

Kind regards
Andy
message-footer.txt
Reply all
Reply to author
Forward
0 new messages