Has anyone had luck Compiling the current trunk r6248 on Ubuntu 8.10
I submitted a bug report on this https://gna.org/bugs/?12563
I looked at the code a little today and
http://developer.wz2100.net/browser/tru ... iptfuncs.c
shouldn't line 6747 of scriptfuncs.c
debug(LOG_SCRIPT, strParam1);
be something like
debug(LOG_SCRIPT, "message: %s", strParam1);
line 10910 of scriptfuncs.c
ASSERT(bExpression, sTmp);
Doesn't look right to me , missing a %d or something ... I'm a little rusty coding wise.
Can't Compile the current trunk r6248 on Ubuntu 8.10
-
jaakan
- Trained

- Posts: 75
- Joined: 15 Jun 2008, 01:51
Can't Compile the current trunk r6248 on Ubuntu 8.10
Last edited by jaakan on 04 Nov 2008, 23:42, edited 1 time in total.
-
jaakan
- Trained

- Posts: 75
- Joined: 15 Jun 2008, 01:51
Re: Can't Compile the current trunk r6248 on Ubuntu 8.10
I got a little farther
Changed line 6747 of scriptfuncs.c -- debug(LOG_SCRIPT, strParam1); to debug(LOG_SCRIPT, "message: %s", strParam1);
Changed line 10910 of scriptfuncs.c -- ASSERT(bExpression, sTmp); to // ASSERT(bExpression, sTmp);
And got this
cc1: warnings being treated as errors
scriptvals_parser.tab.c: In function ‘scrv_parse’:
scriptvals_parser.tab.c:2162: error: format not a string literal and no format arguments
make[3]: *** [scriptvals_parser.tab.o] Error 1
make[3]: Leaving directory `/root/warzone/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/warzone/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/warzone'
make: *** [all] Error 2
Changed line 6747 of scriptfuncs.c -- debug(LOG_SCRIPT, strParam1); to debug(LOG_SCRIPT, "message: %s", strParam1);
Changed line 10910 of scriptfuncs.c -- ASSERT(bExpression, sTmp); to // ASSERT(bExpression, sTmp);
And got this
cc1: warnings being treated as errors
scriptvals_parser.tab.c: In function ‘scrv_parse’:
scriptvals_parser.tab.c:2162: error: format not a string literal and no format arguments
make[3]: *** [scriptvals_parser.tab.o] Error 1
make[3]: Leaving directory `/root/warzone/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/warzone/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/warzone'
make: *** [all] Error 2
-
Per
- Warzone 2100 Team Member

- Posts: 3780
- Joined: 03 Aug 2006, 19:39
Re: Can't Compile the current trunk r6248 on Ubuntu 8.10
What version of gcc is this with?
-
jaakan
- Trained

- Posts: 75
- Joined: 15 Jun 2008, 01:51
Re: Can't Compile the current trunk r6248 on Ubuntu 8.10
root@MYTHTV64:~/warzone# apt-cache policy gccPer wrote:What version of gcc is this with?
gcc:
Installed: 4:4.3.1-1ubuntu2
Candidate: 4:4.3.1-1ubuntu2
Version table:
*** 4:4.3.1-1ubuntu2 0
500 http://archive.ubuntu.com intrepid/main Packages
100 /var/lib/dpkg/status
root@MYTHTV64:~/warzone#
jaakan@MYTHTV64:~$ lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10
jaakan@MYTHTV64:~$ uname -a
Linux MYTHTV64 2.6.27-7-generic #1 SMP Thu Oct 30 04:12:22 UTC 2008 x86_64 GNU/Linux
jaakan@MYTHTV64:~$
-
jaakan
- Trained

- Posts: 75
- Joined: 15 Jun 2008, 01:51
Re: Can't Compile the current trunk r6248 on Ubuntu 8.10
looks like same error/warning
/structure.Tpo -c -o structure.o structure.c
cc1: warnings being treated as errors
structure.c: In function ‘printStructureInfo’:
structure.c:5862: error: format not a string literal and no format arguments
structure.c:5875: error: format not a string literal and no format arguments
----
I added "%s", to both in structure.c
CONPRINTF(ConsoleString, (ConsoleString, "%s", getStatName(psStructure->pStructureType))); // line 5862
CONPRINTF(ConsoleString, (ConsoleString, "%s", getStatName(psStructure->pStructureType))); // line 5875
I added "%s", in scriptvals_parser.tab.c ( after I ran make once to create the file )
yyerror ("%s", yymsg); // line 2162
I ran make again and it completed compiling
Since scriptvals_parser.tab.c is created at build time I'm not sure what file to edit but I hope this helps.
/structure.Tpo -c -o structure.o structure.c
cc1: warnings being treated as errors
structure.c: In function ‘printStructureInfo’:
structure.c:5862: error: format not a string literal and no format arguments
structure.c:5875: error: format not a string literal and no format arguments
----
I added "%s", to both in structure.c
CONPRINTF(ConsoleString, (ConsoleString, "%s", getStatName(psStructure->pStructureType))); // line 5862
CONPRINTF(ConsoleString, (ConsoleString, "%s", getStatName(psStructure->pStructureType))); // line 5875
I added "%s", in scriptvals_parser.tab.c ( after I ran make once to create the file )
yyerror ("%s", yymsg); // line 2162
I ran make again and it completed compiling
Since scriptvals_parser.tab.c is created at build time I'm not sure what file to edit but I hope this helps.
-
Per
- Warzone 2100 Team Member

- Posts: 3780
- Joined: 03 Aug 2006, 19:39
Re: Can't Compile the current trunk r6248 on Ubuntu 8.10
Try adding -Wno-format-nonliteral to CFLAGS, either in configure.ac or as environment variable before running ./configure. You could also ./configure with --enable-debug=relaxed, which should make it compile without taking much notice of warnings.
-
jaakan
- Trained

- Posts: 75
- Joined: 15 Jun 2008, 01:51
Re: Can't Compile the current trunk r6248 on Ubuntu 8.10
Per wrote:Try adding -Wno-format-nonliteral to CFLAGS, either in configure.ac or as environment variable before running ./configure. You could also ./configure with --enable-debug=relaxed, which should make it compile without taking much notice of warnings.
thx ./configure --enable-debug=relaxed seem to compile