Page 6 of 16 FirstFirst ... 3 4 5 6 7 8 9 ... LastLast
Results 151 to 180 of 465

Thread: COMPILE: Linux Port

  1. #151
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    Originally posted by arrow014
    Ok, I finally found some time to start working on this on my Mandriva 2006 partition. I downloaded, built and installed SVN, checked out the source, ran autoconf, got errors, installed autoconf and automake packages, ran ./configure, got errors, installed the byacc package, ran ./configure and it seems to get through just about everything fine now;
    Well done on getting this far .

    it generates a bunch of makefiles and then gives me a slightly wierd error:

    ...
    config.status: creating ctp2_code/ui/Makefile
    config.status: creating ctp2_code/ui/interface/Makefile
    config.status: creating ctp2_code/os/include/config.h
    config.status: executing depfiles commands
    configure: configuring in ctp2_code/libs/anet
    configure: running /bin/sh ctp2_code/os/autoconf/config/configure --prefix=/usr/local --cache-file=/dev/null --srcdir=.
    /bin/sh: ctp2_code/os/autoconf/config/configure: No such file or directory
    configure: error: /bin/sh ctp2_code/os/autoconf/config/configure failed for ctp2_code/libs/anet

    Not sure what to do about this...is it really a problem? If so, any ideas what I need to do to fix it?
    Yes, this is a real problem. I ran into it myself, but then forgot about it. The problem is this: The configure script is set to run a "child" configure script to do the configuring for the anet library. Now, when it tries to run this configure script for anet, it finds that the script isn't there. It tries to compensate by running a "generic" configure script in "ctp2_code/os/autoconf/config/" (this is the directory it was told to look for such things), but there is no such script (installing enough packages might make this generic script exist - it might even make it do the right thing, but I wouldn't count on it). Unfortunately this fallback behaviour makes the error message somewhat obscure. Anyway, the solution is to go to the ctp2_code/libs/anet directory and create the configure script (by running automake, etc. You can probably get away with simply running "../../../autogen.sh")

    Actually, I'm rather proud of myself for getting this far by myself...I really haven't had much success building stuff from sources in the past, but I've been learning a lot about Linux development lately and it's starting to work a lot better.
    I'm glad you're getting the hang of things . Learning to use these autotools (especially understanding their error messages) can be an uphill struggle. Tip for the day: when you get a strange error, look up for the last non-strange line. In this case, the line that tells you what's really going wrong was
    Code:
    configure: configuring in ctp2_code/libs/anet
    Of course, identifying the last non-strange line can be tough!

    Tomorrow I'll try to get around to finishing those instructions in the post above (and adding a note about this problem), but once you've done those which are there, you should at least be able to get to the ctp2 main menu. Let me know if anything else stumps you .

  2. #152
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    I think the instructions above are now complete.

  3. #153
    ctplinuxfan
    Warlord
    Join Date
    11 Jan 2004
    Location
    Duisburg, NRW
    Posts
    209
    Country
    This is ctplinuxfan's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    08:28
    Hi,

    congratulations that you got the game running so far! I wish i could do a bit more atm, than reading this great news...

    Regarding the child configure problem: I *think* i commited a change to the Makefile, i.e. running either
    Code:
    make bootstrap
    or
    Code:
    make bootstrap-anet
    within the top source directory should do the trick.
    Sorry, if i forgot to mention it.

    As far as i can tell, we now have everything of Johannes Sixt patch included.

    What i remember to be also put on todo/plan is:
    [list=1][*]serialization: CTP2 uses a platform dependent form of serialisation, so for saving/loading games a format exchangable over different platforms would be great. If it works for now, definititely prio below input implementation.[*]add the patch to repository (for review)[*]look over type cast carefully;
    Seems what i feared is correct, i.e. most void * casts are meant to be to a target uint32 value, not a value referenced by an uint32 ptr, as i hoped. This could mean, that an uint32 is sometimes used to effectively store an address, i.e. a pointer to something. Whenever you see a crash when dereferencing a pointer cast to uint32 *, try to pass the pointer around or for a quick workaround cast to uint32 again. My vague guess is that this is a hack to provide a kind of unique id of an instance of an object. If so, an UUID algorithm placed somewhere (e.g. in ID class) could be an alternative.
    When an uint32 is used to store pointers to instances, perhaps we'll stumble over back-casts to origin type as well.[/list=1]

  4. #154
    arrow014
    Settler
    Join Date
    21 Oct 2005
    Posts
    15
    Country
    This is arrow014's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    06:28
    Regarding the child configure problem: I *think* i commited a change to the Makefile, i.e. running either
    Code:
    make bootstrap
    or
    Code:
    make bootstrap-anet
    within the top source directory should do the trick.
    Sorry, if i forgot to mention it.
    Aha! That did the trick. Now ./configure finishes fine, but make got hung up looking for flex, so I installed it from the Mandriva repository and make hummed along nicely until it hit ctp2_code/gfx/gfx_utils/tiffutil.cpp, where it complains about not seeing the header file tiffio.h. I noticed that this file was in the /ctp2_code/libs/tiff folder, so I copied that file to the other directory and it seemed to work ok. It also complained about tiff.h, so I did the same thing for that file. Then it couldn't find d3des/d3des.h, md5/global.h or md5/md5.h in ctp2_code/libs/anet/src/3rdparty/ while compiling ctp2_code/libs/anet/src/tca/tca.c. I noticed the zip files md5.zip and d3des.zip in one of those directories so I unzipped those and that stopped the complaints about the header files. Now it gives me the message "cc1: warnings being treated as errors" and about ten similar warnings, so it quits. I tried to look through the makefile in ctp2_code/libs/anet/src/linux/dp to see what I could do (maybe get rid of a -Werror somewhere?) but I couldn't figure it out (I told you--I'm rather new to this...). Any ideas on what I need to do next?

    Examples of warnings:

    ../../tca/tca.c: In function 'tca_pwchange_generate':
    ../../tca/tca.c:368: warning: passing argument 1 of 'des2key' discards qualifiers from pointer target type
    ../../tca/tca.c:369: warning: passing argument 1 of 'Ddes' discards qualifiers from pointer target type
    ../../tca/tca.c:378: warning: passing argument 1 of 'D2des' discards qualifiers from pointer target type


    I go for my third chemo treatment on Wednesday (Nov 16th) so I'll probably be out of commission for a while again, but I'll get back to this eventually... ;-)

    Thanks so much for all the help so far!

  5. #155
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    Originally posted by ctplinuxfan
    look over type cast carefully;
    Seems what i feared is correct, i.e. most void * casts are meant to be to a target uint32 value, not a value referenced by an uint32 ptr, as i hoped. This could mean, that an uint32 is sometimes used to effectively store an address, i.e. a pointer to something. Whenever you see a crash when dereferencing a pointer cast to uint32 *, try to pass the pointer around or for a quick workaround cast to uint32 again. My vague guess is that this is a hack to provide a kind of unique id of an instance of an object. If so, an UUID algorithm placed somewhere (e.g. in ID class) could be an alternative.
    When an uint32 is used to store pointers to instances, perhaps we'll stumble over back-casts to origin type as well.
    I'm fairly sure I've seen this trick used to pass quantities of gold (the uint32 cast to a void*, passed, and then at its destination cast back to a uint32). Such cases can't be passed be reference (at least, not easily), because it would involve taking the reference of a temporary or local variable or allocating and deallocating memory.

  6. #156
    ctplinuxfan
    Warlord
    Join Date
    11 Jan 2004
    Location
    Duisburg, NRW
    Posts
    209
    Country
    This is ctplinuxfan's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    08:28
    Originally posted by arrow014


    Aha! That did the trick. Now ./configure finishes fine, but make got hung up looking for flex, so I installed it from the Mandriva repository and make hummed along nicely until it hit ctp2_code/gfx/gfx_utils/tiffutil.cpp, where it complains about not seeing the header file tiffio.h.
    Try to install the dev package for the tiff library, it should contain the headers. It's most likely called libtiff-dev, libtiff-devel, tiff-dev, tiff-devel or something like that. The tiff headers in repository are for the windows build (maybe outdated/not match your tiff library version).

    Then it couldn't find d3des/d3des.h, md5/global.h or md5/md5.h in ctp2_code/libs/anet/src/3rdparty/ while compiling
    Thanks, i oversaw this, because i have dev-files for md5/d3des also installed. I corrected the GNUMakefile.am accordingly.

    Examples of warnings:

    ../../tca/tca.c: In function 'tca_pwchange_generate':
    ../../tca/tca.c:368: warning: passing argument 1 of 'des2key' discards qualifiers from pointer target type
    I'm certainly sure it's due to the missing dependencies fixed in r496, because after unzipping, the d3des.const patch must be applied, too.
    It should work now again, but by running
    Code:
    make clean ; make unpack
    within the 3rdparty directory, you can get it working on r495 and before, either.

  7. #157
    ctplinuxfan
    Warlord
    Join Date
    11 Jan 2004
    Location
    Duisburg, NRW
    Posts
    209
    Country
    This is ctplinuxfan's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    08:28
    Originally posted by J Bytheway
    I'm fairly sure I've seen this trick used to pass quantities of gold (the uint32 cast to a void*, passed, and then at its destination cast back to a uint32). Such cases can't be passed be reference (at least, not easily), because it would involve taking the reference of a temporary or local variable or allocating and deallocating memory.
    Well, it's great that it works now!
    Maybe we can improve it later or at least use size_t or long for that purpose, because uint32 isn't large enough to store an address on all platforms.

  8. #158
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    Originally posted by ctplinuxfan
    Well, it's great that it works now!
    Maybe we can improve it later or at least use size_t or long for that purpose, because uint32 isn't large enough to store an address on all platforms.
    I don't think that's a problem. I think the problem would occur if a void* were not big enough to store a uint32... Of course, that's just based on the couple of examples I've seen. Perhaps there are other places where the reverse holds.

  9. #159
    arrow014
    Settler
    Join Date
    21 Oct 2005
    Posts
    15
    Country
    This is arrow014's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    06:28
    Ugh...chemo was !@#* this time... I was out for a whole week with nausea, headaches, sore muscles, etc etc. Oh, well, enough complaining, I guess, God knows it's better than dying of cancer. And only three more to go (hopefully).

    Anyway...back to the current quest...

    Originally posted by ctplinuxfan

    It should work now again, but by running
    Code:
    make clean ; make unpack
    within the 3rdparty directory, you can get it working on r495 and before, either.
    Ok, that worked, sweet. A few more minutes of successful compilations flying up my screen later, it stops yet again with:

    ui/aui_ctp2/c3imageformats.cpp:46:23: error: SDL_image.h: No such file or directory
    ui/aui_ctp2/c3imageformats.cpp: In member function 'virtual AUI_ERRCODE TargaImageFormat::Load(const tchar*, aui_Image*)':
    ui/aui_ctp2/c3imageformats.cpp:171: error: 'IMG_Load' was not declared in this scope
    make[1]: *** [c3imageformats.o] Error 1
    make[1]: Leaving directory `/usr/src/ctp2/ctp2_code'
    make: *** [all-recursive] Error 1
    Doing a quick 'find -name "SDL_image.h"' doesn't come up with anything in the whole ctp2 directory structure...so maybe I'm missing another library...some TGA lib, perhaps?

    Happy Thanksgiving to all!

    -- Michael

  10. #160
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    You need to install the SDL library (look for packages named libsdl*). Under Debian this is split into many packages, so if you're in a similar situation then use your package management tools to get the one with that file in.

  11. #161
    arrow014
    Settler
    Join Date
    21 Oct 2005
    Posts
    15
    Country
    This is arrow014's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    06:28
    Originally posted by J Bytheway
    You need to install the SDL library (look for packages named libsdl*). Under Debian this is split into many packages, so if you're in a similar situation then use your package management tools to get the one with that file in.
    Got it. Next problem:

    make[2]: *** No rule to make target `gfx/layers/libgfxlayers.la', needed by `ctp2'. Stop.
    No idea what to do here...it sounds like something's missing from a makefile somewhere or something...

  12. #162
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    Check ctp2_code/gfx/Makefile.am Does it mention 'layers' in SUBDIRS? It should. My copy managed to lose its reference to layers - I don't know how. Things have got rather confused in my working copy, so I'm not sure exactly what's in the repository any more...

  13. #163
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    June 20, 2013
    Local Time
    08:28

    Post

    Originally posted by J Bytheway
    Check ctp2_code/gfx/Makefile.am Does it mention 'layers' in SUBDIRS? It should. My copy managed to lose its reference to layers - I don't know how. Things have got rather confused in my working copy, so I'm not sure exactly what's in the repository any more...
    Is there no way on Linux to check for modifications in your working copy? TortoiseSVN has, in fact it generates a list of all the files you have modified and you can inspect them with the diff viewer.

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

  14. #164
    arrow014
    Settler
    Join Date
    21 Oct 2005
    Posts
    15
    Country
    This is arrow014's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    06:28
    Originally posted by J Bytheway
    Check ctp2_code/gfx/Makefile.am Does it mention 'layers' in SUBDIRS? It should. My copy managed to lose its reference to layers - I don't know how. Things have got rather confused in my working copy, so I'm not sure exactly what's in the repository any more...
    Nope, it was missing, so I added it to Makefile.am and Makefile, too. I guess I'm still a little fuzzy as to the relationship between these two files, because it didn't work after modifying just the Makefile.am file, but it did work after modifying the Makefile itself. I'm guessing the .am file is involved in the generation of the Makefile (perhaps in that autogen.sh script that I ran at the beginning?). Is that correct?

    Anyway, after that it makes it to what looks like the final step--or close to it (I've omitted some of this output because it's so long):

    g++ {compiler options} -o ctp2 {libraries and object files including -lttf}
    /usr/bin/ld: cannot find -lttf
    {make exit messages}
    TTF? True Type Font? I've installed several font libraries and packages...I'm not sure what would be missing, unless it's something specific to this project. Any links?

    Dohhh.....after all this I feel like I'm so close!!!

  15. #165
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    Originally posted by Martin Gühmann
    Is there no way on Linux to check for modifications in your working copy? TortoiseSVN has, in fact it generates a list of all the files you have modified and you can inspect them with the diff viewer.
    There is a way, normally, but my working copy is really messed up. It seems to be completely impossible to update it. I think I need to remove it and start again with a new copy.

  16. #166
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    Originally posted by arrow014
    Nope, it was missing, so I added it to Makefile.am and Makefile, too. I guess I'm still a little fuzzy as to the relationship between these two files, because it didn't work after modifying just the Makefile.am file, but it did work after modifying the Makefile itself. I'm guessing the .am file is involved in the generation of the Makefile (perhaps in that autogen.sh script that I ran at the beginning?). Is that correct?
    The autogen script (in particular, automake) generates a Makefile.in from each Makefile.am, and then the configure script generates a Makefile from each Makefile.in. So, so get the "proper" version of this makefile you'd need to run autogen.sh (or make bootstrap) again, and then configure again.

    Anyway, after that it makes it to what looks like the final step--or close to it (I've omitted some of this output because it's so long):

    TTF? True Type Font? I've installed several font libraries and packages...I'm not sure what would be missing, unless it's something specific to this project. Any links?
    ttf is indeed true type font. The package needed in Debian is called libttf2. In any case you want a package with these files:

    Code:
    /usr/lib/libttf.a
    /usr/lib/libttf.la
    /usr/lib/libttf.so
    If there is no such package then I guess you'll have to find some source code somewhere and install it the hard way, but I strongly suspect that there will be one.

  17. #167
    arrow014
    Settler
    Join Date
    21 Oct 2005
    Posts
    15
    Country
    This is arrow014's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    06:28
    Originally posted by J Bytheway
    The autogen script (in particular, automake) generates a Makefile.in from each Makefile.am, and then the configure script generates a Makefile from each Makefile.in. So, so get the "proper" version of this makefile you'd need to run autogen.sh (or make bootstrap) again, and then configure again.
    Ah, so that's why. That makes sense. Thanks.

    Originally posted by J Bytheway
    ttf is indeed true type font. The package needed in Debian is called libttf2. In any case you want a package with these files:
    Ok I found a "freetype2-devel" lib that I hadn't installed and that seemed to do the trick.

    W00t! Make now finishes! Now THERE'S a reason for Thanks-giving...

    I went through your "post-build" instructions (initial run, modifying userprofile.txt, copying files, etc.) as best I could--I must have done something wrong, though, because the game still won't launch:

    ../ctp2 nointromovie
    Messagebox(Paths Error): 'controlpanel.ldl' not found in asset tree.
    /usr/src/ctp2/ctp2_data/english/uidata/layouts/civ3.ldl:43: syntax error
    Messagebox(LDL Error): /usr/src/ctp2/ctp2_data/english/uidata/layouts/civ3.ldl:43: syntax error
    Fatal signal: Segmentation Fault (SDL Parachute Deployed)
    Segmentation fault
    FYI, I have the full game installed on a fat32 partition (path: /mnt/shared/Games/Call To Power) and I have the Linux source in /usr/src/ctp2, so the relative path I put in userprofile.txt was "../../../../../mnt/shared/Games/Call\ To\ Power\ 2/ctp2_data/".

  18. #168
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    Originally posted by arrow014
    W00t! Make now finishes! Now THERE'S a reason for Thanks-giving...


    I went through your "post-build" instructions (initial run, modifying userprofile.txt, copying files, etc.) as best I could--I must have done something wrong, though, because the game still won't launch:

    FYI, I have the full game installed on a fat32 partition (path: /mnt/shared/Games/Call To Power) and I have the Linux source in /usr/src/ctp2, so the relative path I put in userprofile.txt was "../../../../../mnt/shared/Games/Call\ To\ Power\ 2/ctp2_data/".
    Two things:

    - I said that you could omit the first path if it was "../../ctp2_data". This is not in fact true. If you omit it it will be automatically added *after* the other one, where in fact it's needed *before* the other one. So, put that in if you're missing it.

    - The escaped spaces may be giving you grief. Try using just ' ' rather than '\ '. If that doesn't work, then rename the "Call To Power 2" directory to something without spaces in it.

  19. #169
    arrow014
    Settler
    Join Date
    21 Oct 2005
    Posts
    15
    Country
    This is arrow014's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    06:28
    Ok I added the first path and changed the directory name to just "ctp2" and now I'm getting:

    ../ctp2 nointromovie
    Messagebox(Targa Load Error): Unable to find the file 'UC088.rim'
    Failed loading times.ttf
    ctp2: ui/aui_common/aui_textbase.cpp:415: void aui_TextBase::TextReloadFont(): Assertion `m_textfont != __null' failed.
    Aborted

  20. #170
    ctplinuxfan
    Warlord
    Join Date
    11 Jan 2004
    Location
    Duisburg, NRW
    Posts
    209
    Country
    This is ctplinuxfan's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    08:28
    Originally posted by J Bytheway
    I don't think that's a problem. I think the problem would occur if a void* were not big enough to store a uint32... Of course, that's just based on the couple of examples I've seen. Perhaps there are other places where the reverse holds.
    Yes, sure. Thought you meant the opposite.

    Originally posted by Martin Gühmann
    Is there no way on Linux to check for modifications in your working copy?
    Sure there is, e.g. on command line by svn status and svn diff. I guess John has his .svn dirs messed up, because he says it doesn't work? If so, try this:
    [list=1][*]in broken wc, make a tar of it with .svn dirs in exclude list[*]in broken wc excute: grep revision .svn/entries[*]checkout that revision again: svn co -r revision ... target[*]maybe backup the new checkout at target[*]cd target[*]untar the backup of the broken working copy on the new checkout[*]run svn update[*]run svn status, svn diff, etc. as before, and merge manually (perhaps svn revert some stuff which was outdated on your broken wc)[/list=1]

  21. #171
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    I'm not sure about the message about UC088.rim.

    There was a problem with the font search system which I fixed this morning - I'll upload that in a moment. Checkout that and see if it helps.

    If not, Check whether you have a times.ttf anywhere on your system. If not, then you'll need to install it somehow (the Debian package is msttcorefonts; there's also a website somewhere - this issue was discussed earlier in this thread).

    If you do have it, and it's not being found, then tell me where it is and I can fix the font search system to find it (or tell you how to do that).

  22. #172
    ctplinuxfan
    Warlord
    Join Date
    11 Jan 2004
    Location
    Duisburg, NRW
    Posts
    209
    Country
    This is ctplinuxfan's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    08:28
    Originally posted by arrow014
    Ok I added the first path and changed the directory name to just "ctp2" and now I'm getting:
    Perhaps you are missing the corefonts package (perhaps named similar, it includes times.ttf, arial.ttf, e.t.c.). If so, install it and run xset fp rehash; if it won't work, maybe you have to restart xfs (the font server, if you installed it) and the X-Server, too.
    If it still doesn't find the fonts, locate times.ttf and copy the ttf fonts to the directory, where you start ctp2 from.

    For the .rim files, they are located in an .zfs Archive, maybe it's not installed within the ctp2_data path or isn't located within the search path mentioned in your userprofile. Sorry, if i can't tell more atm, i have no copy of ctp2 on this box.

  23. #173
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    I've just commited those changes. This update should have the following effects:

    - Game now doesn't always segfault on exit.

    - All the font paths that were supposed to be searched really are searched.

    - Some keyboard support in place (only keyboard-based scrolling, so far, but I think that was the hardest part - I've discovered that the way keyboard events are handled is really bizarre, so I had to do quite a lot of work to get this much working, but it should be downhill from here).

  24. #174
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    For the UC088 problem:

    You should have a file /ctp2_data/default/graphics/cursors/UC088.tga that was in the repository. If you do, then for some reason it's not being found (Don't worry about the fact that the message was about a .rim, not a .tga - it should search for the .tga first and then the .rim). Check your userprofile.txt and get back to us.

    If you don't have that file, then do an "svn status" and see what's happened to it. If it was somehow deleted then you can get it back with "svn revert".

    On an unrelated note: Since I'm in the middle of fixing the keyboard support, you may see some of my debugging messages if you press any keys in the game. Don't worry about that.

  25. #175
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    Some more work on keyboard support done. Now all keys that are bound to game actions like settling or opening the city manager should work, although you still can't type into a text box, or move around in a list box.

    For the moment the code assumes a British keyboard, because I needed to assume something, and a British keyboard was in front of me. I'm not sure how to make it properly support other keyboards, but it should be OK for most purposes - there will only be slight problems when the shift variants don't match up (e.g. pressing shift+2 will yield a double quote ("), whereas IIRC on an American keyboard it should be an at (@)).

  26. #176
    arrow014
    Settler
    Join Date
    21 Oct 2005
    Posts
    15
    Country
    This is arrow014's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    06:28
    Sorry for the long period of inactivity--I've been lazy (ie. too busy playing with Fluxbox, Nethack and a certain obscenely-titled console IRC client ). Anyway, I found a copy of times.ttf and arial.ttf that quieted those messages. I do indeed have UC088.tga in /usr/src/ctp2/ctp2_data/default/graphics/cursors/, which should be ok since the line in userprofile.txt is:

    Code:
    RuleSets=../../ctp2_data/;../../../../../mnt/shared/Games/ctp2/ctp2_data/
    After getting the fonts, I now get the opening CTP2 progress bar and everything looks cool for a second, then it quits with:

    ../ctp2 nointromovie
    No such device: No such device
    Messagebox(Targa Load Error): Unable to find the file 'UC088.rim'
    Messagebox(CRA_civilisation.txt line 114: Error): Could not find GREEK_DIPLOMAT_PHOTO in string database
    Messagebox(¸8·civilisation.txt line 114: Error): Expected number of Civilisations not found
    Messagebox(CivApp Error): Unable to Init the Databases.
    Fatal error. Aborting.
    At exit.
    PeepEvents failed:
    PeepEvents failed:
    Fatal signal: Segmentation Fault (SDL Parachute Deployed)
    Segmentation fault
    So it seems I now have a plethora of new, weird errors, and I see that UC088 thing is still complaining.

    And what is that "no such device" thing about? I have the CD in: before that I was getting a "medium not found" error. What "device" is it trying to access now?

    NOTE: I haven't done an SVN checkout or anything since the initial one 'cause I was afraid of having to redo much of the build process and the resulting errors. Now I'm realizing that I'm probably a version or two behind you guys and that might be causing problems (besides, doing the build again shouldn't be TOO hard, right...?). What should I do?

    Treatment tomorrow...wish me luck!
    -- Michael

  27. #177
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    Originally posted by arrow014
    Sorry for the long period of inactivity--I've been lazy (ie. too busy playing with Fluxbox, Nethack and a certain obscenely-titled console IRC client ). Anyway, I found a copy of times.ttf and arial.ttf that quieted those messages. I do indeed have UC088.tga in /usr/src/ctp2/ctp2_data/default/graphics/cursors/, which should be ok since the line in userprofile.txt is:

    Code:
    RuleSets=../../ctp2_data/;../../../../../mnt/shared/Games/ctp2/ctp2_data/
    Hmm... I'm not sure what could be going on there, then.

    After getting the fonts, I now get the opening CTP2 progress bar and everything looks cool for a second, then it quits with:

    ../ctp2 nointromovie
    No such device: No such device
    Messagebox(Targa Load Error): Unable to find the file 'UC088.rim'
    Messagebox(CRA_civilisation.txt line 114: Error): Could not find GREEK_DIPLOMAT_PHOTO in string database
    Messagebox(¸8·civilisation.txt line 114: Error): Expected number of Civilisations not found
    Messagebox(CivApp Error): Unable to Init the Databases.
    Fatal error. Aborting.
    At exit.
    PeepEvents failed:
    PeepEvents failed:
    Fatal signal: Segmentation Fault (SDL Parachute Deployed)
    Segmentation fault
    The fact that it's reading CRA_civilisation.txt suggests that you have Cradle set to be used (in ModSwapper/ModManager) on your wndows installation of CTP2. Check that, and if you do, then deactivate it - I'm not sure how backwards compatible we are with mods at the moment, and it would be safest to stick with the default game until that's working properly.

    If un-selecting Cradle doesn't fix the UC088.rim problem then we'll have to dig a little deeper. If you're familiar with gdb, then I can tell you roughly what to do to find out what's happening. If not, then I can perhaps add some debugging output to the code so that we can find out exactly where it's looking for that file.

    So it seems I now have a plethora of new, weird errors, and I see that UC088 thing is still complaining.

    And what is that "no such device" thing about? I have the CD in: before that I was getting a "medium not found" error. What "device" is it trying to access now?
    I'm not sure. In my output I get a "Operation not permitted: Operation not permitted" message. I don't know where either of these messages is coming from. Possibly somewhere in the SDL code for playing music off the CD. My message causes no problems, so hopefully yours doesn't either.

    NOTE: I haven't done an SVN checkout or anything since the initial one 'cause I was afraid of having to redo much of the build process and the resulting errors. Now I'm realizing that I'm probably a version or two behind you guys and that might be causing problems (besides, doing the build again shouldn't be TOO hard, right...?). What should I do?
    I suggest you do an "svn up" and rebuild. It shouldn't cause any problems, and it should be considerably faster than it was the first time .

    Treatment tomorrow...wish me luck!
    Good luck!

  28. #178
    arrow014
    Settler
    Join Date
    21 Oct 2005
    Posts
    15
    Country
    This is arrow014's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    06:28
    The fact that it's reading CRA_civilisation.txt suggests that you have Cradle set to be used (in ModSwapper/ModManager) on your wndows installation of CTP2.
    Ooooohhh, whoops. Hadn't thought of that. Actually I have several installs of CTP2 on that drive (w/ various mod combinations), so I guess I need to find the right one and rename some directories so that userprofile.txt is pointing to the right one. Thanks!

    If un-selecting Cradle doesn't fix the UC088.rim problem then we'll have to dig a little deeper. If you're familiar with gdb, then I can tell you roughly what to do to find out what's happening.\
    I'm vaguely familiar with it...I used it to debug a simple assembler program one time. But I sure would like to learn more. Actually...this whole CTP2-on-Linux project has become more of a learning exercise for me; I realized the other day that I'm not actually all that interested in actually PLAYING the game any more...I just want to get it to compile and work properly and learn all I can in the process. And then perhaps lend a hand if there's any relatively simple coding or documentation to be done...

    I'm not sure. In my output I get a "Operation not permitted: Operation not permitted" message. I don't know where either of these messages is coming from. Possibly somewhere in the SDL code for playing music off the CD. My message causes no problems, so hopefully yours doesn't either.
    Sweet. I'll hope that's the case, then...

    I suggest you do an "svn up" and rebuild. It shouldn't cause any problems, and it should be considerably faster than it was the first time .
    Ok...so what's the exact command for that? I tried to figure it out but I'm not quite sure of the syntax:

    Code:
    $ svn up svn://ctp2.kaan.dk/ctp2/branches/linux ctp2
    svn: 'svn://ctp2.kaan.dk/ctp2/branches' is not a working copy
    Or was the repo moved?

    Good luck!
    Thanks! The actual chemo injection went pretty uneventfully today and I'm feeling alright at the moment. The nightmare begins tomorrow (or possibly tonight)...

    Be back in a week or so...

  29. #179
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    07:28
    Originally posted by arrow014
    I'm vaguely familiar with it...I used it to debug a simple assembler program one time. But I sure would like to learn more.
    OK, well, here's how you can do it if it proves necessary, or if you just want to play around in gdb to see how things work:

    To start gdb just use "gdb ../ctp2" in the same directory you were running it from before (Be aware that it has to load pretty much all of the 250MB executable into memory, so if you have less than ~300MB of RAM, then it will start swapping frantically, and become quite slow - it can take a couple of minutes to load in this case. Even if you do have lots of RAM, it will still not be very fast). You can start ctp2 from inside gdb with the "run" command, and you can pass command line arguments to ctp2 through it. I suggest you use "run nointromovie".

    The function that searches the asset tree for files (and that prints out the error you saw when it fails to find the file) is CivPaths::FindFile, defined in ctp2_code/gs/fileio/CivPaths.cpp. If you examine it you'll see that it searches first the current scenario path (whiuld be nothing in your case), then the current scenario pack path (again, should be nothing), then the paths defined in userprofile.txt, and then the default "../../ctp2_data" type paths.

    Once gdb is loaded, but before starting ctp2, I suggest that you set a breakpoint at the start of the CivPaths::FindFile function (Simply use the command "break CivPaths::FindFile" - you can even tab-complete the class and function names). Now when you run ctp2 it should quickly reach your breakpoint and stop execution. step through execution for a while to get a feel for how the function works. When you want to stop stepping and let the program have free reign again, use "continue".

    When gdb breaks ctp2, you'll notice that it conviniently tells you the values of the command line arguments. In particular, it should say something like
    Code:
    CivPaths::FindFile (this=0x8bf6da0, dir=C3DIR_DIRECT,
        filename=0x871f3d2 "userprofile.txt", path=0xbf807974 "", silent=0,
        check_prjfile=1)
    the first time it breaks. Note that it lists the filename there. Because this function gets called a lot, you'll want to put a condition of the breakpoint to only break when the filename passed is "UC088.tga". What you want to say is:

    Code:
    condition 1 0==strcmp(filename,"UC088.tga")
    (where 1 is the number of the breakpoint you just created - see "help condition" in gdb for more details on how this works) but that won't work, because you can't call strcmp in this context (I'm not sure whether that's a limitation of gdb, or simply because no one included in this file). To do the whole check you'd have to write the condition as:

    Code:
    filename[0]=='U' && filename[1]='C' && ...
    and so on. Fortunately, if you just check characters 0, 3 and 4, that should suffice.

    Then it will break while searching for the appropriate file, and you can follow the execution to see exactly where it's looking, and thus find out where it's going wrong.

    I've just gone through this whole process in order to explain it to you, and in doing so, I've discovered what the problem is. I should have realised before - it's looking for UC088.TGA, but the file is called UC088.tga, and Unix filesystems are case-sensitive. It so happens that I also have a UC088.tga on my NTFS partition where it's looking next, and, for me, it finds that one. The function must be changed so that it searches case-insensitively. In the short term, if you just want to get it working, you can rename the file.

    Actually...this whole CTP2-on-Linux project has become more of a learning exercise for me; I realized the other day that I'm not actually all that interested in actually PLAYING the game any more...I just want to get it to compile and work properly and learn all I can in the process. And then perhaps lend a hand if there's any relatively simple coding or documentation to be done...
    I know the feeling. I knew few of these things I'm telling you before I set out on this project, but finding them out has been fun .

    Ok...so what's the exact command for that? I tried to figure it out but I'm not quite sure of the syntax:

    Code:
    $ svn up svn://ctp2.kaan.dk/ctp2/branches/linux ctp2
    svn: 'svn://ctp2.kaan.dk/ctp2/branches' is not a working copy
    Or was the repo moved?
    If you're at the root of your working copy, then you can simply execute "svn up", and it will work. If not, then you need to supply the path to the root of your working copy. The reason you're getting that error is because it wants you to pass the path of a working copy, not the url of a repository. svn remembers which repository the working copy was associated with, so you don't have to keep telling it every time.

    Thanks! The actual chemo injection went pretty uneventfully today and I'm feeling alright at the moment. The nightmare begins tomorrow (or possibly tonight)...
    I hope it goes as well as it can.

    Be back in a week or so...
    See you then.
    Last edited by J Bytheway; December 8, 2005 at 10:58.

  30. #180
    arrow014
    Settler
    Join Date
    21 Oct 2005
    Posts
    15
    Country
    This is arrow014's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    06:28
    Ugh. *sigh* So I did "svn up", "./autogen.sh", "./configure" and "make" and all that and now it's complaining about those stupid headers again:

    ../../tca/tca.c:33:34: error: 3rdparty/d3des/d3des.h: No such file or directory
    ../../tca/tca.c:34:49: error: 3rdparty/md5/global.h: No such file or directory
    ../../tca/tca.c:35:30: error: 3rdparty/md5/md5.h: No such file or directory
    I got this before (see previous posts) and fixed it by unpacking those two ZIP files, but this time it still gives me that error after I've unpacked them...the files are definitely there:

    [/usr/src/ctp2/ctp2_code] ls libs/anet/src/3rdparty/d3des/
    d3des.c d3des.h readme unpacked

    [/usr/src/ctp2/ctp2_code] ls libs/anet/src/3rdparty/md5
    global.h md5.1 md5.1.txt md5c.c mddriver.c rfc1321.txt
    Makefile md5.1.ps md5-announcement.txt md5.h README unpacked
    I get the feeling I just moved several steps BACKWARDS...

Page 6 of 16 FirstFirst ... 3 4 5 6 7 8 9 ... LastLast

Similar Threads

  1. COMPILE: Getting the source to compile
    By J Bytheway in forum CtP2 Source Code Project
    Replies: 307
    Last Post: March 29, 2011, 16:39
  2. Replies: 66
    Last Post: February 16, 2011, 18:16
  3. COMPILE: Getting the source to compile on VS.NET
    By vovan in forum CtP2 Source Code Project
    Replies: 62
    Last Post: July 8, 2004, 00:25
  4. Linux port?
    By Asesino_Virtual in forum Civ3-General-Archive
    Replies: 8
    Last Post: October 23, 2001, 16:51

Visitors found this page by searching for:

CTP2 Linux

_msize gcc

gcc _msize

make[3]: *** [quickslic.lo] error 1

unable to open appstr.txtbash ctp2 configure errorcannot find -lttfcall to power open sourced3des.hx64 linux ctp2 apolyton.net_msize in gccbinsh: .config.status: no such file or directory_msize gccunable to open appstr.txt. terminating app.ctp2 libttfbinsh: cannot create .dep.inc: operation not permittedsprites-still file not foundmake[3]: *** [quickslic.lo]type sint32 on linuxpowered by vBulletin health porterror: possibly undefined macro: AM_CPPFLAGS‘packed’ attribute ignored for field of type ‘char’undefined reference to `lt_dlclose --no-as-neededdeprecated conversion from string constant to char* linux problemport and recompile linux drivers

Bookmarks

Posting Permissions