hsnr-gamera / gamera-3

Gamera 3 for Python 2 (deprecated)
GNU General Public License v2.0
39 stars 15 forks source link

install toolkits #4

Open manyids2 opened 8 years ago

manyids2 commented 8 years ago

hey,

I wanted to install this toolkit - MusicStaves

But I encountered this error,
fatal error: gameramodule.hpp: No such file or directory

When I checked under /usr/include/ , indeed gamora was not there. There was no error in installation and the gui is working. I'm probably doing something wrong, could you kindly help me out?

This is the compile command that gives the error x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Iinclude -I/home/mukunar1/workspace/wonderingEar/NewNew/musicstaves-1.4.0/gamera/toolkits/musicstaves/plugins -Iinclude/plugins -I/usr/include/python2.7/gamera -I/usr/include/python2.7/gamera -I/usr/include/python2.7/../gamera -I/usr/include/gamera -I/usr/include/python2.7 -c /home/mukunar1/workspace/wonderingEar/NewNew/musicstaves-1.4.0/gamera/toolkits/musicstaves/plugins/_evaluation.cpp -o build/temp.linux-x86_64-2.7/home/mukunar1/workspace/wonderingEar/NewNew/musicstaves-1.4.0/gamera/toolkits/musicstaves/plugins/_evaluation.o -Wall

cdalitz commented 7 years ago

How did you install gamera? From the sources? Can you please check, whether gameramodule.hpp is installed at all? You can find its location with "locate gameramodule.hpp" on Linux.

greenSnot commented 7 years ago

Me too, did you solve it?

cdalitz commented 7 years ago

@greenSnot: Can you please answer the question above? This can help to identify what's going wrong on your system. Note that you generally can only install toolkits when you have installed Gamera from the sources and not from a binary package.

greenSnot commented 7 years ago

@cdalitz I follow the instructions(http://gamera.informatik.hsnr.de/docs/gamera-docs/install.html),What did I miss? // 1) install dependencies // python 2.7 & gcc 4.8.4 has been installed in ubuntu 14.04 sudo apt-get install libtiff5 sudo apt-get install libpng-dev sudo apt-get install python-wxgtk2.8

// 2) clone gamera & install git clone https://github.com/hsnr-gamera/gamera.git cd gamera python setup.py build sudo python setup.py install

// 3) running gamera_gui

cdalitz commented 7 years ago

@greenSnot Where is gameramodule.hpp installed on your system? On my Ubuntu system, I obtain

locate gameramodule.hpp /usr/local/include/python2.7/gamera/gameramodule.hpp

Note that it might be necessary to call updatedb before calling locate.

greenSnot commented 7 years ago

@cdalitz just like you,

locate gameramodule.hpp
/home/USERNAME/Documents/gamera/include/gameramodule.hpp  // the place where I installed gamera
/usr/local/include/python2.7/gamera/gameramodule.hpp
cdalitz commented 7 years ago

@greenSnot This is strange. The header file is installed into /usr/local/include/python2.7/gamera just as our test systems Ubuntu 12 and Ubuntu 16, but we cannot reproduce the error on our systems. We will set up a VM with Ubuntu 14 to check whether we can reproduce the error in this environment.

Just a stupid question: are you using python 2.7 both for compiling/installing Gamera and for compiling the toolkit?

greenSnot commented 7 years ago

@cdalitz Yes, I followed the instructions above.

cdalitz commented 7 years ago

We were able to reproduce the error. It seems to be a bug in the specific Python version shipped with Ubuntu 14, which has a broken function get_python_inc().

There is an ugly workaround: in the Gamera sources, add the path "/usr/local/include/python2.7/gamera" at the end of the file gamera/gamera_setup.py. The last function in this file then reads as follows (dots stand for spaces; the github comment editor for some reason swallows spaces and newlines):

def get_gamera_include_dirs(): ..# the "usr/local" prefix is for recent Ubunut versions, which ..# install addon modules no longer along with the python core ..return [os.path.join(get_python_inc(), "gamera"), ....os.path.join(get_python_inc(prefix="/usr/local"), "gamera"), ....os.path.join(get_python_inc(), "../gamera"), ...."/usr/include/gamera", "/usr/local/include/python2.7/gamera"]

I am not sure whether this should be included with the Gamera main sources because it is a workaround tied to a particular directory of a particular Python version.