FreeBSD 7.0: installing psycopg 2.07

Lexapro No Prescription Zelnorm No Prescription Norvasc No Prescription Tramadol No Prescription Toprol XL No Prescription Plavix No Prescription Acomplia No Prescription Nolvadex No Prescription Nizoral No Prescription Hoodia No Prescription

While setting up a new FreeBSD 7.0 server I found that psycopg 2.0.7 doesn't easy_install on FreeBSD. It's because of a configuration problem in config.h at the bottom.

#if defined(__FreeBSD__) || (defined(_WIN32) && !defined(__GNUC__)) || defined(__sun__)
/* what's this, we have no round function either? */
static double round(double num)
{
  return (num >= 0) ? floor(num + 0.5) : ceil(num - 0.5);
}
#endif
 

However 'round' is defined in FreeBSD and has been since FreeBSD 5.3 (according to the manual page). The fix is simple, just remove the 'defined(__FreeBSD__) ||' part of the '#if' and you should be fine. Now you can 'easy_install .' psycopg2.

PS: I'd tried to raise a ticket but http://www.initd.org/ trac seems to have been down for ages.

5 Responses to “FreeBSD 7.0: installing psycopg 2.07”


  1. 1 RobC

    Out of interest, do you script your server installs? If so, do you use python, a shell script, or something else entirely?

  2. 2 dazza

    @RobC: For NMA I don’t have a scripted install but in the past I have used simple bash scripts. Since most of the installs are installing ports and easy_installing python modules it was quite simple. For a more complex install I have used Make files but I found them difficult to maintain.

    Hope that helps.

  3. 3 Geraud

    One honest question, is there a reason for not using the version in the ports? It looks like your fix has been included by the maintainers in Jan. 2007. I understand that the py* ports may not always be up-to-date, but the beauty of the ports is that smarter-than-me people usually save me hours of “why the hell doesn’t that stuff compile?!?!” debugging with these kind of patches.

    Regards,

    G.

  4. 4 dazza

    @Geraud: There is, to be honest no reason. But if you want to do it…. then this blog may help someone so that’s what it’s for :)

  5. 5 Anderson

    I had to downgrade my psycopg to 2.0.7 and I didn’t know that it was such a simple solution. Thanks a lot.

Leave a Reply