ncraun / smoothscan

smoothscan is a tool to convert scanned text into a vectorized output form.
GNU General Public License v3.0
67 stars 4 forks source link

/usr/lib/libgutils.so: undefined symbol: png_create_read_struct #2

Closed ncraun closed 10 years ago

ncraun commented 11 years ago

Split from arthurtiteica's original issue report:

Am I right assuming that this needs python2 instead of python3? If so how to properly specify that at build time? Using python2 I get something like this:

$ smoothscan before.tif -o after.pdf
output: after.pdf
1 Input Files:
6 fonts
Using Fontforge version: 20120731
Scaling to x: 53 y: 53
Converting /tmp/smoothscan_cjeidy/00000000/*.png to /tmp/smoothscan_cjeidy/00000000.ttf
python2: symbol lookup error: /usr/lib/libgutils.so: undefined symbol: png_create_read_struct
.......
libharu error: error_no=1017, detail_no=2
Error: PDF Generation problem.
System Error: No such file or directory

I'm using python 3.3.2-2 fontforge 20120731_b-6 libharu 2.2.1-4 potrace 1.11-1 leptonica 1.69-8

ncraun commented 11 years ago

I believe this issue is being caused by some dependency not being linked to libpng correctly. smoothscan uses png temporary files to hold the symbol templates, and then uses fontforge and potrace to create a vectorized font from them. For some reason it is not reading these png files correctly.

Did you compile any of these dependencies from scratch? If so, double check that they were compiled with png support enabled.

I will look more into this problem, and see if I can reproduce it.

zcater commented 11 years ago

I just rebuilt fontforge making sure it depends on libpng.

From the build log:

checking for png_create_read_struct in -lpng16... yes
checking png.h usability... yes                   
checking png.h presence... yes

I will try looking at potrace also.

ncraun commented 11 years ago

I encountered this error when using the fontforge from the repos on Fedora, but when I uninstalled that and used a fontforge I built from scratch the error messages went away. I can confirm that the problem is definitely fontforge reading the png temp files.

Try rebuilding fontforge with these steps here: http://openfontlibrary.org/en/guidebook/how_to_install_fontforge and see if that resolves the problem.

Another thing that could be the issue is the version of libpng on your system?

zcater commented 11 years ago

I managed to build a git version for fontforge and now all is fine.

Thank you for the pointers.