Menu

#79 Problem when compiling with gcc 4.1

closed
1
2012-07-03
2006-03-25
Maxim
No

I am trying to compile torcs 1.2.4 on Gentoo Linux(AMD64)
with gcc 4.1.0 And I get this error

x86_64-pc-linux-gnu-g++
-I/var/tmp/portage/torcs-1.2.4/work/torcs-1.2.4/export/include
-I/var/tmp/portage/torcs-1.2.4/work/torcs-1.2.4 -O2
-march=k8 -Wl,-Bdirect -fomit-frame-pointer -pipe
-ffriend-injection -Wall -fPIC -O2 -DUSE_RANDR_EXT
-DGL_GLEXT_PROTOTYPES -Wall -fPIC -O2 -DUSE_RANDR_EXT
-DGL_GLEXT_PROTOTYPES -D_SVID_SOURCE -D_BSD_SOURCE
-DSHM -DHAVE_CONFIG_H -c grmain.cpp
grscreen.h:81: error: extra qualification ‘cGrScreen::’
on member ‘camDraw’

It compiles fine with gcc 3.4 but gcc 4.1 is stricter
in c++. So it is your fault. Please fix it and other
bugs that will appear when compiling with gcc 4.1 I can
help testing if you provide ebuild that applies your
patches to me so that it can be mergeed into
portage(Gentoo package system) in future.

Discussion

  • Mart Kelder

    Mart Kelder - 2006-04-30

    Logged In: YES
    user_id=581637

    I also have this problem when compiling torcs with gcc 4.1.
    This also seems to be the only compile error on gcc 4.1 (at
    least on my system). Thus, there exists a simple patch to
    resolve this.

    The solution I used was replacing cGrScreen::camDraw by
    camDraw in src/modules/graphic/ssggraph/grscreen.h (line 81).

    Regards,

    Mart

     
  • Bernhard Wymann

    Bernhard Wymann - 2006-05-01

    Logged In: YES
    user_id=318462

    Fix applied in the CVS, thank you for the patch. A comment
    to the first reporter: If TORCS does not compile with
    compiler XY or distro Z, do not file a bug, instead send a
    patch. I will for sure not start to install here all
    combinations of compilers, libraries and distros, so filing
    a bug just wastes my time.

    You are of course welcome in the mailing list to report your
    problem, where you quite likely will get help.

    Bye, Bernhard.

     
  • Emmanuel Andry

    Emmanuel Andry - 2006-06-17

    Logged In: YES
    user_id=939210

    I've found a patch from fedora called
    /home/eandry/rpm/SOURCES/torcs-1.2.4-extraqualif.patch which
    fix this.

     
  • Emmanuel Andry

    Emmanuel Andry - 2006-06-17

    Logged In: YES
    user_id=939210

    As I don't know how to attach the patch, here's fulltext :

    diff -Naupr
    torcs-1.2.4.orig/src/modules/graphic/ssggraph/grscreen.h
    torcs-1.2.4/src/modules/graphic/ssggraph/grscreen.h


    torcs-1.2.4.orig/src/modules/graphic/ssggraph/grscreen.h
    2005-08-24 21:19:47.000000000 +0200
    +++ torcs-1.2.4/src/modules/graphic/ssggraph/grscreen.h
    2006-03-10 16:50:51.000000000 +0100
    @@ -78,7 +78,7 @@ public:

     void update(tSituation *s, float Fps);
    
    • void cGrScreen::camDraw(tSituation *s);
    • void camDraw(tSituation *s);

      void updateCurrent(tSituation *s);