macports and upgrading to mavericks

This is mainly a reminder of some light troubles encountered whilst upgrading from moutain-lion to mavericks.
Certainly, many people could be concerned because Apple decided to give this upgrade for free (which is a good turn in my opinion).
Most of the troubles come from the upgrade process, a fresh maverick installation might have much less problems.

  • upgrading xcode

  • Using the App Store to download Xcode-5.0.2 isn’t enough, one has to select the proper command-line tools. Now the trouble with upgrading is that invoking
    xcode-select –install
    right after the upgrade won’t work. I personally had to shut down the machine and restart the OS in order to get it to pop-up the selection window … (probably a reminder of the previous Xcode ?)
    The most tricky point with that strange behaviour of xcode is that most build will be okay, probably because of older binaries or
    settings of previous xcode being used, but some package will definitely be reluctant (ex: openmotif) ; so
    check carefully that step before continuing further.

  • upgrading macports

  • There is a complete documentation for this, particularly about saving the list of port installed.
    Now, when running into a lot of troubles, one will probably go fast and might forget some steps. Or rather, like it occurred to me, partially crash the previous install by trying a port selfupdate right after the OS upgrade !
    Anyhow I backed-up the former port tree and some off the apps installed:

    mv /opt/local /opt/local-OLD
    cd /Applications/Macports && for NOM in * ; do mv "${NOM}" "${NOM}-"`date '+%Y%m%d-%H%M'` ; done
    

    From that point, whenever the old list of ports was needed, I used the following ugly trick :

    sqlite3 -line /opt/local-OLD/var/macports/registry/registry.db "select * from ports" | grep 'name =' | sed 's/^.*name = //' | sort -u
    

    At this point, with nothing in the way anymore, I simply downloaded macports-2.2.1-10.9 and followed the regular install.
    But at this point, in order to work around some bugs, some trick was needed …

  • Tuning the macports’ builds [edit : not needed since release @114492 ]

  • Some packages need the libtool .la files in order to build (for dependencies calculations ?), but the current macports doesn’t
    install them anymore. Yet, I don’t have any other workaround than keeping the whole build and parse them back for those .la files.
    So we must instruct macports to keep the build trees : tune the /opt/local/etc/macports/macports.conf with

    portautoclean           no
    

    Probably at some point, some cleaning will become mandatory in order to free space.

  • the lib*.la troubles [edit : not needed since release @114492 ]

  • Most port builds won’t need the libtool’s *.la files, and some build will crash with DYLIB path injections. However some build will
    choke explicitely on missing lib*la files.
    I simply used this uggly script in order to copy some parsed .la files from the build-trees :

    #!/bin/bash
    
    ls -ctr `find /opt/local/var/macports/build/ -name 'lib*.la' -type f` | while read LIBLA
    do
        SHORTNAME=`echo ${LIBLA} | rev | cut -d/ -f1 | rev | sed 's/\.la$//'`
        if [ ! -f "/opt/local/lib/${SHORTNAME}.la" ]
        then
            sed 's#/opt/local/var/macports/build[_/abcdefghijklmnopqrstuvwxyz\.1234567890+-]*/\(lib[_/abcdefghijklmnopqrstuvwxyz\.1234567890+-]*\.la\)#/opt/local/lib/\1#g' < "${LIBLA}"  > "/opt/local/lib/${SHORTNAME}.la"
        fi
    done
    

    The best being probably to move those out of the way right after the build of the “la-needing” packages, but keep them for future use :

    mkdir /opt/local/libla && mv /opt/local/lib/lib*.la /opt/local/libla
    
  • forcing install of dbus

  • dbus port may fail from previous install, in which case a simple port install -f dbus will do the trick.

  • upgrading ddd and gdd

  • The new ddd isn’t necessarly fully compatible with the previous release, I had to remove the ~/.ddd directory in
    order to get a new clean one ; otherwise ddd was stuck waiting for gdb to answer.

    mv ~/.ddd ~/.ddd-`date '+%Y%m%d-%H%M'`
    

    The 5.0.2 version of xcode doesn’t include the gdb debugger anymore, and the ddd port doesn’t yet depend on gdb. a simple port install gdb will provide a new one.
    Now for some reason, the gdb port-provided is called ggdb, so ddd won’t find it right out. Two solutions here :
    either invoke ddd session with :

    ddd --debugger /opt/local/bin/ggdb [args]
    

    or tune the ressource file for the proper gdb name, ~/.ddd/init :

    ! addition to locate and use the macports supplied gdb :
    Ddd*debuggerCommand: /opt/local/bin/ggdb
    
    ! DO NOT ADD ANYTHING BELOW THIS LINE -- DDD WILL OVERWRITE IT
    Ddd*dddinitVersion: 3.3.12
    .../...
    
  • conclusion

  • Finally, the vast majority of ports do build flawlessly, confirming the quality of those sources and the work of macports authors !

    No Comments

    Sorry, the comment form is closed at this time.

    macports and upgrading to mavericks

    This is mainly a reminder of some light troubles encountered whilst upgrading from moutain-lion to mavericks. Certainly, many people could be concerned because Apple decided to give this upgrade for free (which is a good turn in my opinion). Most of the troubles come from the upgrade process, a fresh maverick installation might have much less problems. upgrading [...]
    the_title(); ?>

    tempelhof

    one should scroll to the left, and then to the right.
    the_title(); ?>
    White Box - PurForm

    White Box – PurForm

    Grande narration noisy qui parcours le lisse, les moires, les coincidences géométriques, en son et en video.
    the_title(); ?>
    In C - Terry Riley - Orchestre de Bretagne

    In C de Terry Riley par l’Orchestre de Bretagne

    Exceptionnel : une oeuvre du courant minimaliste américain jouée en grandeur nature [...]
    the_title(); ?>
    our galaxy as seen from makhtech-ramon

    Makhtesh Ramon, moonless night.

    Makhtech Ramon is a huge erosion valley in the middle of negev desert. Stepping into a desert is really something worth trying, you'll have the sensation of being invited by nature to shortly visit a place where humans are not really supposed to be.
    the_title(); ?>
    James Lick refractor

    James Lick refractor

    a small blog entry to host the full-size original of this pic taken when I passed by mount hamilton and bumped into one’s child dream. this pic is currently illustrating wikipedia’s James Lick telescope entry. One may use it, conforming with Creative Commons attribution license.
    the_title(); ?>
    korg kaoss pad (by acidpix)

    42

    Utilisez le TLD 42 ! ce site est désormais accessible via : http://disjunkt.42/jd [...]
    the_title(); ?>

    bien nommer les choses

    Dans la classique saga terremer, nommer les choses, plus précisement connaître leur nom, donne le pouvoir de les contrôler. Avec unix c’est pareil, connaitre le nom du point d’entrée d’un fichier exécutable permet de “l’invoquer“. Et ce depuis une ligne de commande, ou l’interieur de n’importe quel script ! C’est en étant appelés les uns [...]
    the_title(); ?>
    Hiroshi Yoshino, Charles Vannier, Kaya Sasaki, Hervé le Bitter.

    Hiroshi Yoshino et Hervé le Bitter à la bascule

    Duo de contrebassistes qui se rencontrent pour la première fois. Présentés l’un à l’autre par le danseur Charles Vannier, ils ont juste fait une balance de son de quinze minutes dans l’après midi. Ce fut donc une véritable improvisation. Comme à la bascule l’espace est petit, on est vite au courant de tout et la confession [...]
    the_title(); ?>
    bulgy capacitors - condensateurs gonflés/boursouflés

    la peste des condensateurs, obsolescence programmée ?

    Lorsque soudain un moniteur acheté un peu plus cher que la moyenne tombe en quasi-panne juste peu après les 3 années de garantie généreusement offertes par le constructeur, je maudis le sort. Et de rage je démonte, par acquis de conscience la bestiole. C’est qu’elle rendait une belle image, alors vraiment si je pouvais trouver [...]
    the_title(); ?>