LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-08-2006, 04:15 PM   #1
blazemonger
LQ Newbie
 
Registered: May 2006
Posts: 11

Rep: Reputation: 0
wanting to build gcc-2.95 in slackware 10.2


I'm wanting to build gcc-2.95 in slackware 10.2 but it won't compile.

I have some legacy code that depends on older compilers and don't know where to look.
 
Old 05-08-2006, 04:51 PM   #2
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
I did that too.

take a look at this:
http://ldp.rtin.bz/LDP/lfs/html/chapter06/gcc-2953.html

After you install it, make sure to add "/opt/gcc-2.95.3/lib" in /etc/ld.so.conf otherwise you won't be able to run what you compile.

*EDIT*
Welcome to LQ Forums

Last edited by perfect_circle; 05-08-2006 at 04:56 PM.
 
Old 05-09-2006, 03:39 AM   #3
blazemonger
LQ Newbie
 
Registered: May 2006
Posts: 11

Original Poster
Rep: Reputation: 0
gcc 2.9.5 still won't compile

I get this error message still:

gcc -c -DIN_GCC -g -O2 -I. -I.. -I. -I./.. -I./../config -I./../../include loop.c
loop.c:321:8: missing terminating " character
loop.c:322:38: missing terminating " character
make[2]: *** [loop.o] Error 1
make[2]: Leaving directory `/home/blazemonger/source/gcc-2.95.3/gcc/ch'
make[1]: *** [cc1chill] Error 2
make[1]: Leaving directory `/home/blazemonger/source/gcc-2.95.3/gcc'
make: *** [all-gcc] Error 2


what version of gcc did you use?
 
Old 05-09-2006, 04:20 AM   #4
blazemonger
LQ Newbie
 
Registered: May 2006
Posts: 11

Original Poster
Rep: Reputation: 0
*p.S. thanks for the welcome* I'll be a regular on here
 
Old 05-09-2006, 04:57 AM   #5
blazemonger
LQ Newbie
 
Registered: May 2006
Posts: 11

Original Poster
Rep: Reputation: 0
do you have a slackware package for gcc-2.95 and a few other gcc versions that will install to /opt?


if so i would be extremely thankful.
 
Old 05-09-2006, 06:20 AM   #6
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
Here's my gcc-2.95 source dir:
http://distro.ibiblio.org/pub/linux/...ls/gcc-2.95.3/

or you can get binary packages for 2.95, 3.1 and 3.2.3 here:
http://distro.ibiblio.org/pub/linux/...86/DevelTools/
They all install to /opt and won't disturb yiour existing compiler. I provide a wrapper to run it with, which sets up the PATH and LD_LIBRARY_PATH if you want it.

I was using 2.95.3 for the oldest code until recently when I discovered that gcc-3.1 would compile the same stuff without creating dependencies for the gcc-2.x cxx libs. My script for gcc-2.95 will build a separate package with the extra cxxlibs if you need them, or there's a prebuilt package.

Have a look around my site for some very useful and interesting older stuff, plus newer stuff as well.
Make it real easy to build my sources by installing amigo PkgBuild
 
Old 05-09-2006, 07:15 AM   #7
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Quote:
Originally Posted by blazemonger
I get this error message still:

gcc -c -DIN_GCC -g -O2 -I. -I.. -I. -I./.. -I./../config -I./../../include loop.c
loop.c:321:8: missing terminating " character
loop.c:322:38: missing terminating " character
make[2]: *** [loop.o] Error 1
make[2]: Leaving directory `/home/blazemonger/source/gcc-2.95.3/gcc/ch'
make[1]: *** [cc1chill] Error 2
make[1]: Leaving directory `/home/blazemonger/source/gcc-2.95.3/gcc'
make: *** [all-gcc] Error 2


what version of gcc did you use?
that's strange.
Mine compiled just fine.
Did you follow the procedure?
DOn't know if this has anything to do, but you are supposed to compile it ouside the source directory:


Code:
tar -xvjf gcc-2.95.3.tar.bz2

mkdir gcc-2-build
cd gcc-2-build
../gcc-2.95.3/configure --prefix=/opt/gcc-2.95.3
make bootstrap
make install
I also added the paches you see in the page if that make any difference at all

Last edited by perfect_circle; 05-09-2006 at 11:15 AM.
 
Old 05-09-2006, 07:40 AM   #8
rangalo
Member
 
Registered: Jan 2005
Posts: 189

Rep: Reputation: 30
Hi,

I have compiled gcc-2.95 on slack-10.2.

And got the same error.

as far as I an remember there is missin quote in the specified line
of the file ($sourcedir)/gcc/ch/loop.c (line 322).

I dont have the file now, so I cannot tell you correctly but you will know by seeing that you just need to add " there.

after this it should compile.

Hardik
 
Old 05-09-2006, 01:36 PM   #9
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
This error is common in multi-line quotes in old software:

something "more
stuff here
and then here"

You need to insert \ or \n at the end of each line to make it work:

something "more \
stuff here \
and then here"

Try my source tarball for an easier way.
 
Old 05-11-2006, 08:54 AM   #10
blazemonger
LQ Newbie
 
Registered: May 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by gnashley
Here's my gcc-2.95 source dir:
http://distro.ibiblio.org/pub/linux/...ls/gcc-2.95.3/

or you can get binary packages for 2.95, 3.1 and 3.2.3 here:
http://distro.ibiblio.org/pub/linux/...86/DevelTools/
They all install to /opt and won't disturb yiour existing compiler. I provide a wrapper to run it with, which sets up the PATH and LD_LIBRARY_PATH if you want it.

I was using 2.95.3 for the oldest code until recently when I discovered that gcc-3.1 would compile the same stuff without creating dependencies for the gcc-2.x cxx libs. My script for gcc-2.95 will build a separate package with the extra cxxlibs if you need them, or there's a prebuilt package.

Have a look around my site for some very useful and interesting older stuff, plus newer stuff as well.
Make it real easy to build my sources by installing amigo PkgBuild

i installed the gcc packages and i sometimes get this when exiting xmms:

libgcc_s.so.1 must be installed for pthread_cancel to work

btw im using slackware 10.2
 
Old 05-11-2006, 10:34 AM   #11
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
You need to install this package:
http://distro.ibiblio.org/pub/linux/...0.0-i486-1.tgz

It supplies the compiler libraries generated when compiling gcc itself.
Not all programs you compile with gcc-2.95 will need these -you can alwasy check the binaries with ldd to see if they need them.
As I mentioned, by using gcc-3.1 you can eliminate the gcc-2.x.so lib dependencies, since it links to the gcc libs already on your system.
So far, all the code that I was having to use gcc-2.95 to compile is compiling fine with gcc-3.1.
 
Old 05-11-2006, 10:43 AM   #12
blazemonger
LQ Newbie
 
Registered: May 2006
Posts: 11

Original Poster
Rep: Reputation: 0
ui noticed that if i install that package it will overwrite the libs for gcc i already have..that's the only reason i didn't install it.
 
Old 05-12-2006, 02:13 AM   #13
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
No, all my sources and packages for gcc-2.95, 3.1 and 3.2.3 are configured to not overwrite existing libs, bins or documents.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Wanting to install Slackware but.... wardialer Slackware 8 04-24-2005 07:38 PM
Which gcc-build.........is there another book? matthewa Linux From Scratch 4 04-06-2005 07:40 AM
kernel build from gcc 3.3.2 to gcc 3.4.1 alcarbone Linux - Software 1 09-13-2004 09:19 AM
How can I use gcc to build a static library? vtluu Red Hat 1 04-12-2004 11:45 AM
wanting to run a mail server from slackware.. Tutorial needed. VioLaToR Linux - Software 0 01-20-2004 08:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:58 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