jergavin / python-tesseract

Automatically exported from code.google.com/p/python-tesseract
0 stars 0 forks source link

Fails to compile on Ubuntu Trusty with OpenCV 3 #71

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When you run python setup.py, you get an IndexError in src/setup.py, line 187: 
libname="open"+item.split("libopen")[1].split(".")[0]

It turns out, some of the compilation options that get included in libname are 
things like 'rt', and 'pthreads', and they trip up this line.  I made the 
following changes, and was able to compile, install, and test successfully:

        if 'libraries' in cv_pc_keys:
            self.libraries= self.libraries + cv_pc['libraries']
        elif 'extra_link_args' in cv_pc_keys:
            for item in cv_pc['extra_link_args']:
                print item
                try:
                    libname="open"+item.split("libopen")[1].split(".")[0]
                    self.libraries.append(libname)
                except IndexError:
                    pass

Ubuntu Trusty, opencv 3.00dev

Original issue reported on code.google.com by anatoliy...@gmail.com on 7 May 2015 at 12:02