LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-25-2013, 12:00 AM   #1
mpvmud
LQ Newbie
 
Registered: Jun 2013
Location: Iowa
Distribution: CentOS 6.4
Posts: 7

Rep: Reputation: Disabled
Need to find a 5 year old or older version of gcc compiler that will run on windows.


Like my title says. I am trying to compile a code that is about 5 years out of date for current compilers. Last time I compiled it was in about 2009. Since then gcc has been updated to the point that a once compilable code no longer compiles now.

Any help in trying to find a compiler I can use for this would be great help. I have spent a good 3 days on bing and google trying to find anything and has ended in failure.

Thanks in advance for your help!

Cheers.
 
Old 06-25-2013, 03:17 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,880
Blog Entries: 1

Rep: Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871
Off: is the problem with the code so serious? Would you mind quoting the error message?
 
Old 06-25-2013, 10:12 AM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
The 'releases' directory of the GNU gcc site mirrors has all old versions dating back to the nineties, and version 1.1.2 It would always be the preferred location for downloading GCC. Of course you'll need some working compiler to build the version you choose.

When compilers get smarter, they usually help us find problems with the code we compile with them. Wouldn't it be a good idea to use that to fix the problems identified by the newer compilers?

--- rod.

Last edited by theNbomr; 06-25-2013 at 10:13 AM.
 
Old 06-25-2013, 11:08 AM   #4
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I'd look in the old releases at mingw:
http://sourceforge.net/projects/ming...inGW/Base/gcc/

Version 3 should be the right one for you.
 
Old 06-25-2013, 05:10 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Mingw dose have the Ancient gcc 3.2 in the archives

Why not just hack the code to bring it up to the 20'th century specs

as i recall the current stable in Mingw is gcc 4.1 with gcc 4.6 in the testing section

Last edited by John VV; 06-25-2013 at 05:12 PM.
 
Old 06-25-2013, 06:04 PM   #6
mpvmud
LQ Newbie
 
Registered: Jun 2013
Location: Iowa
Distribution: CentOS 6.4
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NevemTeve View Post
Off: is the problem with the code so serious? Would you mind quoting the error message?
pal.c:116: error: expected â)â before â*â token
make: *** [pal.o] Error 1

not sure why it is making the strange ascii letters but I have checked the code and it should be fine. The line is:

Quote:
shield_rush (CHAR_DATA * ch, char *argy)
{
CHAR_DATA *victim;
SINGLE_OBJECT *obj;
SPELL_DATA *spl;
int chan;
bool notft = FALSE;
int tmpi;
char buf[STD_LENGTH];
int dam;
int damm;
DEFINE_COMMAND("rush", shield_rush, POSITION_FIGHTING, 0, LOG_ALWAYS, "Shield Rush")
check_fgt (ch);
chan = 0;
So I do not know why this line of code out of all the code is acting up. Also in my header file (if I remove pal.c and run make) I get warnings and errors on code that has worked fine for almost 20 years.

Quote:
gcc -c -g -mtune=i486 -Wno-unused -DLinux -DNEED_EXTERN -DOLD_FIGHT autoeq.c
In file included from autoeq.c:9:
emlen.h:3192: warning: built-in function âpowâ declared as non-function
emlen.h:4398: error: array type has incomplete element type
In file included from autoeq.c:9:
emlen.h:4677: warning: conflicting types for built-in function âexeclpâ
emlen.h:4678: warning: conflicting types for built-in function âexeclâ
make: *** [autoeq.o] Error 1
So I am by far confused by why the code is just not working and I am by far not an expert in code but this code has not been touched since at least 1994. I have worked on things I have added but it has nothing to do with any of the errors or warnings coming up.
 
Old 06-25-2013, 07:34 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,691
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
Quote:
Originally Posted by theNbomr View Post
When compilers get smarter, they usually help us find problems with the code we compile with them. Wouldn't it be a good idea to use that to fix the problems identified by the newer compilers?
That's definitely the way that I would suggest "dealing with" this issue. Perhaps there are compiler options or directives (which maybe didn't exist at that time) which would resolve any issues. Or, definitely, it might be the case that there is a latent problem with this software which would warrant more careful examination.

I would strongly suggest that you use the git version-control system at this point: set up the directory as a "git repository" and "check in" the software exactly as it is right now. Then, make a "branch" and now start making changes that are necessary to bring the code up to snuff. If you're using "git" in this way, you can always at any time (a) revert the code back to any previous state, and (b) identify the precise line-by-line changes that you have actually made. ("git" runs equally well on both systems and does not require a server.)

Although it does demand more work and investigation of a piece of software that you might not be too keen to get deeply involved in, I do think that you will be more satisfied with the final results.
 
Old 06-25-2013, 08:09 PM   #8
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Quote:
Originally Posted by sundialsvcs View Post
Although it does demand more work and investigation of a piece of software that you might not be too keen to get deeply involved in, I do think that you will be more satisfied with the final results.
I have to second that, as the errors you are seeing could be just a newer compiler flagging something incorrect that the older version missed, or it could be that something went awry in storage, either way bringing the code up to modern standard is probably the best option.
 
Old 06-25-2013, 08:32 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
pal.c:116
in the section ending on line 116 is a issue

however there is a second error in a header
Quote:
In file included from autoeq.c:9:
emlen.h:3192: warning: built-in function âpowâ declared as non-function
emlen.h:4398: error: array type has incomplete element type
In file included from autoeq.c:9:
emlen.h:4677: warning: conflicting types for built-in function âexeclpâ
emlen.h:4678: warning: conflicting types for built-in function âexeclâ
make: *** [autoeq.o] Error 1
" -- emlen.h:4398: error: array type has incomplete element type -- "
that array error would also cause the unexpected token on line 116


a question on this
" -mtune=i486"
are you using a computer from 1990 - 1994 ? and is it really an almost antique 486

if so then for 15+ year old code for a 15 to 20 year old box
gcc 2 might be needed

Last edited by John VV; 06-25-2013 at 08:34 PM.
 
Old 06-26-2013, 03:54 AM   #10
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,880
Blog Entries: 1

Rep: Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871
Well if it is non-secret, you might upload it somewhere...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ubuntu] Older gcc Version Siebenkeim Linux - Server 10 08-16-2012 01:53 PM
How to install an older version of gcc compiler teki Linux - Newbie 7 07-10-2010 09:50 AM
need an older gcc version parent's_basement Debian 4 12-18-2008 07:04 AM
using an older version of gcc win32sux Slackware 1 05-12-2004 01:53 AM
Install older version of gcc s9902245 Linux - Newbie 1 09-16-2003 03:08 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration