bugle and gcc 4.2.2/4.3

  • Nobody/Anonymous


    I am getting errors when compiling bugle-0.0.20071009 in Mandriva 2008.0:

    CCACHE_DISABLE=1 gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I.  -I./budgielib  -DLIBDIR=\"/usr/local/lib\" -DPKGLIBDIR=\"/usr/local/lib/bugle\"    -g -O2 -fdump-translation-unit -c ./src/data/gl.c -o src/data/gl.o
    rm -f src/data/gl.o
    mv gl.c.`test -f gl.c.t00.tu && echo t00.`tu src/data/gl.tu
    mv: cannot stat `gl.c.tu': No such file or directory
    make: *** [src/data/gl.tu] Error 1

    gcc 4.2.2 / 4.3 creates gl.c.001t.tu instead of gl.c.t00.tu

    Is it ok to modify Makefile.am->automake at this point?
    When i tried with gcc 4.2.2 it got hanged in infinite loop when compiling and with 4.3 i get errors starting like that:

    echo "{ global:" > src/.libs/libbugleutils.ver
    cat src/.libs/libbugleutils.exp | sed -e "s/\(.*\)/\1;/" >> src/.libs/libbugleutils.ver
    echo "local: *; };" >> src/.libs/libbugleutils.ver
    gcc -std=gnu99 -shared  src/.libs/gltypes.o common/.libs/safemem.o common/.libs/protocol.o common/.libs/has
    common/.libs/safemem.o: In function `feof_unlocked':
    /usr/include/bits/stdio.h:113: multiple definition of `feof_unlocked'
    src/.libs/gltypes.o:/usr/include/bits/stdio.h:113: first defined here
    common/.libs/safemem.o: In function `ferror_unlocked':
    /usr/include/bits/stdio.h:120: multiple definition of `ferror_unlocked'
    src/.libs/gltypes.o:/usr/include/bits/stdio.h:120: first defined here

    Seems that is happening with previous bugle version as well.

    Any ideas how to fix that?

    • Bruce Merry

      Bruce Merry - 2007-10-25

      Thanks for the heads up about gcc 4.2 and the filename - I'll check it out when I have a chance to install it myself.

      The other error I'm not too sure about, but I have a hunch that it might be something a bit off in the generated config.h. Post that and I'll take a look at it.

    • Bruce Merry

      Bruce Merry - 2007-10-26

      I've installed GCC 4.2.2 and found the same issues as you. I'm not sure if the "infinite loop" is truly infinite or just exponentially slow - that file it stops on is a generated file with over 40000 lines, and I suspect that some optimisation is scaling badly. You can work around the problem by configuring or making with CFLAGS="-fno-unit-at-a-time". I'll have to figure out the best way to deal with this in the next release. I can't think of a way to detect the bug itself during configure, which means detecting the GCC version, which is dangerous since I have no idea when the bug was actually introduced and if/when it was fixed (will take a look through the GCC Bugzilla though).

      As for the error with GCC 4.3, I'm not too worried since 4.3 isn't released yet. My theory is that configure has decided that your GCC doesn't support the inline keyword and is #define'ing it away. If that's the case then it's probably fixable (move system headers above the #include <config.h>), but I'd like to see your config.h to confirm that.

    • Nobody/Anonymous

      someone knows where I can find Bugle's documentation? I need to know How Bugle works?!


Log in to post a comment.