Building Scan Tailor on OSX

Scan Tailor specific announcements, releases, workflows, tips, etc. NO FEATURE REQUESTS IN THIS FORUM, please.

Moderator: peterZ

Post Reply
User avatar
n9yty
Posts: 72
Joined: 25 Jul 2010, 22:13

Re: Building Scan Tailor on OSX

Post by n9yty »

You can do what you like. :) I just set up an entirely separate build system so that you could control the versions of various components and not need the overhead or dependencies of macports. But whatever works for you, feel free to use it.
SnakeByte
Posts: 8
Joined: 04 Mar 2014, 00:53

Re: Building Scan Tailor on OSX

Post by SnakeByte »

You can do what you like. :) I just set up an entirely separate build system so that you could control the versions of various components and not need the overhead or dependencies of macports. But whatever works for you, feel free to use it.
Understood. I just wanted to be clear if I still needed MacPorts or not (or understand if there might be conflicts having packages like cmake or boost installed via MacPorts). I completely wiped out MacPorts just to be safe and followed the readme instructions.

Everything compiled without error, the app and dmg files were created, but I'm still exactly where I was before this. All of my jpg files are showing up as bad.
error message
error message
Screen shot 2011-01-13 at 9.22.43 AM.png (21.78 KiB) Viewed 8887 times
I can open up the same files in Scan Tailor 0.9.9.2 (win32) via the Windows XP VM I have running via Parallels on my mac without issue.

Has the image verification code changed after 0.9.9.2? Perhaps it's being too strict? Is there any way to turn on debug logging during this verification process so that I can see why the image is failing?

Can someone with a later version of ST give it a try?
Last edited by Anonymous on 14 Jan 2011, 13:20, edited 1 time in total.
SnakeByte
Posts: 8
Joined: 04 Mar 2014, 00:53

Re: Building Scan Tailor on OSX

Post by SnakeByte »

Here's my compiled Scan Tailor 1.0.0Beta8 app. Just extract all the .tar.gz files into the same location and double click on the dmg file to open.

These were the libs and utils I downloaded to make it:
boost_1_45_0
libpng-1.5.0
tiff-3.9.4
jpeg-8b
qt-mac-carbon-opensource-4.7.1 (Looks like it's out of beta)
cmake-2.8.3
xcode 3.2.5
Attachments
ST1.0.0beta8.005.dmgpart.tar.gz
[5/5]
(942.21 KiB) Downloaded 360 times
ST1.0.0beta8.004.dmgpart.tar.gz
[4/5]
(4.95 MiB) Downloaded 350 times
ST1.0.0beta8.003.dmgpart.tar.gz
[3/5]
(4.95 MiB) Downloaded 348 times
ST1.0.0beta8.002.dmgpart.tar.gz
[2/5]
(4.98 MiB) Downloaded 361 times
ST1.0.0beta8.dmg.tar.gz
[1/5]
(4.99 MiB) Downloaded 355 times
Last edited by Anonymous on 14 Jan 2011, 14:46, edited 1 time in total.
knappen
Posts: 35
Joined: 29 Jul 2010, 20:21

Re: Building Scan Tailor on OSX

Post by knappen »

Thanks for this.

I got "bad image" for my jpgs too, but it worked fine when I tried it on some tiffs. In fact, the dewarping worked like a charm, better than it did on my minipc, but then the image in question was probably less distorted than those I tried there.
SnakeByte
Posts: 8
Joined: 04 Mar 2014, 00:53

Re: Building Scan Tailor on OSX

Post by SnakeByte »

Okay, from what I can derive, it's a problem with the jpeg lib itself (or how scantailor is calling/linked to it).

I've posted something on the ScanTailor forum, so we'll just have to see what comes from that.

https://sourceforge.net/apps/phpbb/scan ... p=114#p114
Last edited by Anonymous on 15 Jan 2011, 05:30, edited 2 times in total.
Tulon
Posts: 687
Joined: 03 Oct 2009, 06:13
Number of books owned: 0
Location: London, UK
Contact:

Re: Building Scan Tailor on OSX

Post by Tulon »

SnakeByte wrote:I've posted something on the ScanTaylor forum, so we'll just have to see what comes from that.
FYI, I am not actually reading that forum.

What can I say about this issue? I can only provide a guess, which goes like:
Scan Tailor links directly to libjpeg and to Qt, which in turn links to libjpeg as well, quite likely to a different version of it. Now, if the OSX dynamic linker behaves like the Linux one, it won't load two different versions of libjpeg - it will only load one and will bind it to both Scan Tailor and Qt. As a result, we get either Scan Tailor or Qt using the wrong version of libjpeg, that is a version different from the one they were compiled against. This may or may not work.

If my guess is true, the solution would be rebuilding Qt with --system-jpeg pointing to the same library that's used for building Scan Tailor.
Last edited by Tulon on 15 Jan 2011, 05:32, edited 1 time in total.
Scan Tailor experimental doesn't output 96 DPI images. It's just what your software shows when DPI information is missing. Usually what you get is input DPI times the resolution enhancement factor.
SnakeByte
Posts: 8
Joined: 04 Mar 2014, 00:53

Re: Building Scan Tailor on OSX

Post by SnakeByte »

Thanks for the response Tulon. I just figured it out (Thank GOD cmake can create Xcode project files).

Turns out when the jpeg-8b files were being compiled, they were using a jpeglib.h file located under "/Library/Frameworks/Mono.framework/Versions/1.2.5/include/jpeglib.h" instead of the one located inside of the actual jpeg-8b folder (Either that or ScanTailor was looking at that file instead of the one inside of the include folder buildscantailor.sh told it to use ala the cmake_include_lib environment variable). Once I killed that Mono.framework folder and recompiled, all worked as expected.
Last edited by Anonymous on 15 Jan 2011, 06:09, edited 1 time in total.
SnakeByte
Posts: 8
Joined: 04 Mar 2014, 00:53

Working 1.0.0Beta8 OSX

Post by SnakeByte »

Extract all tar.gz files into the same folder and double click on the dmg file to gain access to the app.

Thanks guys.
Attachments
ScanTailor-1.0.0Beta8.003.dmgpart.tar.gz
[3/3]
(6.86 MiB) Downloaded 395 times
ScanTailor-1.0.0Beta8.002.dmgpart.tar.gz
[2/3]
(6.94 MiB) Downloaded 393 times
ScanTailor-1.0.0Beta8.dmg.tar.gz
[1/3]
(6.98 MiB) Downloaded 373 times
knappen
Posts: 35
Joined: 29 Jul 2010, 20:21

Re: Building Scan Tailor on OSX

Post by knappen »

Thanks for this.

EDIT: Forgot that I had to extract all parts before the dmg could recompose. D'oh!
bnz

Re: Building Scan Tailor on OSX

Post by bnz »

Yes, thanks for making a new OSX build. Actually, I tried to do it myself, but I also got stuck with the jpeg problem. I already found that I have this Mono framework thing installed as well. I'll have to try this again sometime with your hints...
Post Reply