Menu

#10 buildfixes for gcc 4.3.0

open
nobody
None
5
2008-04-14
2008-04-14
No

gcc 4.3.0 is more strict about includes than previous versions, attached is a patch to build against this compiler

Discussion

  • caolan mcnamara

    caolan mcnamara - 2008-04-14

    patch for gcc 4.3.0

     
  • Neil Mayhew

    Neil Mayhew - 2008-04-17

    Logged In: YES
    user_id=709148
    Originator: NO

    These changes don't apply cleanly for me using the latest svn trunk. Also, some of them include <string.h> when <string> or <cstring> is already included. I think further review is needed.

    BTW, it is not gcc itself that is more strict, just that the corresponding standard library is structured differently. The graphite sources have previously been a bit sloppy about includes, and they have been relying on the fact that some library header files include others, even though the standard does not require that particular inclusion.

     
  • Neil Mayhew

    Neil Mayhew - 2008-04-18

    Logged In: YES
    user_id=709148
    Originator: NO

    In a clean checkout from svn trunk I found that the only file that wouldn't compile with g++-4.3 (4.3.1) was wrappers/pangographite/pangographite.cpp. I fixed this with:

    -#include <math.h>
    +#include <cstring>
    +#include <cmath>

    I think that's all that's needed, although there's no guarantee that it won't break again in the future :-)

    However, Caolan's patch will be helpful for anyone who is wanting to build with g++-4.3 from the 2.3 source tarball.

     

Log in to post a comment.