Open GoogleCodeExporter opened 8 years ago
I should note that this was the subject of issue #80 but wasn't solved
directly. The poster reverted back to 1.68.
Also, any known issues with 1.70 interfacing with tesseract? It would be good
to get those out in the open if there are any.
Thanks!
Original comment by jnclay...@gmail.com
on 5 Feb 2014 at 7:58
Thank you for looking at these issues in detail. I am sure that Tom Powers,
who maintains the win32 build, will get back to you on this.
As for tesseract, we are coordinating a debian release of leptonica with the
latest version of tesseract.
Original comment by dan.bloo...@gmail.com
on 5 Feb 2014 at 2:43
I have NOT released a Visual Studio 2008 Solution yet for Leptonica 1.70.
Please be patient. A temporary VS2008 solution was sent to the tesseract
project for their use only. I have yet to hear back directly from them. (No
news is good news?)
Using VS2008 (and my new VS2008 Solution files), I have successfully build
v1.70 many times over the past 2 weeks.
I'm not sure when I will release an official v1.70 VS2008 solution. For one
thing, it depends on when leptonica itself stops changing (there were changes
just yesterday). It will probably be at least a week from now.
Leptonica 1.69 was NEVER officially supported on Windows. It was supposed to be
a linux only release. Basing a 1.70 Windows build on some files you somehow got
for 1.69 is not a great idea. (Possibly someone edited the xml files on linux
thereby breaking newlines? Who knows?)
As you noted, the /TP switch has to be turned on now for compiling leptonica
sources.
I have not attempted to compile via VS2012 yet. I would expect a few minor
issues. I seem to recall reading somewhere that turning off the SAFESEH was
handled automatically when converting VS2008 projects to VS2012?
I wouldn't recommend deleting those lines from the Build Events. At least not
unless you understand the implications of doing so.
Watching the tesseract mailing lists, I see that among other things, there is
NO support yet for building the training tools on Windows. OTOH, zdenko has
reported that he has been able to build tesseract itself using Leptonica 1.70
and VS2010 (but he has limited time to work on tesseract at the moment,
apparently, and even less time to work on the Windows side of things).
Original comment by tomp2...@gmail.com
on 5 Feb 2014 at 3:27
Hey Tom, I appreciate all of the work you've done getting the visual studio
side of things taken care of.
I realize you're a busy guy, so I'll make a quick summary, look below the
separation marks (=====) for more details/a more lengthy reply.
There are missing function definitions of boxaConvertToPta, ptaConvertToBoxa,
etc in the c files (the prototypes were correctly declared, but there function
bodies are missing!). Please just look yourself in the zip version posted here:
http://www.leptonica.com/source/leptonica-1.70.tar.gz
All I'm asking is that you grep/look for boxaConvertToPta and tell me where you
see the function definition (not just declaration, e.g. where the actual body
of the function is) being.
===================================================
I realize you didn't post a 1.70 official VS project release.
I didn't take/use/include any files from v1.69. I said that pre v1.69 (e.g.
1.68) there were function definitions that are no longer in v1.70. I didn't
base anything on v1.69. While having having an official vs 2008 release would
be nice, it's unnecessary for me. I am savvy at dealing with visual studio or
general Windows/Linux porting related issues. What I'm seeing is function
bodies missing while the prototypes still exist. Those prototypes are then
referenced in various places. Like a call on line 348 of affinecompose.c to
boxaConvertToPta. The zip file for 1.7 on the official Leptonica web page
doesn't contain a function definition (it contains a declaration in
allheaders.h, but no function definition). A function definition existed in
v1.68 in file boxfunc1.c on line 1524. So boxfunc1.c was refactored but those
changes didn't propagate to affinecompose.c in a meaningful way. Now I can add
those function definitions back just to get it to compile but I'm weary of
doing so for obvious reasons.
When you say you've successfully built v1.70 was that targeting the lib or dll
version? Did you try both release and debug? If so, I suggest you download a
fresh copy of v1.70 and try to rebuild, use the same VS project files if you
want but using the zip's src and prog files. Please try the dll debug and
release versions.
I have a feeling that the latest "c" files do not include all of the updates.
Or if they do then the dll version is seemingly broken. You may have made
changes that affect targeting the dll side of things. If you could take a
moment just to verify that the stuff in the leptonica 1.7 zip file posted
contains everything you're building with that would be great.
Everything except linking the dll release/debug seems to work.
Regarding the issues below the ========= line: these were all problems I saw
and the approaches I took to get rid of them. I do not need help on these. The
only reason I posted them were for anyone else also seeing the same issues. I'm
not sure what you meant about deleting lines from the "Build Events." I didn't
mention deleting any "lines" but removing "newlines" from the vcxproj file.
There are known issues with the xml parser for VS2010+ regarding the vcxproj
files, googling a bit reveals that newlines bork up the parsing of specific xml
elements resulting in the Chinese characters seen in issue #80.
Original comment by jnclay...@gmail.com
on 6 Feb 2014 at 4:34
I just checked the archive I downloaded from leptonica.org on 1/23/2014. In
boxfunc4.c line 599 I see the definition of boxaConvertToPta(). I also
re-downloaded it and it hasn't changed.
You'll have to ask Dan if he's been changing the 1.70 archive since it
first went up but I doubt it? Perhaps you forgot to add boxfunc4.c to your
solution? Via a local mercurial repository I use to keep track of changes I
can tell that boxfunc4.c has been added since 1.68.
When testing I build DLL_Debug, DLL_Release, LIB_Debug, and LIB_Release. I
get ZERO errors & warnings. Of course I cheat a bit by turning off some
warnings that I feel are mainly noise, but Dan does fix any other warning
that show up. I then manually build & run ioformats_reg, dwamorph1_reg,
dwamorph2_reg for all 4 configurations.
In addition all 62 alltests_reg programs are built for all 4
configurations. "alltests_reg compare" is then run for all configurations
to test against "golden" files generated by an "alltests_reg generate" done
a week or so ago. One test out of 61 fails and Dan is still trying to
figure out why.
The remaining 174 prog programs are built for all 4 configurations to make
sure there are no compiler errors, but so far I've only tested a few of
them.
Ah... newlines not lines. Sorry I was reading too fast. I see that bug has
been reported at [1]. Thanks for pointing out the root cause of the problem.
[1] http://connect.microsoft.com/VisualStudio/feedback/details/774527
-- Tom
Original comment by tomp2...@gmail.com
on 6 Feb 2014 at 2:46
[deleted comment]
The 1.70 archive version on leptonica.org has not changed since I put it up
about 2 weeks ago. However, I will replace it today with a slightly updated
version that has removed the few bugs we have found since then. There may be 2
or 3 new functions. AFter that it will not be changed, but version 1.71 will
go up shortly with changes requested by Tom and others. I expect that Tom's
official VS build will be to 1.71.
We presently have 61 tests, of which 1 fails if the test harness runs on 4
cores and succeeds if it runs on 2. It is almost certainly due to a
synchronization problem where a temporary file from one slow test is
overwritten by another somewhat distant in the list. By moving the failing
test forward, the test passes.
Original comment by dan.bloo...@gmail.com
on 6 Feb 2014 at 3:51
Ah, nuts! Thanks Tom. You're right that the solution didn't contain boxfunc4.c,
I should have taken more time and done what I was asking you to do by doing the
find/grep instead of using the built in solution search.
Thanks again guys!
Original comment by jnclay...@gmail.com
on 6 Feb 2014 at 5:31
doh I just spent 3 days cross compiling from mingw to windows / visual studio
in order to get leptonica 1.7 working for tesseract because i couldnt get it to
compile in VS 2013... oh well
Original comment by sirus2...@gmail.com
on 6 Feb 2014 at 8:37
Original issue reported on code.google.com by
jnclay...@gmail.com
on 5 Feb 2014 at 7:49