Mixing boost versions –as-needed

Some linux distributions defaulted to use the –as-needed linker flag for a while. Ubuntu tried it in natty, but then reverted. Now with oneiric, it really is enabled by default.

I ran into this when one of my packages wouldn’t compile on oneiric. I always got linker errors with boost::filesystem and boost::system. Between natty and oneiric, the default version of the packaged libboost changed from 1.42 to 1.46, thus switching from filesystem v2 to v3. Obviously my first thought was that it must have to do with that. Also libwt which I use in the project had the same error in a previous version. So, I reduced my app until I was sure that couldn’t be the cause here. Also all my other packages didn’t have any problems with the transition to filesystem v3 apart from the regular changes for adapting to the new interfaces. But for these changes the compiler helps.

The project in question is organised more or less like that:

Continue reading “Mixing boost versions –as-needed”

missing env variables when running from cron

Today I solved another problem that bugged me for a while. Namely, I wanted to run the free flight prediction runs automatically from cron. When I ran it from the commandline or a script, it worked well, but when I tried to run it directly or through the same script from cron, it always failed with the following message : “critical error : basic_string::_S_construct NULL not valid”

Continue reading “missing env variables when running from cron”