OSX MacOS. Sierra Scantailor
Moderator: peterZ
-
- Posts: 22
- Joined: 21 Oct 2011, 09:51
- Number of books owned: 0
OSX MacOS. Sierra Scantailor
Hi All
Has anyone got any recent binaries, or a how to on compiling it for MacOS. I've read the four but most links I follow are dead, and most discussion took place 5+ years ago. Is there anything happening recently on this ?
I just got a shiny new fast Macintosh and would really like to have had the power of scan tailor available to me. Is it a case of running in a windows VM then ?
Has anyone got any recent binaries, or a how to on compiling it for MacOS. I've read the four but most links I follow are dead, and most discussion took place 5+ years ago. Is there anything happening recently on this ?
I just got a shiny new fast Macintosh and would really like to have had the power of scan tailor available to me. Is it a case of running in a windows VM then ?
-
- Posts: 63
- Joined: 22 Dec 2016, 06:07
- E-book readers owned: Tolino, Kindle
- Number of books owned: 600
- Country: Poland
Re: OSX MacOS. Sierra Scantailor
Hi jaffamuffin,
There is a wiki on building Scan Tailor from source (Linux and Mac OS X) under this link:
https://github.com/scantailor/scantailo ... d-Mac-OS-X
I have experiences with building ST (Experimental Branch) on Linux only, but I suppose it should not be more difficult on Mac OS. It seems to be much better option than running VM and windows version of ST on the top of it.
There is a wiki on building Scan Tailor from source (Linux and Mac OS X) under this link:
https://github.com/scantailor/scantailo ... d-Mac-OS-X
I have experiences with building ST (Experimental Branch) on Linux only, but I suppose it should not be more difficult on Mac OS. It seems to be much better option than running VM and windows version of ST on the top of it.
Re: OSX MacOS. Sierra Scantailor
I can't comment on other branches of ScanTailor, but for those interested in using ScanTailor Experimental (aka STE: Tulon's fork that has improvements on a number of levels) on MacOS, there "shouldn't" be major problems compiling it, as I've done it a number of times successfully. The dependencies for STE are different than for older branches for which the wiki is written, so those directions aren't necessarily going to help.
Here are the steps that worked for me. If you try them and it doesn't work, go ahead and reply here and perhaps we can get a working set of MacOS install directions for STE. I tested these running MacOS Sierra 10.12.4.
1) Grab the source code and unzip, from:
https://github.com/Tulon/scantailor/tree/experimental
2) Make sure you have homebrew installed.
https://brew.sh
3) Using homebrew, install the following dependencies:
* For future reference: when I tested this, homebrew installed the following versions of these packages:
cmake (3.8.0), eigen (3.3.3), qt5 (5.8.0_2), jpeg (8d), libtiff (4.0.7_3), boost (1.64.0_1)
4) Within the directory scantailor-experimental, run:
* If this command runs successfully without producing errors, it should end with something like:
* If it didn't run successfully, it should give you information on what happened: perhaps a missing dependency, if (for example) you aren't using homebrew and/or don't have the correct versions of the libraries.
* If cmake complains that it cannot find QtCore, then you need to adjust the CMAKE_PREFIX_PATH from what I've given above to where QtCore is on your system. This will definitely be the case if you have installed Qt5 in a manner other than using homebrew. Likewise, if homebrew installed a different version, you'll obviously have to adjust the path accordingly. Wherever it is, you need to provide the path for cmake to find it. Worst case scenario, break out Spotlight and dig around for a while.
5) Run:
6) Then, as long as it compiled successfully,
* This will allow you to launch STE from the Terminal (scantailor), but assembling a package that appears as a nice ScanTailor.app in your Applications folder is a whole different thing.
Here are the steps that worked for me. If you try them and it doesn't work, go ahead and reply here and perhaps we can get a working set of MacOS install directions for STE. I tested these running MacOS Sierra 10.12.4.
1) Grab the source code and unzip, from:
https://github.com/Tulon/scantailor/tree/experimental
2) Make sure you have homebrew installed.
https://brew.sh
3) Using homebrew, install the following dependencies:
Code: Select all
brew install cmake eigen qt5 jpeg libtiff boost
cmake (3.8.0), eigen (3.3.3), qt5 (5.8.0_2), jpeg (8d), libtiff (4.0.7_3), boost (1.64.0_1)
4) Within the directory scantailor-experimental, run:
Code: Select all
cmake . -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.8.0_2
Code: Select all
- Configuring done
- Generating done
* If cmake complains that it cannot find QtCore, then you need to adjust the CMAKE_PREFIX_PATH from what I've given above to where QtCore is on your system. This will definitely be the case if you have installed Qt5 in a manner other than using homebrew. Likewise, if homebrew installed a different version, you'll obviously have to adjust the path accordingly. Wherever it is, you need to provide the path for cmake to find it. Worst case scenario, break out Spotlight and dig around for a while.
5) Run:
Code: Select all
make
6) Then, as long as it compiled successfully,
Code: Select all
sudo make install
-
- Posts: 6
- Joined: 06 Mar 2014, 18:53
- E-book readers owned: kindle, android
- Number of books owned: 0
- Country: italy
Re: OSX MacOS. Sierra Scantailor
i followed your writing, compilation went fine (same version number of all packages), but i cannot open any jpeg file.
what's wrong, linking with jpeg library?
what's wrong, linking with jpeg library?
- Attachments
-
- Screen Shot 2017-04-26 at 11.33.26.png (33.76 KiB) Viewed 22995 times
Re: OSX MacOS. Sierra Scantailor
Can we try to verify that you are compiling while pointing to the jpeg 8d libraries that homebrew installed and not some other version? After the successful cmake run, try looking in CMakeCache.txt in scantailor-experimental/ and find JPEG_INCLUDE_DIR and JPEG_LIBRARY. What are those paths? Are they pointing to what homebrew installed? Are there multiple versions of libjpeg.h or libjpeg.dylib in either location?
If that doesn't turn up anything helpful, you could try installing a newer version and use it explicitly:
* It will install but not symlink, so that it won't conflict with the other jpeg package. However, homebrew will tell you where to find the header and library, and you can then tell cmake explicitly where to find them.
* For example, the above command yields:
So run:
If that doesn't turn up anything helpful, you could try installing a newer version and use it explicitly:
Code: Select all
brew install jpeg@9
* For example, the above command yields:
Code: Select all
This is an alternate version of another formula.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/jpeg@9/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/jpeg@9/lib
CPPFLAGS: -I/usr/local/opt/jpeg@9/include
So run:
Code: Select all
cmake . -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.8.0_2/ -DJPEG_INCLUDE_DIR=/usr/local/opt/jpeg\@9/include/ -DJPEG_LIBRARY=/usr/local/opt/jpeg\@9/lib/libjpeg.9.dylib
-
- Posts: 6
- Joined: 06 Mar 2014, 18:53
- E-book readers owned: kindle, android
- Number of books owned: 0
- Country: italy
Re: OSX MacOS. Sierra Scantailor
thanks, it was linking the system libraries for jpeg and tiff
i managed to compile in this way:
everything works fine, i tried also enabling acceleration with OPENGL or OPENCL. result: the system crashed badly.
but generally this experimental build is faster than the last stable scantailor
thanks
i managed to compile in this way:
Code: Select all
cmake . -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.8.0_2 -DJPEG_INCLUDE_DIR=/usr/local/Cellar/jpeg/8d/include/ -DJPEG_LIBRARY=/usr/local/Cellar/jpeg/8d/lib/libjpeg.8.dylib -DTIFF_INCLUDE_DIR=/usr/local/Cellar/libtiff/4.0.7_3/include/ -DTIFF_LIBRARY=/usr/local/Cellar/libtiff/4.0.7_3/lib/libtiff.5.dylib
but generally this experimental build is faster than the last stable scantailor
thanks
-
- Posts: 11
- Joined: 18 Jun 2011, 21:47
Re: OSX MacOS. Sierra Scantailor
I followed your instructions but doing so gives an eror:
Do I have to install qt4?
Code: Select all
$ cmake . -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.8.0_2
-- Boost version: 1.64.0
-- Found unsuitable Qt version "5.8.0" from /usr/local/Cellar/qt/5.8.0_2/bin/qmake
CMake Error at CMakeLists.txt:124 (MESSAGE):
Qt4 could not be found. If it's installed in a non-standard location,
specify the path to qmake in QT_QMAKE_EXECUTABLE. You can do it in
interactive mode (ccmake instead of cmake) or using -DVAR=VAL syntax.
-- Configuring incomplete, errors occurred!
See also "XXX/CMakeFiles/CMakeOutput.log".
Re: OSX MacOS. Sierra Scantailor
Which version of Scantailor are you trying to install? The directions I posted work for Scantailor Experimental (STE), which shouldn't need Qt4. I'd recommend using STE - the link to the code is at the top.
-
- Posts: 11
- Joined: 18 Jun 2011, 21:47
Re: OSX MacOS. Sierra Scantailor
Never mind. I'm sorry. I checked out the wrong git repository.
Re: OSX MacOS. Sierra Scantailor
No problem - glad it works (hopefully)!