Announcement

Collapse
No announcement yet.

COMPILE: Linux Port

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • OK, that problem is fixed. Continued with make and now I get:

    /usr/bin/ld: cannot find -lttf

    I assumed it was truetype font develop packages is what it wanted, so I installed libsdl1.2-ttf2.0.0-dev, but that didn't help. What could be the problem now? Thanks for all of the help!

    ***SOLVED***
    CTP2 requires the old freetype1 develop files installed

    Comment


    • Revisions 806 - 807:
      More merging from trunk. Noncontroversial merges, so everything should carry on pretty much as normal.
      Tea: there is nothing it cannot fix.

      Comment


      • I've recently moved to Linux and was wondering what state the port is in? If it's playable how would I go about compiling and installing (I'm on Kubuntu Gutsy)?

        Comment


        • It's playable-ish, but painful in places. At this stage I'm more of a porter than a player (there's nothing like repeated play-testing to turn you off a game...).

          Some of the sprites don't display, but that's because the filenames are wrongly-cased (Linux is case-sensitive). You can fix these as and when you encounter them. I don't bother, because I'm lazy and am not playing properly at the moment. They should really be fixed.

          Try compiling 807 and see how far you get (look back over recent posts in this thread, and you'll see some problems that people have had). I'll do what I can to assist, but have a law exam tomorrow, and am only briefly passing through on my way to get a good night's sleep.

          FWIW, I'm currently using Ubuntu 7.04
          Tea: there is nothing it cannot fix.

          Comment


          • I've checked out the Linux branch and ran the commands ./autogen.sh, ./configure and make. This then crashed during make with the errors:
            Code:
            slicfuncai.cpp: In function 'bool ParseResponseSlicArgs(SlicArgList*, sint32&, Response&)':
            slicfuncai.cpp:264: warning: enumeration value 'THREAT_NONE' not handled in switch
            slicfuncai.cpp:264: warning: enumeration value 'THREAT_MAX' not handled in switch
            slicfuncai.cpp: In member function 'virtual SFN_ERROR Slic_ConsiderResponse::Call(SlicArgList*)':
            slicfuncai.cpp:792: warning: statement has no effect
            slicfuncai.cpp: In member function 'virtual SFN_ERROR Slic_SetResponse::Call(SlicArgList*)':
            slicfuncai.cpp:817: warning: statement has no effect
            slicfuncai.cpp: In member function 'virtual SFN_ERROR Slic_ConsiderMotivation::Call(SlicArgList*)':
            slicfuncai.cpp:864: warning: enumeration value 'MOTIVATION_NONE' not handled in switch
            slicfuncai.cpp:864: warning: enumeration value 'MOTIVATION_FEAR_POLLUTION' not handled in switch
            slicfuncai.cpp:864: warning: enumeration value 'MOTIVATION_DESIRE_ENLIST_FRIEND' not handled in switch
            slicfuncai.cpp:864: warning: enumeration value 'MOTIVATION_MAX' not handled in switch
            slicfuncai.cpp: In member function 'virtual SFN_ERROR Slic_GetPersonalityType::Call(SlicArgList*)':
            slicfuncai.cpp:1868: error: cast from 'const PersonalityRecord*' to 'sint32' loses precision
            make[3]: *** [slicfuncai.lo] Error 1
            make[3]: Leaving directory `/home/josh/Misc/CTP2/ctp2_code/gs/slic'
            make[2]: *** [all-recursive] Error 1
            make[2]: Leaving directory `/home/josh/Misc/CTP2/ctp2_code/gs'
            make[1]: *** [all-recursive] Error 1
            make[1]: Leaving directory `/home/josh/Misc/CTP2/ctp2_code'
            make: *** [all-recursive] Error 1
            Any suggestions? Also, what's the best way to get the data files off the CD and where do they need to go?

            Comment


            • That's weird. I upgraded to 7.10 this morning and have just run a successful 'make clean; make'. Can you try checking out r792 and compiling that on please...

              doc/README.linux is the thing you want to be reading for how to unpack the CD, also some linux-specific build instructions.
              Tea: there is nothing it cannot fix.

              Comment


              • Probably should have read that file first...

                I've reverted to 792 and ran the instructions in the readme and get the same errors. Any ideas?

                Comment


                • r811: Minor merges from trunk.

                  M ctp2_code/os/include/config_win32.h
                  M ctp2_code/gfx/spritesys/FacedSprite.h
                  M ctp2_code/gfx/spritesys/Sprite.cpp
                  M ctp2_code/gfx/tilesys/maputils.cpp
                  M ctp2_code/gfx/tilesys/maputils.h
                  M ctp2_code/gfx/tilesys/tileutils.cpp
                  M ctp2_code/robotcom/Top/AiMap.h
                  M ctp2_code/robot/utility/RandTest.cpp
                  M ctp2_code/robot/pathing/A_Star_Heuristic_Cost.cpp
                  M ctp2_code/robot/pathing/AVLHeap.cpp
                  M ctp2_code/robot/pathing/A_Star_Heuristic_Cost.h
                  M ctp2_code/robot/pathing/AVLHeap.h
                  M ctp2_code/ai/diplomacy/diplomattypes.cpp
                  M ctp2_code/ai/diplomacy/ReactEvent.cpp
                  Tea: there is nothing it cannot fix.

                  Comment


                  • OK. Compiled newest 811 game and tried to play. I cannot select any resolution as it comes up blank. Also, when the game starts it seg faults and quits. Below is what happens when I start to play:

                    All resolutions available.
                    ui/aui_ctp2/c3blitter.cpp L719: MMX-Test succeded!
                    Messagebox(DB Error): UNIT_BUILD_LIST_NAVAL_SPECIAL not found in UnitBuildList database

                    Continue?
                    Messagebox(DB Error): UNIT_BUILD_LIST_SPECIAL_SCIENTIST not found in UnitBuildList database

                    Continue?
                    Messagebox(DB Error): UNIT_BUILD_LIST_NAVAL_SPECIAL not found in UnitBuildList database

                    Continue?
                    Messagebox(DB Error): Wonders (Sci.) not found in BuildListSequence database

                    Continue?
                    Messagebox(DB Error): Wonders (Mil.) not found in BuildListSequence database

                    Continue?
                    Messagebox(DB Error): UNIT_BUILD_LIST_SPECIAL_ECONOMIC not found in UnitBuildList database

                    Continue?
                    Messagebox(DB Error): UNIT_BUILD_LIST_NAVAL_SPECIAL not found in UnitBuildList database

                    Continue?
                    Messagebox(DB Error): Wonders (Econ.) not found in BuildListSequence database

                    Continue?
                    Messagebox(DB Error): UNIT_BUILD_LIST_SPECIAL_ECOTOPIAN not found in UnitBuildList database

                    Continue?
                    Messagebox(DB Error): UNIT_BUILD_LIST_NAVAL_SPECIAL not found in UnitBuildList database

                    Continue?
                    Messagebox(DB Error): Wonders (Ecot.) not found in BuildListSequence database

                    Continue?
                    Messagebox(DB Error): UNIT_BUILD_LIST_SPECIAL_DIPLOMATIC not found in UnitBuildList database

                    Continue?
                    Messagebox(DB Error): UNIT_BUILD_LIST_NAVAL_SPECIAL not found in UnitBuildList database

                    Continue?
                    Messagebox(DB Error): Wonders (Dipl.) not found in BuildListSequence database

                    Continue?
                    Messagebox(Map Generator Error): Error while trying to load library 'dll/map/geometric.la': 'file not found'. Using builtin map generator

                    Continue?
                    Mouse PeepEvents failed:
                    (I get like 1000 of Mouse PeepEvents failed: errors)
                    Segmentation fault

                    I am running Sidux with Xorg 7.3 on an Nvidia card with 100.14.19 drivers if that may be the problem. I will continue compiling new versions as they come out to help with the port. I have no C or C++ programming skills, but I thought this would help.

                    Comment


                    • Wow so many database errors on windows I would ask you which mod you used, but on Linux it looks like, we have an incomplete merge of the database files.

                      -Martin
                      Civ2 military advisor: "No complaints, Sir!"

                      Comment


                      • Originally posted by cap601
                        Code:
                        slicfuncai.cpp: In member function 'virtual SFN_ERROR Slic_GetPersonalityType::Call(SlicArgList*)':
                        slicfuncai.cpp:1868: error: cast from 'const PersonalityRecord*' to 'sint32' loses precision
                        Any suggestions?
                        Repair the code. The blunt C-style cast of the record pointer to an integer prevents MSVC from triggering a warning, but is clearly wrong. This function is never used in the code itself, so it can only be triggered through Slic code, which will not be able to use the pointer.

                        Comment


                        • Originally posted by Fromafar
                          Repair the code. The blunt C-style cast of the record pointer to an integer prevents MSVC from triggering a warning, but is clearly wrong. This function is never used in the code itself, so it can only be triggered through Slic code, which will not be able to use the pointer.
                          That was the first thing I encountered, when I started to test a few turns with Cradle 1.35 with the debug version. Anyway it is now fixed in trunk.

                          -Martin
                          Civ2 military advisor: "No complaints, Sir!"

                          Comment


                          • Originally posted by RichardH
                            Some of the sprites don't display, but that's because the filenames are wrongly-cased (Linux is case-sensitive). You can fix these as and when you encounter them. I don't bother, because I'm lazy and am not playing properly at the moment. They should really be fixed.
                            Finished university now and might have some time to spent on ctp2 again. The sprite disappearing annoyed me most. Are You sure it is because the files are wrongly named? I thought the whole sprite is in one file. Also case sensitivity should not matter if the files are on a fat partition as the instructions in the README tell. But I only worked on the linux branch so far to get it playable. I ran out of time with the merge attempt.

                            Comment


                            • I've tried fixing my last error by copying in the relevant line from trunk which appears to work. The compile then continues before crashing with (amongst many warnings):-

                              Code:
                              bldque.cpp: In member function 'BuildQueue& BuildQueue::operator=(const BuildQueue&)':
                              bldque.cpp:1715: error: cast from 'sint32*' to 'uint32' loses precision
                              bldque.cpp:1715: error: cast from 'PLAYER_INDEX*' to 'uint32' loses precision
                              Unfortunately the relevant line is the same as in trunk. What's the fix this time?

                              Comment


                              • Well that's a blunt c-style cast, in that case it seems to do what it is supposed to do. The casts are supposed to to reinterpret the pointer addresses as integers, so the fix line should look like:

                                PHP Code:
                                        memcpy(&m_owner, &copy.m_ownerreinterpret_cast<uint32>(&m_wonderComplete) + sizeof(m_wonderComplete) - reinterpret_cast<uint32>(&m_owner)); 
                                Disclaimer: I just tested it on MSVC6 so it's up to you to figure out whether it works on your compiler.

                                -Martin
                                Last edited by Martin Gühmann; January 15, 2008, 17:22.
                                Civ2 military advisor: "No complaints, Sir!"

                                Comment

                                Working...
                                X