Site Tools


software:osx:scantailor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
software:osx:scantailor [2009/10/22 02:19] adminsoftware:osx:scantailor [2009/10/22 12:17] (current) admin
Line 1: Line 1:
 ====== Building scantailor on Mac OSX ====== ====== Building scantailor on Mac OSX ======
-This page describes how to install scantailor on Max OSX. [[http://diybookscanner.org/forum/viewtopic.php?f=3&t=110#p1002|Rob]] should know more about it.\\ See also here: [[https://sourceforge.net/apps/phpbb/scantailor/viewtopic.php?f=6&t=8&start=0]]+This page describes how to install scantailor on Max OSX. A lot of thanks go to [[http://diybookscanner.org/forum/viewtopic.php?f=3&t=110#p1002|Rob]] and [[https://sourceforge.net/apps/phpbb/scantailor/memberlist.php?mode=viewprofile&u=67|jart]]\\ Please see also here: [[https://sourceforge.net/apps/phpbb/scantailor/viewtopic.php?f=6&t=8&start=0]]
  
-===== Installation of MacPorts on os 10.5.8 =====+===== Installation of scantailor with Qt and MacPorts on os 10.5.8 =====
 If you haven't done so, start reading here: [[http://guide.macports.org/]]. The installation of Macports requires the following: If you haven't done so, start reading here: [[http://guide.macports.org/]]. The installation of Macports requires the following:
-  * <del>Install Xcode tools from your osx installation dvd</del>Download Xcode from Apple. See below why.+  * Download Xcode from Apple and install it (It automatically updates the current version).\\ Note that the 10.5 compatible Xcode is a bit hidden away. In the Mac Dev Center -> Member Site (in right column); it requires another login. Member Site -> Downloads. Download -> Developer Tools (In right column).
   * Install X11 User from the osx installation dvd   * Install X11 User from the osx installation dvd
   * Download and install MacPorts (1.8.1 - 10.5 Leopard)   * Download and install MacPorts (1.8.1 - 10.5 Leopard)
Line 12: Line 12:
  
 ==== Install qt4-mac ==== ==== Install qt4-mac ====
-Installing qt4-mac right away gave threw this error: +Install qt4-mac((Initially this didn'work, because the Xcode version was usingcoming from the OSX installation dvd, was too oldThat's the reason why one should download the proper Xcode version)) (This installed version 4.5.3_0 and took about hours on my PowerBook G4so take your time):
-<code>Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_dbus/work/dbus-1.2.16" && /usr/bin/make -j1 all " returned error 2 +
-Command output: /usr/bin/make  all-recursive +
-Making all in dbus +
-/usr/bin/make  all-am +
-/bin/sh ../libtool --tag=CC   --mode=compile /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -I.. -I..  -fPIC -DDBUS_COMPILATION -DDBUS_MACHINE_UUID_FILE=\""/opt/local/var/lib/dbus/machine-id"\" -DDBUS_SYSTEM_CONFIG_FILE=\""/opt/local/etc/dbus-1/system.conf"\" -DDBUS_SESSION_CONFIG_FILE=\""/opt/local/etc/dbus-1/session.conf"\"  -I/opt/local/include  -O2 -arch ppc -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -fno-common -Wno-unused -Wno-sign-compare -Wno-pointer-sign -Wno-format -fno-strict-aliasing -MT dbus-address.lo -MD -MP -MF .deps/dbus-address.Tpo -c -o dbus-address.lo dbus-address.c +
-../libtool: line 460: CDPATH: command not found +
-/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_dbus/work/dbus-1.2.16/libtool: line 460: CDPATH: command not found +
-/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_dbus/work/dbus-1.2.16/libtool: line 1138: func_opt_split: command not found +
-libtool: Version mismatch error.  This is libtool 2.2.6but the +
-libtool: definition of this LT_INIT comes from an older release. +
-libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6 +
-libtool: and run autoconf again. +
-make[3]: *** [dbus-address.lo] Error 63 +
-make[2]: *** [all] Error 2 +
-make[1]: *** [all-recursive] Error 1 +
-make: *** [all] Error 2 +
- +
-Error: The following dependencies failed to build: dbus jpeg libmng autoconf help2man gettext libiconv gperf ncurses ncursesw p5-locale-gettext perl5 perl5.8 m4 automake lcms tiff zlib libtool libpng openssl sqlite3 readline +
-Error: Status 1 encountered during processing.</code> +
- +
-After some google searchI read somewhere that I should install dbus(([[http://trac.macports.org/ticket/22133]])). So trying to install dbus first: +
-  sudo port install libtool && sudo port clean dbus && sudo port install dbus +
-When almost finished, the following text appears: +
-<code>################################################################################################# +
-# Startup items have been generated that will aid in +
-# starting dbus with launchd. They are disabled +
-# by default. Execute the following command to start them, +
-# and to cause it to launch at startup: +
-+
-# sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist +
-# launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist +
-##################################################################################################</code> +
- +
-Then try installing qt4-mac:+
   sudo port install qt4-mac   sudo port install qt4-mac
-Unfortunately this fails due to an old Xcode version: 
-<code>--->  Verifying checksum(s) for tiff 
---->  Extracting tiff 
-On Mac OS X 10.5, tiff 3.9.1 requires Xcode 3.1 or later but you have Xcode 3.0. 
-Error: Target org.macports.extract returned: incompatible Xcode version 
-Error: The following dependencies failed to build: libmng lcms tiff libpng openssl sqlite3 readline 
-Error: Status 1 encountered during processing.</code> 
  
-This Xcode version was installed per default from the original OSX installation dvdDownload the newest Xcode version and install it (It automatically updates the current version). The 10.5 compatible Xcode is bit hidden away. In the Mac Dev Center -> Member Site (in right column); it requires another loginMember Site -> DownloadsDownload -> Developer Tools (In right column).\\ \\ After having installed Xcode 3.1, continue with qt4-macFirst do a clean: +^ After you have installed Qt using MacPorts, you should create a symbolic link to prevent the error reporting that “Qt4 could not be found”This is because MacPorts installs qmake with the filename 'qmake-mac' and not 'qmake'. Do the following (Assuming MacPorts uses /opt/local/bin):\\ \\ cd /opt/local/bin\\ sudo ln -s qmake-mac qmake\\ \\ <sub>Note that if you do not want to create symbolic link you can alternatively use the command cmake -DQT_QMAKE_EXECUTABLE=/opt/local/libexec/qt4-mac/bin/qmake</sub ^ 
-  sudo port clean qt4-mac + 
-Then continue with installing: +Before installing cmake, first install boost. If boost would be missing, cmake would throw an error that it "Could not find boost headers or libraries." and "You may need to install a package named libboost1.35-dev or similarly."\\ \\  
-  sudo port install qt4-mac +Install boost (It installed boost 1.40.0_1+powerpc) 
-During the next 6 hours version 4.5.3_0 will be installed successfully.+  sudo port install boost
  
 ==== Install cmake ==== ==== Install cmake ====
   sudo port install cmake   sudo port install cmake
 After about 20 minutes, version 2.6.4_1 is successfully installed. After about 20 minutes, version 2.6.4_1 is successfully installed.
-sudo+
 ==== Install scantailor ==== ==== Install scantailor ====
-Make a directory: +Browse to the following directory:
-  /Users/Shared/scantailor +
-Browse into this directory with:+
   cd /Users/Shared   cd /Users/Shared
 In that directory in your favorite shell make a local copy of scantailor sources with svn, by entering the svn command to check out the sources((See: [[http://sourceforge.net/scm/?type=svn&group_id=227253]])): In that directory in your favorite shell make a local copy of scantailor sources with svn, by entering the svn command to check out the sources((See: [[http://sourceforge.net/scm/?type=svn&group_id=227253]])):
   svn co https://scantailor.svn.sourceforge.net/svnroot/scantailor scantailor   svn co https://scantailor.svn.sourceforge.net/svnroot/scantailor scantailor
-For now, ignore the fingerprint warning. Just enter t (temporarily)\\ \\ On a linux machine you would probably do: +For now, ignore the fingerprint warning. Just enter t (temporarily)\\ Once finished cd into the scantailor directory and type: 
-  cd scantailor +  cmake . 
-  mkdir -p builds/macosx +(notice the space and the dot) 
-  cd builds/macosx +It should say something like:
-The process now differs with MacPorts.\\ With MacPorts type the following+
-  cmake -G "Unix Makefiles" ../../trunk +
-This says: use the "Unix Makefiles" generator of cmake. It should say:+
 <code> <code>
 +  -- Checking pthreads with CFLAGS="" and LIBS="" -- yes
   -- Configuring done   -- Configuring done
   -- Generating done   -- Generating done
-  -- Build files have been written to: /Users/Shared/scantailor/scantailor/builds/macosx+  -- Build files have been written to: /Users/Shared/scantailor/scantailor/trunk
 </code> </code>
-If you installed Qt using MacPorts, then you may see an error reporting that "Qt4 could not be found". This is because MacPorts installs qmake with the filename 'qmake-mac'. You can solve this error by creating a symlink:\\  
-cd to /opt/local/bin (or wherever you have told MacPorts to install to), then: 
-  sudo ln -s qmake-mac qmake 
-Go back to your build/macosx directory and try cmake again as above. It should now find qmake.\\  
-=== libboost1.35-dev error #1 === 
-Skip this, continue reading to #2.\\ If you receive an error about missing package named libboost1.35-dev or similarly: 
-<code> 
-CMake Error at CMakeLists.txt:159 (MESSAGE): 
-  Could not find boost headers or libraries. 
  
-  You may need to install a package named libboost1.35-dev or similarly. +Then perform the make of scantailer with:
-</code> +
-Try to install libsdl with the following command: +
-  sudo port install libsdl +
-It installed libsdl 1.2.14_8.\\  +
-=== libboost1.35-dev error #2 === +
-Try to install boost((See: [[http://boost.darwinports.com/]])) with the following command: +
-  sudo port install boost +
-It installed boost 1.40.0_1+powerpc\\ \\ Now, if you are not there, go back to your build/macosx directory and try cmake again as above. It should build fine now.\\  +
-==== build scantailer ==== +
-Then perform the build of scantailer with three steps:+
   make   make
-  make install +You should find Scantailor.app in same directory (/Users/Shared/scantailor/)\\ \\ Howeverstarting Scantailor.app by double clicking it, will give window with the text 'You can't open the application "Scantailor" because it is not supported on this architecture'.\\ Nevertheless, if I browse to 
-  make macosx_bundle +  /Users/Shared/scantailor/Scantailor.app/Contents/bin 
-Now up in /Users/Shared/scantailor, you ought to see a scantailor.app, ready to run.+and start from there ./scantailorthe application will start.\\ \\ If you want to make it executable by clicking the application, you could modify the Package Contents. (I took some files from the memorytest application Rember and modified Info.plist)\\ Moving scantailor from the original directory to Contents\MacOS\.\\ Adding a Info.plist file\\ Adding a Pkginfo file\\ Adding a English.lproj directory, containing InfoPlist.strings and MainMenu.nib\\ Adding a Resources directory, containging an icon for scantailor: scantailor.icns
  
 ===== Packaging scantailor===== ===== Packaging scantailor=====
Line 131: Line 67:
   svn update   svn update
 **IMPORTANT**: you should delete or move aside the old /Users/Shared/scantailor/scantailor.app before each new build. **IMPORTANT**: you should delete or move aside the old /Users/Shared/scantailor/scantailor.app before each new build.
 +
 +===== Troubleshoot =====
 +Install boost if you receive the following error:
 +<code>
 +CMake Error at CMakeLists.txt:159 (MESSAGE):
 +  Could not find boost headers or libraries.
 +
 +  You may need to install a package named libboost1.35-dev or similarly.
 +</code>
software/osx/scantailor.1256170788.txt.gz · Last modified: 2009/10/22 02:19 by admin