With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Post feedback & meet new friends. General SG discussion.

Moderators: Pardner, TheDoctor

game engine and game data via portage

Postby maggu2810 » Sun May 24, 2009 5:29 pm

Hi!
I use the linux distribution gentoo and added two ebuilds to my overlay for the smokin' guns data and engine. So it is possible to install the game (as gentoo user) via that packet management.
For the engine is used the current trunk.
Code: Select all
The QA messages notes me, that you should adjust your sources (i did not test it with the current brunch):
 * QA Notice: Package has poor programming practices which may compile
 *            fine but exhibit random runtime failures.
 * y.tab.c:210: warning: incompatible implicit declaration of built-in function 'malloc'
 * y.tab.c:219: warning: incompatible implicit declaration of built-in function 'realloc'
 * y.tab.c:251: warning: incompatible implicit declaration of built-in function 'free'
 * y.tab.c:445: warning: incompatible implicit declaration of built-in function 'free'

The judgement "poor programming practices" is a result of portage and not my oppinion :wink:
maggu2810
Newcomer
 
Posts: 4
Joined: Fri May 12, 2006 5:33 pm



Postby torhu » Sun May 24, 2009 10:20 pm

SG has no file called y.tab.c, so you can probably ignore that stuff. :wink:
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby maggu2810 » Sun May 24, 2009 10:28 pm

The file is created by the preprocessor because of the content of the file './lcc/lburg/gram.c'

Or I am wrong?

Code: Select all
 grep -n -B2 -A5 y.tab.c ./lcc/lburg/gram.c

Code: Select all
33-     Tree tree;
34-} YYSTYPE;
35:#line 37 "y.tab.c"
36-#define TERMINAL 257
37-#define START 258
38-#define PPERCENT 259
39-#define ID 260
40-#define TEMPLATE 261
--
399-    vfprintf(stderr, fmt, ap);
400-}
401:#line 403 "y.tab.c"
402-#define YYABORT goto yyabort
403-#define YYACCEPT goto yyaccept
404-#define YYERROR goto yyerrlab
405-
406-#if YYDEBUG
--
626-{ if (*yyvsp[0].string == 0) yyval.string = "0"; }
627-break;
628:#line 630 "y.tab.c"
629-    }
630-    yyssp -= yym;
631-    yyvsp -= yym;
632-    yym = yylhs[yyn];
633-    yystate = *yyssp;
maggu2810
Newcomer
 
Posts: 4
Joined: Fri May 12, 2006 5:33 pm



Postby torhu » Sun May 24, 2009 10:49 pm

Seems you are right. lcc is the compiler that's used for building the qvm files. Well, nothing to worry about. :)
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby maggu2810 » Mon May 25, 2009 7:16 am

Okay, nothing to worry... But you can avoid this when you add a
Code: Select all
#include <stdlib.h>

as the first line in the file "lcc/lburg/gram.c".

I believe this should be done (good programming style). Do you not agree?
maggu2810
Newcomer
 
Posts: 4
Joined: Fri May 12, 2006 5:33 pm



Postby torhu » Mon May 25, 2009 10:49 pm

I agree in principle, but it's I think the lcc code is the same as the ioquake3 project is using. If it turns out to be a problem, they'll probably fix it, and the fix will find its way into our code sooner or later. But maybe Tequila wants to look at this. :)
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby Tequila » Tue May 26, 2009 10:53 am

:)
Yes it is still fixed in that way in ioQuake3 sources and then in our 1.1 branch. In fact the "#ifdef __cplusplus" is commented:
Code: Select all
//#ifdef __cplusplus TA <tim at ngus.net> stdlib.h applies to C too
#include <stdlib.h> /* for malloc/realloc/free */
//#endif
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby maggu2810 » Thu Jun 04, 2009 10:11 pm

Thanks for your reply and sorry for my late reply. :P
I hope, that the ebuild is useful for somebody.
maggu2810
Newcomer
 
Posts: 4
Joined: Fri May 12, 2006 5:33 pm




Return to Saloon

Show Sidebar
Show Sidebar

User Control Panel

cron