Announcement

Collapse
No announcement yet.

COMPILE: Linux Port

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

  • You should not have to worry about the - machine/compiler dependent - implementation of va_list.
    Just remove the = NULL-initialization from the declaration of argptr: the initialization should be handled by va_start.

    Comment


    • After removing the =NULL part of the code compilation continues until:
      Code:
      + install -d ../../linux86/server/etc
      + install -m 0644 server/README2.txt ../../linux86/server/README2.txt
      + install server/etc/daily2 server/etc/reload2 server/etc/reset2 server/etc/restart2 server/etc/runAnet2 server/etc/start2 server/etc/stop2 server/etc/htget server/etc/servfil ../../linux86/server/etc
      + install -m 0644 server/etc/{anet2env,*.lst,*.in,*.tpl,*.pl} ../../linux86/server/etc
      install: cannot stat `server/etc/{anet2env,*.lst,*.in,*.tpl,*.pl}': No such file or directory
      There are some scripts present in the directory but none that match the conditions (all are extensionless). What is meant to be in there?

      Comment


      • Strange. I do have files with extensions (e.g. mkpages.pl) in the src/linux/server/etc directory. From the error message, I would guess that the script is not interpreting { and } as a list with comma-separated items, but rather as a single file name.

        But anyway, maybe you are already further than you think. Do you really want to build/install a server? At this point of the build, the client library (dp2.a) should have been generated already.

        Comment


        • As I don't need the server how can I stop the compiler trying to build it anyway?

          Comment


          • help for start needed

            hello there !

            I just try to get the linux port from cvs and compile it.
            well just there I got in trouble : there are three linux branch and I could'nt found any information on which one to use.

            so I checked-out the 3 of them, and tryed to do as said in doc/README.linux
            -> before step 1, ./autogen.sh must be done

            in the linux and linux-merge branches ./configure failed with the same error :
            config.status: executing depfiles commands
            === configuring in ctp2_code/libs/anet (/usr/local/Developpements/TCP-II/Linux-merge/ctp2_code/libs/anet)
            configure: running /bin/bash ctp2_code/os/autoconf/config/configure '--prefix=/usr/local/games/TCP-II' '--bindir=/usr/local/games/TCP-II/ctp2_program/ctp' --cache-file=/dev/null --srcdir=.
            /bin/bash: ctp2_code/os/autoconf/config/configure: No such file or directory
            configure: error: ctp2_code/os/autoconf/config/configure failed for ctp2_code/libs/anet
            the file ctp2_code/os/autoconf/config/configure seems not to be generated

            in the linux-rework this step pass corectly, but not the next one :
            the compilation fail with the following error :

            Making all in dbgen
            make[3]: entrant dans le répertoire « /usr/local/Developpements/TCP-II/Linux-rework/ctp2_code/gs/dbgen »
            g++ -DHAVE_CONFIG_H -I. -I../../../ctp2_code/os/include -I../../../ctp2_code/os/include -I../../../ctp2_code/ctp/ctp2_utils -Wunknown-pragmas -Wnon-virtual-dtor -fms-extensions -g -MT Datum.o -MD -MP -MF .deps/Datum.Tpo -c -o Datum.o Datum.cpp
            Datum.cpp:40:21: erreur: windows.h : Aucun fichier ou répertoire de ce type
            In file included from RecordDescription.h:44,
            from Datum.cpp:44:
            ../../../ctp2_code/ctp/ctp2_utils/pointerlist.h:128: erreur: «BOOL» does not name a type
            make[3]: *** [Datum.o] Erreur 1
            some info on my configuration :
            Ubuntu Hardy with the following packages installed for this compilation :
            byacc
            autoconf
            automake
            autotools-dev
            libtool
            libsdl1.2-dev
            libglu1-mesa-dev
            libx11-dev
            libasound2-dev
            libaudio-dev
            libxext-dev
            libxt-dev
            libgl1-mesa-dev
            libxau-dev
            libxcb-xlib0-dev
            libxdmcp-dev
            x11proto-core-dev
            x11proto-input-dev
            x11proto-kb-dev
            xtrans-dev
            x11proto-xext-dev
            libsm-dev
            libxcb1-dev
            libice-dev
            libpthread-stubs0-dev
            mesa-common-dev

            what did I miss ?



            and last but not least : I coud'nt find anywhere to by the original game.
            It seems nt to be sold any more
            any ideas on where to find it ?
            As I'm french - wich explain my bad english - tips to find it in France will be welcome.

            thank's
            loig

            Comment


            • I think I've solved loig's first error (and one of mine) by changing directory to [source dir]/ctp2_code/libs/anet and running "make bootstrap". This makes the ./configure work correctly and allows compilation to continue a little further.

              I'm now at the following error:
              Code:
              ui/aui_common/aui_blitter.cpp: In member function ‘virtual AUI_ERRCODE aui_Blitter::TileBlt8To8(aui_Surface*, RECT*, aui_Surface*, RECT*, sint32, sint32, uint32)’:
              ui/aui_common/aui_blitter.cpp:893: warning: statement has no effect
              ui/aui_common/aui_blitter.cpp: In member function ‘virtual AUI_ERRCODE aui_Blitter::TileBlt16To16(aui_Surface*, RECT*, aui_Surface*, RECT*, sint32, sint32, uint32)’:
              ui/aui_common/aui_blitter.cpp:1109: warning: statement has no effect
              /tmp/ccaXXtp6.s: Assembler messages:
              /tmp/ccaXXtp6.s:3566: Error: Incorrect register `%rsi' used with `l' suffix
              /tmp/ccaXXtp6.s:3567: Error: Incorrect register `%rdi' used with `l' suffix
              /tmp/ccaXXtp6.s:3575: Error: Incorrect register `%rsi' used with `l' suffix
              /tmp/ccaXXtp6.s:3576: Error: Incorrect register `%rdi' used with `l' suffix
              make[2]: *** [aui_blitter.o] Error 1
              make[2]: Leaving directory `/home/josh/CTP2/source/ctp2_code'
              make[1]: *** [all-recursive] Error 1
              make[1]: Leaving directory `/home/josh/CTP2/source/ctp2_code'
              make: *** [all-recursive] Error 1
              The error looks like it might be a 64bit issue but I can't even find the file referred to so as to try changing things. Any ideas?

              EDIT - ccaXXtp6.s only exists whilst make is running so I can't see what's in it and have no idea how to change it.

              Comment


              • Hi !
                thank's cap601 make bootstrap did the trick.

                In fact I should have read deeper this whole thread before asking
                So, after some try, failed, install new dev packages, the compilation went on !

                I had to install the following packages (on ubuntu hardy) :

                libltdl3-dev
                libsdl-mixer1.2-dev (with dependences libogg-dev, libvorbis-dev, libsmpeg-dev)
                libsdl-image1.2-dev
                libsdl-ttf2.0-dev
                libttf-dev (with dependences libttf2)
                libtiff4-dev (with dependences libtiffxx0c2, libjpeg62-dev)

                I managed to find an online shop selling CTP2, and buy it.

                Now I just have to wait until the reception of the game box to test


                Now some questions :
                branches linux-merge and linux-rework are dead and of no use, right ?

                is RichardH still there (no post since 20-10-2007 and the 811 rev) ?
                is someone still working on the merge ?

                lynx_abraxas, you spoke about a bad feeling about perf and SDL.
                do you have explored more the different possibilities namely SDL-gl, plain GL or an other game framework on top of GL ?
                what about the quantity of work needed for this kind of change ?

                on what do you all think it is better to work first, so I can (try to) help ?

                Comment


                • Originally posted by cap601
                  EDIT - ccaXXtp6.s only exists whilst make is running so I can't see what's in it and have no idea how to change it.
                  Most likely, this is a temporary compiler generated file, caused by the inline assembly in aui_blitter.cpp. You should not have to change it: modify aui_blitter.cpp instead.

                  When looking at the inline assembly, it doesn't appear to do very much more than copying, optimised (?) for a 32 bit processor. You may just as well replace it with a standard copy, and let the compiler optimise it. I would have to check the generated assembly code, but I doubt you will notice any difference. If you want, you may try with the attached modified aui_blitter.cpp. I will commit it, if Martin confirms that it doesn't cause any (speed) problems with MSVC6.
                  Attached Files

                  Comment


                  • Thanks, that allows me to continue compilation. I'll post back when I reach the next unfixable error; currently it's just the standard losing precision ones.

                    Comment


                    • In trying to build this, I have found two issues.

                      1) when I run "make clean" ctp2_code, I get:

                      Making clean in newdb
                      Error expanding embedded variable.
                      *** Error code 1

                      Stop in /usr/ports/games/ctp2/ctp2_code/gs.
                      *** Error code 1

                      Stop in /usr/ports/games/ctp2/ctp2_code.


                      2) when I run "make" in ctp2_code, I get this:

                      creating fault.la
                      (cd .libs && rm -f fault.la && ln -s ../fault.la fault.la)
                      /usr/local/bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../ctp2_code/os/include -DGEOMETRIC -I../../ctp2_code/os/include -I../../ctp2_code/ctp -I../../ctp2_code/ctp/ctp2_utils -I../../ctp2_code/gs/outcom -I../../ctp2_code/ui/aui_common -I../../ctp2_code/ui/ldl -Wall -Wno-unused-variable -fms-extensions -fmessage-length=0 -frtti -fexceptions -g -MT geometric_la-Geometric.lo -MD -MP -MF .deps/geometric_la-Geometric.Tpo -c -o geometric_la-Geometric.lo `test -f 'Geometric.cpp' || echo './'`Geometric.cpp
                      g++ -DHAVE_CONFIG_H -I. -I../../ctp2_code/os/include -DGEOMETRIC -I../../ctp2_code/os/include -I../../ctp2_code/ctp -I../../ctp2_code/ctp/ctp2_utils -I../../ctp2_code/gs/outcom -I../../ctp2_code/ui/aui_common -I../../ctp2_code/ui/ldl -Wall -Wno-unused-variable -fms-extensions -fmessage-length=0 -frtti -fexceptions -g -MT geometric_la-Geometric.lo -MD -MP -MF .deps/geometric_la-Geometric.Tpo -c Geometric.cpp -fPIC -DPIC -o .libs/geometric_la-Geometric.o
                      g++ -DHAVE_CONFIG_H -I. -I../../ctp2_code/os/include -DGEOMETRIC -I../../ctp2_code/os/include -I../../ctp2_code/ctp -I../../ctp2_code/ctp/ctp2_utils -I../../ctp2_code/gs/outcom -I../../ctp2_code/ui/aui_common -I../../ctp2_code/ui/ldl -Wall -Wno-unused-variable -fms-extensions -fmessage-length=0 -frtti -fexceptions -g -MT geometric_la-Geometric.lo -MD -MP -MF .deps/geometric_la-Geometric.Tpo -c Geometric.cpp -o geometric_la-Geometric.o >/dev/null 2>&1
                      mv -f .deps/geometric_la-Geometric.Tpo .deps/geometric_la-Geometric.Plo
                      cp -p FaultGen_geometric.cpp
                      usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file target_file
                      cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file ... target_directory
                      *** Error code 64

                      Stop in /usr/ports/games/ctp2/ctp2_code/mapgen.
                      *** Error code 1

                      Stop in /usr/ports/games/ctp2/ctp2_code.


                      Robert Huff

                      Comment


                      • I've managed to complete compilation and have installed it. Unfortunately:
                        Code:
                        josh@josh:~/CTP2/ctp2_program/ctp$ ./ctp2
                        No medium found
                        All resolutions available.
                        ui/aui_ctp2/c3blitter.cpp L719: MMX-Test succeded!
                        Segmentation fault (core dumped)
                        josh@josh:~/CTP2/ctp2_program/ctp$
                        Any ideas?

                        Comment


                        • Originally posted by Fromafar
                          I will commit it, if Martin confirms that it doesn't cause any (speed) problems with MSVC6.
                          Seems that it doesn't cause any problems. Well, I have a fast computer compared to the conditions in 2000, but I wouldn't expect any problems since it is just the interface and also only one change. So commit it.

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

                          Comment


                          • Originally posted by cap601
                            I've managed to complete compilation and have installed it. Unfortunately:
                            Code:
                            josh@josh:~/CTP2/ctp2_program/ctp$ ./ctp2
                            No medium found
                            All resolutions available.
                            ui/aui_ctp2/c3blitter.cpp L719: MMX-Test succeded!
                            Segmentation fault (core dumped)
                            josh@josh:~/CTP2/ctp2_program/ctp$
                            Any ideas?
                            Yes. Use gdb for determining the point where the segmentation fault appears and then step back the function stack to find the call of the function that has a wrong pointer.
                            Did any graphic turn up till the segmentation fault? A lot segmentation faults I solved came from a very bad usage (reinterpret_cast) of void pointers that are used for storing integer index values of lists. There are other segmentation faults that originate from pointer mess in the battle view. (I didn't find out the real problem concerning proper drawing of the sprites but I managed to eliminate a segmentation fault)

                            Good luck searching

                            Comment


                            • Originally posted by roberthuff

                              2) when I run "make" in ctp2_code, I get this:

                              creating fault.la
                              (cd .libs && rm -f fault.la && ln -s ../fault.la fault.la)
                              /usr/local/bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../ctp2_code/os/include -DGEOMETRIC -I../../ctp2_code/os/include -I../../ctp2_code/ctp -I../../ctp2_code/ctp/ctp2_utils -I../../ctp2_code/gs/outcom -I../../ctp2_code/ui/aui_common -I../../ctp2_code/ui/ldl -Wall -Wno-unused-variable -fms-extensions -fmessage-length=0 -frtti -fexceptions -g -MT geometric_la-Geometric.lo -MD -MP -MF .deps/geometric_la-Geometric.Tpo -c -o geometric_la-Geometric.lo `test -f 'Geometric.cpp' || echo './'`Geometric.cpp
                              g++ -DHAVE_CONFIG_H -I. -I../../ctp2_code/os/include -DGEOMETRIC -I../../ctp2_code/os/include -I../../ctp2_code/ctp -I../../ctp2_code/ctp/ctp2_utils -I../../ctp2_code/gs/outcom -I../../ctp2_code/ui/aui_common -I../../ctp2_code/ui/ldl -Wall -Wno-unused-variable -fms-extensions -fmessage-length=0 -frtti -fexceptions -g -MT geometric_la-Geometric.lo -MD -MP -MF .deps/geometric_la-Geometric.Tpo -c Geometric.cpp -fPIC -DPIC -o .libs/geometric_la-Geometric.o
                              g++ -DHAVE_CONFIG_H -I. -I../../ctp2_code/os/include -DGEOMETRIC -I../../ctp2_code/os/include -I../../ctp2_code/ctp -I../../ctp2_code/ctp/ctp2_utils -I../../ctp2_code/gs/outcom -I../../ctp2_code/ui/aui_common -I../../ctp2_code/ui/ldl -Wall -Wno-unused-variable -fms-extensions -fmessage-length=0 -frtti -fexceptions -g -MT geometric_la-Geometric.lo -MD -MP -MF .deps/geometric_la-Geometric.Tpo -c Geometric.cpp -o geometric_la-Geometric.o >/dev/null 2>&1
                              mv -f .deps/geometric_la-Geometric.Tpo .deps/geometric_la-Geometric.Plo
                              cp -p FaultGen_geometric.cpp
                              usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file target_file
                              cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file ... target_directory
                              *** Error code 64

                              Stop in /usr/ports/games/ctp2/ctp2_code/mapgen.
                              *** Error code 1

                              Stop in /usr/ports/games/ctp2/ctp2_code.


                              Robert Huff
                              What's the name of the base dir you checked the svn code into? If I remeber right, you should start the make in that dir not in the subdir ctp2_code.
                              Otherwise check the makefile in ctp2_code/mapgen why the target of the cp-command is missing.
                              What system do you have?

                              Comment


                              • Before I go any further: what is the full specification of the subversion repository?


                                Robert Huff

                                Comment

                                Working...
                                X