Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] Re: More OpenVMS Client Build Problems....
Home

[Freeciv-Dev] Re: More OpenVMS Client Build Problems....

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Robert Alan Byer <byer@xxxxxxxxxxxxxxxxxxx>
Cc: Freeciv Developers ML <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: More OpenVMS Client Build Problems....
From: Davide Pagnin <nightmare@xxxxxxxxxx>
Date: 14 Oct 2002 18:17:53 +0200

On Mon, 2002-10-14 at 17:44, Robert Alan Byer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> 
> 
> Well...
> 
> After last week's mess I decided to give myself a break and take the rest 
> of the week off.  While doing that v1.14 development tree was created so 
> today I decided to pull that down to work with.
> 
> The server builds just fine and I now have a new client build problem.  
> When trying to build the client (specifically the cityrepdata.c file) I got 
> an error stating that "cma_core.h" wasn't found.  After some looking I found 
> it in the "../freeciv-1.14/client/agents" directory.  Modifying my build
> script to include the directory I get the following two errors...
> 
> ===========================================================================
> 
> Compilng The SYS$DISK:[-.CLIENT]CLIENTLIB-AXP.OLB Library.
> Using Compile Command: CC/NOLIST/PREFIX=ALL/OPTIMIZE=(LEVEL=5,TUNE=HOST)/
> ARCH=HOST/NODEBUG/REENTRANCY=MULTITHREAD/FLOAT=IEEE_FLOAT/IEEE_MODE=DENORM_RESULTS
> /NEST=PRIMARY/NAME=(AS_IS,SHORTENED)/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CLIENT],
> SYS$DISK:[-.CLIENT.INCLUDE],SYS$DISK:[-.CLIENT.AGENTS],SYS$DISK:[-.COMMON],
> SYS$DISK:[-.-.GTK128.GLIB],SYS$DISK:[-.-.IMLIB-1_9_8_1.GDK_IMLIB],PORTING_LIB:[INCLUDE
> ])/DEFINE=("HAVE_CONFIG_H=TRUE","DEBUG=TRUE","_AXP_=TRUE","PRE_DECC_V6_2=TRUE")
> 
>         SYS$DISK:[-.CLIENT]ATTRIBUTE.C
>         SYS$DISK:[-.CLIENT]AUDIO_NONE.C
>         SYS$DISK:[-.CLIENT]CHATLINE_COMMON.C
>         SYS$DISK:[-.CLIENT]CITYDLG_COMMON.C
>         SYS$DISK:[-.CLIENT]CITYREPDATA.C
> 
> enum stat { FOOD, SHIELD, TRADE, GOLD, LUXURY, SCIENCE, NUM_STATS };
> ^
> %CC-E-REDEFTAG, In this declaration, the tag "stat" is redeclared.
> at line number 39 in file DISK$WORK:[TEST.FREECIV-1_14.CLIENT.AGENTS]
> CMA_CORE.H;
> 1
> 
>   int minimal_surplus[NUM_STATS];
> ......................^
> %CC-E-UNDECLARED, In the declaration of "minimal_surplus", "NUM_STATS" is 
> not de
> clared.
> at line number 43 in file DISK$WORK:[TEST.FREECIV-1_14.CLIENT.AGENTS]
> CMA_CORE.H;
> 1
> 
> ===========================================================================
> 
> Now, the last working version of FreeCiv didn't have the "agents" directory
> , so I guess one of my questions is what is it and how do I need to build 
> it?

Well. AFAIK, you need agents directory for gtk-client, at least.
And moreover, agents are now deeply inside client core.

Anyway, I would love to have the output of the preprocessor, to see what
is wrong.

on gcc the option is -E, but on OpenVMS, if I'm not wrong, the option is
/PREPROCESS_ONLY[=eventual_filename]

And, moreover, on my machine, compilation inside client directory, show
these includes:

gcc -I. -I.. -I./include -I../common -I../intl -I./agents cityrepdata.c 

Can you make, also, a trial with this specific order of includes?
/INCLUDE=(SYS$DISK:[-.client],SYS$DISK[-],SYS$DISK:[-.client.INCLUDE],
SYS$DISK:[-.CLIENT.AGENTS],SYS$DISK:[-.COMMON]

And return, also in this case, the preprocessor output?

It would be *NICE* to understand where the "stat" variable was first
declared as the cc say, but seems that the error report don't.

A full search of the Freeciv tree for " stat " in .h or .c files, give
this output:

client/agents/cma_core.c:const char *const cma_get_stat_name(enum stat stat)
client/agents/cma_core.h:enum stat { FOOD, SHIELD, TRADE, GOLD, LUXURY, 
SCIENCE, NUM_STATS };
client/agents/cma_core.h:const char *const cma_get_stat_name(enum stat stat);
common/improvement.c:            Impr_Status stat = equiv_list[i][*ept];
common/improvement.c:     Impr_Status stat = equiv_list[i][*ept];
common/shared.c:    struct stat buf;            /* see if we can open the file 
or directory */
common/support.c:  struct stat tmp;

I can't see which can be the problem for cityrepdata.c, but the
preprocessor will give us a hint, I hope!

P.S. I think that "enum stat stat" is a bad c style...
(At first sight I'll say this can be *the* issue, but I'm not sure,
anyway I suggest to change this is something less confusing)

        Ciao, Davide



[Prev in Thread] Current Thread [Next in Thread]