This topic contains 10 replies, has 0 voices, and was last updated by  Panther30 11 years, 5 months ago.

  • Author
    Posts
  • #4435

    Crispy Critter
    Participant

    CVS checkout done a few minutes ago.

    With GCC/G++ 4.0: the usual problems that occur when sizeof(pointer) > sizeof(int). GCC 4 will not accept pointer conversions that lose precision. It will throw an error, not a warning.


    ../tankgraph/GLWTankTip.cpp: In member function ‘virtual void TankUndoMenu::itemSelected(GLWSelectorEntry*, int)’:
    ../tankgraph/GLWTankTip.cpp:71: error: cast from ‘void*’ to ‘unsigned int’ loses precision
    ../tankgraph/GLWTankTip.cpp: In member function ‘virtual void TankBatteryTip::itemSelected(GLWSelectorEntry*, int)’:
    ../tankgraph/GLWTankTip.cpp:226: error: cast from ‘void*’ to ‘int’ loses precision
    make[2]: *** [GLWTankTip.o] Error 1

    Using GCC/G++ 3.2, we get farther, but the compile barfs here:


    ../common/snprintf.c: In function `vasprintf':
    ../common/snprintf.c:842: incompatible types in assignment
    ../common/snprintf.c:850: incompatible types in assignment
    make[2]: *** [snprintf.o] Error 1
    #29570

    Crispy Critter
    Participant

    Part 2

    I fixed that first set of compile errors, and got farther with GCC 4. Namely, it barfed on snprintf.c. Time to look at that as well.


    ../common/snprintf.c: In function ‘vasprintf’:
    ../common/snprintf.c:842: error: incompatible types in assignment
    ../common/snprintf.c:850: error: incompatible types in assignment
    make[2]: *** [snprintf.o] Error 1
    #29571

    Crispy Critter
    Participant

    Part 3

    If I use something like:


    CFLAGS='-D_GNU_SOURCE -DHAVE_VASPRINTF -O2' ./configure

    …then the snprintf problem goes away. Now it’s on to the next error, another AMD64 pointer conversion.


    ../dialogs/HelpButtonDialog.cpp: In member function ‘virtual void HelpButtonDialog::VolumeMenu::menuSelection(const char*, int, GLMenuItem&)’:
    ../dialogs/HelpButtonDialog.cpp:130: error: cast from ‘void*’ to ‘int’ loses precision
    #29572

    Panther30
    Participant

    I am having similar problems with fedora core 5 and an embedded amd eden core processor on a VIA motherboard. see the recent thread “problems installing 39.1 source” for info.

    #29573

    Crispy Critter
    Participant

    Well, I’m going to call it a night.


    make[2]: Entering directory `/home/russ/cvs/scorched/src/scorched'
    make[2]: *** No rule to make target `../landscape/LandscapeDefinition.cpp', needed by `LandscapeDefinition.o'. Stop.
    make[2]: Leaving directory `/home/russ/cvs/scorched/src/scorched'

    Apparently, this file has been moved into src/landscapedef, but the Makefile hasn’t been updated to reflect this.

    #29574

    cbx550f
    Participant

    CC – try doing a “make distclean” the redo the createAMMakefile etc. I run into this once in a while when the Makefiles change.

    cbx

    #29575

    Crispy Critter
    Participant

    Could you please elaborate? I began with clean CVS checkout, and then used autogen.sh to start the build process.

    I’ve also done a couple of ‘make distclean’ passes when I was deciding which compiler I wanted to use.

    #29576

    imported_gcamp
    Participant

    The makefiles are not kept up to date they need to be regenerated from the project files. To do this run the createAMMakefile script.

    It used to be done as part of the autogen process but redzebra complained so I removed it.

    #29577

    Panther30
    Participant

    ahhh,

    how do I run the createAMMakefile script?

    #29578

    Panther30
    Participant

    okay

    I ran the createAMMakefiles script. It did not solve the problem I am having.

    —Panther30

    #29579

    cbx550f
    Participant

    Just to be sure, did you:

    1. Run “perl createAMMakefile.pl”
    2. In the top level, run “sh ./autogen.sh”
    3. make

    cbx

    #29580

    Panther30
    Participant

    I ran the commands, I get the same error I reported in the other thread. and if I fix the error manually, scorched 39.1 WILL compile okay. Nowever, after the successful compile, I get the second error I reported when I try to run it.

    —-Panther30

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.