Question re compiling on OSX Leopard

Help
Kunlun
2009-05-12
2013-05-01
  • Kunlun

    Kunlun - 2009-05-12

    Mark has provided me his old compile notes. They start out with the following bit:

    to build static
        sudo mv libtiff*dylib __off
        sudo mv libusb*dylib __off
        sudo mv libjpeg*dylib __off
        sudo mv libvigraimpex*dylib __off
        sudo mv libqt-mt*dylib __off

    That was not included in the instructions I followed when I compiled Lprof successfully in January 2008.

    Would anyone be able to explain what this does and whether it's required to build Lprof statically? Also, does this change something in the configuration of my system?

    Thanks!
    Jannes

     
    • Rishi Sanyal

      Rishi Sanyal - 2009-05-13

      I'd also like to do a static build. Jannes, if it's ok with Mark, perhaps you could pass along these notes to us? Or just post them here?

      Sorry, I don't seem to know enough to answer your above question...
      Rishi

       
      • Kunlun

        Kunlun - 2009-05-14

        I have emailed Mark with the same question, but haven't heard yet. It's been about a week. Since Mark posted his even older compile instructions back in January 2008 on this forum himself, I assume it's OK if I share them here.

        If you get around to it soon, please let me know about your experiences with the mv command at the beginning. Also, if your experiences give occasion to revisions of these instructions, please share them here.

        In case the font used in this forum doesn't show this clearly (composing this message is in Arial and it's impossible to see it): the mv command lines in the beginning (right under "to build static") have two underscores directly before "off".

        There is an exchange of messages between Mark and Hal in this forum from around September 2008. It gives some background on dependencies and some usage issues Mark ran into. It's unclear whether any of these issues were fixed. Hal said he doesn't know when I emailed him about it and I didn't see in the logs that Mark ever created any bug trackers or feature requests for these issues.

        So here goes:

        ----------------------------------------------------------------------------------------------------------------------------
        to build static
            sudo mv libtiff*dylib __off
            sudo mv libusb*dylib __off
            sudo mv libjpeg*dylib __off
            sudo mv libvigraimpex*dylib __off
            sudo mv libqt-mt*dylib __off

        preparations, create folders
            sudo mkdir /usr/local
            sudo mkdir /usr/local/lib
            sudo mkdir /usr/local/bin
            sudo mkdir /usr/local/man
            sudo mkdir /usr/local/man/man1
            sudo mkdir /usr/local/doc
            sudo mkdir /usr/local/include

        and add
            /usr/local/bin
        to your path!

        install scons, must be in path
            sudo python setup.py install --prefix=/usr/local

        (
        libtool (really needed ?)
            ./configure --prefix=/usr/local
            make clean && make
            sudo make install
        )

        libusb
            ./configure --prefix=/usr/local --enable-static=yes --enable-shared=yes
            make clean && make
            sudo make install

        libjpeg
            rm libtool
            ln -s `which glibtool` ./libtool
            export MACOSX_DEPLOYMENT_TARGET=10.3
            ./configure --prefix=/usr/local --enable-static --enable-shared
            make clean && make
            sudo make install

        libtiff
            ./configure --prefix=/usr/local --enable-static --enable-shared --with-jpeg-lib-dir=/usr/local/lib --with-jpeg-include-dir=/usr/local/include
            make clean && make
            sudo make install

        libpng
            ./configure --prefix=/usr/local --enable-static --enable-shared
            make clean && make
            sudo make install

        vigra (without FFTW, version 1.4 works, 1.6 have to see)
            ./configure --prefix=/usr/local --enable-static --enable-shared --with-zlib=/usr/lib --with-jpeg=/usr/local/lib --with-tiff=/usr/local/lib  --with-png=/usr/local/lib
            make clean && make
            sudo make install

        qt4 for mac 4.3.3
        static
            export MACOSX_DEPLOYMENT_TARGET=10.4
            export QTDIR=$PWD
            export PATH=$QTDIR/bin:$PATH
            export DYLD_LIBRARY_PATH=$QTDIR/lib:$DYLD_LIBRARY_PATH
            ./configure --prefix=/usr/local -release -fast -universal -system-zlib -qt-libpng -qt-libjpeg -qt-libmng -qt-gif -qt-libtiff -sdk /Developer/SDKs/MacOSX10.4u.sdk -static -no-framework
            make clean && make
            sudo make install

        framework
            export MACOSX_DEPLOYMENT_TARGET=10.4
            export QTDIR=$PWD
            export PATH=$QTDIR/bin:$PATH
            export DYLD_LIBRARY_PATH=$QTDIR/lib:$DYLD_LIBRARY_PATH
            ./configure --prefix=/usr/local -release -fast -universal -system-zlib -qt-libpng -qt-libjpeg -qt-libmng -qt-gif -qt-libtiff -sdk /Developer/SDKs/MacOSX10.4u.sdk
            make clean && make
            sudo make install

            set environment after build
                export QTDIR=/usr/local
                export PATH=$QTDIR/bin:$PATH
                #export DYLD_LIBRARY_PATH=$QTDIR/lib:$DYLD_LIBRARY_PATH

        lprof
        get from CVS anonymous

            cvs -d:pserver:anonymous@lprof.cvs.sourceforge.net:/cvsroot/lprof login
            cvs -z3 -d:pserver:anonymous@lprof.cvs.sourceforge.net:/cvsroot/lprof co -P lprof

        get from CVS maolimu

            export CVS_RSH=ssh
            cvs -z3 -d:ext:maolimu@lprof.cvs.sourceforge.net:/cvsroot/lprof co -P lprof_nonxcode

        build
            export MACOSX_DEPLOYMENT_TARGET=10.4
            sudo scons MacBundlePath=/ MacUniversal=1 MacQtAssistLocation=/usr/local/bin qt_directory=/usr/local
            or
            scons MacBundlePath=/ MacUniversal=0 MacQtAssistLocation=/usr/local/bin qt_directory=/usr/local
        local
            sudo scons install

        for leopard this might be needed if the build shows an error crt1.10.5.o could not be found

            sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.o /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.10.5.o

        ---------------------------------
        cleaning
            make confclean
            make clean
            sudo scons --clean

        tools
            lipo -info *
            file *
            otool -L *

        -----------------------------------------------------------------------------------------------------------------------------

        END OF INSTRUCTIONS

         
    • Rishi Sanyal

      Rishi Sanyal - 2009-05-16

      Thanks, I'll try this, since I need to compile the latest CVS version as Gerhard was kind enough to add a tweak we'd been talking about since a while back.

      Well... unless the port install did most of this... in which case I won't need to. Can anyone comment on this?

      Thanks,
      Rishi

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks