Archive for April, 2009

Building CGAL 3.3.1 on (10.5) Leopard


2009
04.29


Not an exercise for the faint of heart. In fact this applies to using it in your programs as well. While I managed to build the libs, I never managed to build the demos that rely on Qt.
 

  • Download the mac distribution from CGAL portal.
  • Prior to installing CGAL you need to have a few prerequisites on your system: boost, GMP, MPFR, Qt (3 didn’t manage to get it working with 4)
  • It is easiest to use macports to get these. After downloading and installing macports install the libraries as follows
    sudo port install boost
    sudo port install GMP
    sudo port install MPFR
    sudo port install qt3-mac
  • You may also wish to install qt4 by invoking
    sudo port install qt4-mac-devel
  • Open your terminal window and cd to CGAL home directory
  • Copy (rename) boost program_options library file so the installer picks it up by going into /opt/local/lib and type
    cp libboost_program_options-mt.a libboost_program_options.a
  • Invoke ./instal_cgal -i to enter interactive mode of their installer
  • Provide the paths the installer cannot find automatically (they are all in /opt/local/include and /opt/local/lib)
  • Before building examples (from examples directory invoke make) don’t forget to set an environment varible
    export CGAL_MAKEFILE=<path_to_CGAL-3.3.1>/make/makefile_i386_Darwin-9.6_g++-4.0.1
  •  

     

    Backported LogKit to Tiger


    2009
    04.13

    Backporting LogKit to Tiger proved to be a pain in the neck. Crossdevelopment is tedious and the macros-riddled code looks ugly. On the upside I fixed a few bugs and reorganized the projects. The current release SymbicLogKit 0.92 is tested under both Tiger (10.4.11) and Leopard and includes source for both the framework and examples.

    To include SymbicLogKit in your own projects follow these steps:

    • Add SymbicLogKit as a dependent project to your project.
    • SymbicLogKit is built as a private framework so you will need to add a “Copy” stage to your target to place SymbicLogKit into a Frameworks subdirectory of your build product.
    • Make your target dependent on the principal target of SymbicLogKit project.
    • Now we need to tell the compiler where to look for the SymbicLogKit.framework since it isn’t available for inclusion in the project (it doesn’t exist yet). Modify Framework Search Paths setting in your build settings per configuration to point to the appropriate directory relative, for instance, to your project location e.g. $(PROJECT_DIR)/../SymbicLogKit/build/Release.
    • Since the framework isn’t available for inclusion in our host project we will be weak-linking to it. Locate Other Linker Flags in you build settings and set it or augment it to include -weak_framework SymbicLogKit  -framework SymbicLogKit
    • You may want to uncheck Build Active Architecture Only build setting. 

    A cute way to log in as root


    2009
    04.07

    In Leopard one can obtain the a terminal without enabling the root account. Just type “sudo su” and provide your user password. Seems like a cleaner way to operate as root.