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

  • Author
    Posts
  • #4436

    Crispy Critter
    Participant

    Here’s what I had to do to get it to compile:

    Make the CVS checkout. Apply patches to make the source 64-bit clean.

    Patch 1, for src/tank/TankPosition.h


    --- TankPosition.h.orig 2006-05-21 21:15:53.000000000 -0500
    +++ TankPosition.h 2006-05-21 21:16:00.000000000 -0500
    @@ -55,7 +55,7 @@
    float getRotationXYDiff();
    float getRotationYZDiff();
    float getPowerDiff();
    - void revertSettings(unsigned int index = 0);
    + void revertSettings(unsigned long index = 0);
    void undo();
    std::vector &getOldShots();

    Patch 2, for src/tank/TankPosition.cpp


    --- TankPosition.cpp.orig 2006-05-21 21:12:54.000000000 -0500
    +++ TankPosition.cpp 2006-05-21 21:13:11.000000000 -0500
    @@ -100,7 +100,7 @@
    }
    }

    -void TankPosition::revertSettings(unsigned int index)
    +void TankPosition::revertSettings(unsigned long index)
    {
    if (index < oldShots_.size())
    {

    Patch 3, for src/ode/config.h.orig


    --- config.h.orig 2006-05-22 21:34:36.000000000 -0500
    +++ config.h 2006-05-22 21:35:09.000000000 -0500
    @@ -81,7 +81,11 @@
    /* an integer type that we can safely cast a pointer to and from without
    * loss of bits.
    */
    +#if __LP64__
    +typedef unsigned long intP;
    +#else
    typedef unsigned int intP;
    +#endif


    /* if we're compiling on a pentium, we may need to know the clock rate so

    Patch 4, for src/coms/NetServerProtocol.cpp.orig
    NOTE: The last line of the patch is blank.


    --- NetServerProtocol.cpp.orig 2006-05-22 22:17:40.000000000 -0500
    +++ NetServerProtocol.cpp 2006-05-22 22:18:38.000000000 -0500
    @@ -125,7 +125,7 @@
    // allocate the buffer memory
    NetMessage *buffer = NetMessagePool::instance()->
    getFromPool(NetMessage::BufferMessage,
    - (unsigned int) socket,
    + (unsigned long) socket,
    NetServer::getIpAddress(socket));
    buffer->getBuffer().allocate(len);
    buffer->getBuffer().setBufferUsed(len);
    @@ -161,7 +161,7 @@
    // Allocate a new buffer
    NetMessage *newMessage = NetMessagePool::instance()->
    getFromPool(NetMessage::BufferMessage,
    - (unsigned int) socket,
    + (unsigned long) socket,
    NetServer::getIpAddress(socket));
    NetBuffer &newBuffer = newMessage->getBuffer();
    newBuffer.allocate(destLen);
    @@ -291,7 +291,7 @@
    // allocate the buffer memory
    NetMessage *netBuffer = NetMessagePool::instance()->
    getFromPool(NetMessage::BufferMessage,
    - (unsigned int) socket,
    + (unsigned long) socket,
    NetServer::getIpAddress(socket));
    netBuffer->getBuffer().reset();

    @@ -354,7 +354,7 @@
    // allocate the buffer memory
    NetMessage *netBuffer = NetMessagePool::instance()->
    getFromPool(NetMessage::BufferMessage,
    - (unsigned int) socket,
    + (unsigned long) socket,
    NetServer::getIpAddress(socket));
    netBuffer->getBuffer().reset();

    Patch 5, for src/coms/NetServer.cpp.orig


    --- NetServer.cpp.orig 2006-05-22 22:19:30.000000000 -0500
    +++ NetServer.cpp 2006-05-22 22:20:19.000000000 -0500
    @@ -235,7 +235,7 @@
    itor++)
    {
    TCPsocket sock = (*itor).first;
    - disconnectClient((unsigned int) sock);
    + disconnectClient((unsigned long) sock);
    }
    SDL_UnlockMutex(setMutex_);
    }
    @@ -247,7 +247,7 @@

    NetMessage *message = NetMessagePool::instance()->
    getFromPool(NetMessage::DisconnectMessage,
    - (unsigned int) client,
    + (unsigned long) client,
    getIpAddress(client));

    if (delayed)
    @@ -264,7 +264,7 @@

    void NetServer::sendMessage(NetBuffer &buffer)
    {
    - sendMessage(buffer, (unsigned int) firstDestination_);
    + sendMessage(buffer, (unsigned long) firstDestination_);
    }

    void NetServer::sendMessage(NetBuffer &buffer, unsigned int dest)
    @@ -276,7 +276,7 @@
    // Get a new buffer from the pool
    NetMessage *message = NetMessagePool::instance()->
    getFromPool(NetMessage::NoMessage,
    - (unsigned int) destination,
    + (unsigned long) destination,
    getIpAddress(destination));

    // Add message to new buffer
    @@ -305,7 +305,7 @@
    {
    NetMessagePool::instance()->addToPool(message);
    Logger::log(formatString("Unknown sendMessage destination %i",
    - (int) client));
    + (long) client));
    }
    SDL_UnlockMutex(setMutex_);
    }

    Patch 6, for src/coms/NetServerRead.cpp.orig


    --- NetServerRead.cpp.orig 2006-05-22 22:16:45.000000000 -0500
    +++ NetServerRead.cpp 2006-05-22 22:19:01.000000000 -0500
    @@ -62,7 +62,7 @@
    // Send the player connected notification
    NetMessage *message = NetMessagePool::instance()->
    getFromPool(NetMessage::ConnectMessage,
    - (unsigned int) socket_,
    + (unsigned long) socket_,
    NetServer::getIpAddress(socket_));
    messageHandler_->addMessage(message);

    @@ -94,7 +94,7 @@
    sentDisconnect_ = true;
    NetMessage *message = NetMessagePool::instance()->
    getFromPool(NetMessage::DisconnectMessage,
    - (unsigned int) socket_,
    + (unsigned long) socket_,
    NetServer::getIpAddress(socket_));
    messageHandler_->addMessage(message);
    }
    @@ -189,7 +189,7 @@
    Logger::log(formatString(
    "Warning: %s net loop took %.2f seconds, client %i",
    (send?"Send":"Recv"),
    - timeDiff, (unsigned int) socket_));
    + timeDiff, (unsigned long) socket_));
    }
    }

    @@ -199,7 +199,7 @@
    sentDisconnect_ = true;
    NetMessage *message = NetMessagePool::instance()->
    getFromPool(NetMessage::DisconnectMessage,
    - (unsigned int) socket_,
    + (unsigned long) socket_,
    NetServer::getIpAddress(socket_));
    messageHandler_->addMessage(message);
    }

    Patch 7, for src/engine/ScorchedCollisionHandler.cpp.orig


    --- ScorchedCollisionHandler.cpp.orig 2006-05-21 21:37:22.000000000 -0500
    +++ ScorchedCollisionHandler.cpp 2006-05-21 21:38:19.000000000 -0500
    @@ -90,8 +90,8 @@
    ScorchedCollisionInfo *info1, ScorchedCollisionInfo *info2,
    dContactGeom *contacts, int noContacts)
    {
    - unsigned int playerId1 = (unsigned int) info1->data;
    - unsigned int playerId2 = (unsigned int) info2->data;
    + unsigned long playerId1 = (unsigned long) info1->data;
    + unsigned long playerId2 = (unsigned long) info2->data;
    Target *target1 = context_->targetContainer->getTargetById(playerId1);
    Target *target2 = context_->targetContainer->getTargetById(playerId2);
    if (!target1 || !target2) return;
    @@ -136,7 +136,7 @@
    }

    ShotBounce *particle = (ShotBounce *) bounceInfo->data;
    - unsigned int id = (unsigned int) otherInfo->data;
    + unsigned long id = (unsigned long) otherInfo->data;

    // only collide with the ground, walls or landscape,
    // or iteself
    @@ -257,7 +257,7 @@
    otherInfo = (ScorchedCollisionInfo *) dGeomGetData(o1);
    }

    - unsigned int id = (unsigned int) otherInfo->data;
    + unsigned long id = (unsigned long) otherInfo->data;
    ShotProjectile *shot = (ShotProjectile *) particleInfo->data;
    shot->incLandedCounter();
    Vector particlePositionV(

    Patch 8, for src/tankgraph/GLWTankTip.cpp.orig


    --- GLWTankTip.cpp.orig 2006-05-21 21:08:50.000000000 -0500
    +++ GLWTankTip.cpp 2006-05-21 21:13:47.000000000 -0500
    @@ -68,7 +68,7 @@

    void TankUndoMenu::itemSelected(GLWSelectorEntry *entry, int position)
    {
    - tank_->getPosition().revertSettings((unsigned int) entry->getUserData());
    + tank_->getPosition().revertSettings((unsigned long) entry->getUserData());
    }

    TankFuelTip::TankFuelTip(Tank *tank) :
    @@ -223,7 +223,7 @@
    void TankBatteryTip::itemSelected(GLWSelectorEntry *entry, int position)
    {
    TankAIHuman *tankAI = (TankAIHuman *) tank_->getTankAI();
    - for (int i=1; i< =(int) entry->getUserData(); i++)
    + for (int i=1; i< =(long) entry->getUserData(); i++)
    {
    if (tank_->getLife().getLife() <
    tank_->getLife().getMaxLife())

    Patch 9, for src/client/ServerBrowser.cpp.orig


    --- ServerBrowser.cpp.orig 2006-05-22 22:14:16.000000000 -0500
    +++ ServerBrowser.cpp 2006-05-22 22:14:58.000000000 -0500
    @@ -50,7 +50,7 @@

    int ServerBrowser::threadFunc(void *var)
    {
    - bool lan = (bool) (int(var)==1);
    + bool lan = (bool) (long(var)==1);
    bool result = false;
    if (lan) result = instance_->serverList_.fetchLANList();
    else result = instance_->serverList_.fetchServerList();

    Patch 10, for src/dialogs/HelpButtonDialog.cpp.orig


    --- HelpButtonDialog.cpp.orig 2006-05-21 21:34:58.000000000 -0500
    +++ HelpButtonDialog.cpp 2006-05-21 21:35:50.000000000 -0500
    @@ -127,7 +127,7 @@
    void HelpButtonDialog::VolumeMenu::menuSelection(const char* menuName,
    const int position, GLMenuItem &item)
    {
    - int data = (int) item.getUserData();
    + long data = (long) item.getUserData();
    if (data != -1)
    {
    int volume = int(float(data) * 12.8f);

    Build Steps:
    Don’t use autogen.sh. Instead use:


    aclocal && automake --foreign && autoconf

    Then manually edit the configure script. Search for the line:


    # The user is always right.

    Then add, just after that line:


    wx_config_args='--unicode=no'

    Fedora Core 5, by default, wants to use Unicode when you compile against wxGTK. This breaks the build, so we don’t want to use Unicode.

    Save the configure script. Invoke it with:


    CFLAGS='-O2 -D_GNU_SOURCE -DHAVE_VA_COPY' ./configure --prefix=/scorch40 --disable-freetypetest

    Note that I’m using a –prefix option so that I don’t stomp on my v39 install. Be sure to save off your v39 .scorched3d directory before running the CVS version!

    Manually add to the LIBS line in src/scorched/Makefile:


    -lalut -lpango-1.0 -lpangox-1.0

    Then run make to build the source. If you have a dual-core AMD64 use make -j4 to best use the two cores.

    #29581

    Panther30
    Participant

    well, I thought I would try using your build code for my problems with the scorched 39.1 .

    It diidn’t fix the problem/. GLWpllanview.cpp is where the compiler is still crashing. same results, different day. Third night I have been messing with it now.

    I appreciate the fact you are taking the time to record your steps CC. Since i don’t really know what I am doing, your research is helping me learn a little.

    —Panther30

    #29582

    Crispy Critter
    Participant

    Is that the CVS version or 39.1? Could you paste in what the compiler’s currently telling you?

    #29583

    Panther30
    Participant

    it’s happening in 39.1 and in the cvs version. and the errors are both in the “problems installing 39.1 source’ thread.

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

You must be logged in to reply to this topic.