Question #3 - Compiling under Linux with Cons?

Discussions about ET modding (sdk code, player/weapon modeling)

Moderators: Forum moderators, developers

Post Reply
Seph64
Posts: 4
Joined: Thu Jan 29, 2004 1:52 pm

Question #3 - Compiling under Linux with Cons?

Post by Seph64 »

Alright, after finding out that I need a programmed named "Cons" to compile the source code in Linux, I installed it. Now I had hoped that it would be that simple, but now. cons just has to puke out errors.

Code: Select all

seph64@gentoo unix $ cons -- gcc3
Inconsistency detected by ld.so: rtld.c: 1252: dl_main: Assertion `_rtld_local._dl_rtld_map.l_prev->l_next == _rtld_local._dl_rtld_map.l_next' failed!
Enemy Territory version 2.56
cpu : x86
OS  : Linux
libc:
configured for release build, in directory release-x86-Linux-
CFLAGS: -pipe -fsigned-char -DMISSIONPACK -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -ffast-math -fno-strict-aliasing -fstrength-reduce -falign-loops=2 -falign-jumps=2 -falign-functions=2
which: no ccache in (/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/i586-pc-linux-gnu/gcc-bin/3.2:/usr/X11R6/bin:/usr/qt/3/bin:/usr/kde/3.1/bin:/usr/games/bin)
Ignoring missing script "/home/seph64/WET_Source/src/extractfuncs/Conscript" (script::Build in Construct, line 334) at /usr/bin/cons line 720.
cons: error in file "Conscript-game" (Can't locate object method "AfterBuild" via package "cons" at Conscript-game line 146.)
cons: error in file "Conscript-cgame" (Can't locate object method "AfterBuild" via package "cons" at Conscript-cgame line 98.)
cons: error in file "Conscript-ui" (Can't locate object method "AfterBuild" via package "cons" at Conscript-ui line 54.)
cons: script errors encountered: construction aborted
What is this Object Method "AfterBuild" and what can I do to solve this little problem? More importantly, did Bani run into this sort of problem?

Thanks in advance.
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

we dont use cons, we made our own makefiles.
Seph64
Posts: 4
Joined: Thu Jan 29, 2004 1:52 pm

Post by Seph64 »

I see. Well I guess that I'll have to continue to wait for an answer to hit me. Unless of course you'll be nice enough to upload those makefiles.

Thanks for the reply.

EDIT: Figured out how to compile the source with cons, you're posed to used the cons executable that came with the source...

But here is what I can't figure out. I copy the files that I have edited over to the right directories on my linux install from my windows partition, but the compiler doesn't compile in the changes I've made (and I made a lot of changes). It's like the compile finds something that isn't there. I changed the MP40 clip ammount from 30 to 32, but when I test, it's 30. I've also changed the rate of fire on the MP40, it's does not appear to be compiled in. A lot of stuff that I changed isn't in the .so files I've made.

edit #2: I think I know, Linux has been copying it's only .so files from the installation directory and placing them in my mod folder. I've tried giving the files read-only permissions, but that did not work.

edit #3: I tried placing .so files into a pk3 folder, but I kept getting invalid elf header errors. I resolved the issue by copying the .so files into a sephmod folder in the main installation folder. And yes, now it recognises the changes.
User avatar
Svartberg
Posts: 87
Joined: Fri Jan 02, 2004 7:35 am

Post by Svartberg »

Are you sure the compiler overwrites the new build .so ??

And maybe you accidently didn't ran the mod right ?

Good luck mite. :P
User avatar
SiliconSlick
Posts: 14
Joined: Wed Jan 14, 2004 6:21 am
Location: College Station, TX
Contact:

Post by SiliconSlick »

I couldn't get cons to work "out of the box" on my RH9 box.
Not sure why.

I have to do "perl cons -- gcc3".

That will do a full compile but I have yet to run it successfully.

I create a "test" folder and copy the 3 .so's there and then
start the game with "+set fs_game test" but the game overwrites
my .so's with the .so's from /usr/local/games/enemy-territory/etmain
when it loads and therefore none of my changes take
affect.

I got to remember what to do, short of moving to a RH7.x box,
to make it compile for GLIBC2.2. I don't think that is the
present problem but something I am aware of.

Just some random gibberish.

SiliconSlick
"We got a kinder, gentler, machine gun hand"--Neil Young,Rockin' in the Free World,Freedom
Image
http://siliconslick.com/wp/mgb.jpg
Seph64
Posts: 4
Joined: Thu Jan 29, 2004 1:52 pm

Post by Seph64 »

et +set fs_basepath /path/to/et/with/your/mod +set fs_homepath /path/to/et/installation +set fs_game modname

Example:

Code: Select all

et +set fs_basepath /home/seph64/.etwolf/ +set fs_homepath /opt/enemy-territory/ +set fs_game sephmod
/home/seph64/.etwolf is where my mod is located, and enemy-territory is installed to /opt/enemy-territory

cheers :D
Spark2
Posts: 182
Joined: Wed Sep 10, 2003 12:31 pm

Post by Spark2 »

I just realized that you can save yourself a lot of frustration if you start the game with sv_pure 0. :oops: Now it works by just putting the .so file into the local mod folder.

Slick: Perl can sometimes be scary... I got it to recognize the interpreter (on Fedora) by changing the first line to "!#/usr/bin/perl -" (notice the - at the end), nothing else worked. I don't even know why, that was just a lucky guess. :mrgreen:
leo

Post by leo »

bani wrote:we dont use cons, we made our own makefiles.
How about sharing them?. (Of course a NO answer is valid)
User avatar
SiliconSlick
Posts: 14
Joined: Wed Jan 14, 2004 6:21 am
Location: College Station, TX
Contact:

Post by SiliconSlick »

Spark2 wrote:Slick: Perl can sometimes be scary... I got it to recognize the interpreter (on Fedora) by changing the first line to "!#/usr/bin/perl -" (notice the - at the end), nothing else worked. I don't even know why, that was just a lucky guess. :mrgreen:
I read in this thread:

http://www.splashdamage.com/index.php?n ... pic&t=6510

that the "bad interpreter" was probably due to a DOS file.

I did a "dos2unix cons" on a fresh copy (from Windows)
and it worked fine.

And be sure to use "./cons" instead of just "cons" since the
latter is usually installed in /usr/bin and isn't the same.
Otherwise, you get the "AfterBuild" errors Seph64
mentioned above.

SiliconSlick
"We got a kinder, gentler, machine gun hand"--Neil Young,Rockin' in the Free World,Freedom
Image
http://siliconslick.com/wp/mgb.jpg
Seph64
Posts: 4
Joined: Thu Jan 29, 2004 1:52 pm

Post by Seph64 »

Alright, I give up, I'm just about ready to say "screw you" to the people who don't bother to upgrade their old Linux software to newer versions (concerning 2.9.5 and Glibc2.2).

I've tried compiling on a lot of older distros with Gcc 2.9.x and glibc 2.2. on RH7.3, which comes with gcc 2.9.6 and GlibC 2.2, cons complains that gcc 2.9.5 is not installed and errors out like it would if you just tried 'perl cons' on a system with gcc 3.x and glibc 2.3 without specifying that you have gcc 3.x.

I've tried downgrading Gentoo Linux's gcc to 2.9.5 and it's glibc to 2.2. Well I got gcc 2.9.5 installed successfully (though it hosed Python (which happened to be a spare installation, so nothing on my main linux install is hosed)), glibc did not go over so well. After compiling it, I make install like usual. But cons reports that I am still using 2.3 and not 2.2.

Debian that comes with gcc 2.9.5 and glibc 2.2. Wow, I might actually get this going! Err, no...

Code: Select all

perl cons
Cannot find any MD5 module from:  Digest::MD5 MD5 Digest::Perl::MD5 at cons line 3730.
cons at least runs on most of the distros I've ran, but it errors out on Debian. Man, I hate cons, why couldn't splash damage provide us with makefiles instead? Isn't it (makefiles) the norm?

And I do not know the process to make makefiles, I am just about ready to compile my mod on a system with gcc 3.3 and glibc 2.3 and screw those outdated people over.

Meh, just ramblings of a tired (woke up at 8AM when gone to bed at 3AM) man who would call Bani a saint (of coding ;) ) if he uploads those makefiles he and Rain seem to have created. ;) :P

Now I am off to google for "Making makefiles" hope I am successful. If I fail that, I'll go back to bed. ;)
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

yes, cons is retarded.

but anyway the missing 'Digest::MD5' is easy enough to fix.

as root run 'perl -MCPAN -e shell' then 'install Digest::MD5' and follow the prompts.
Post Reply