LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-27-2015, 03:23 AM   #1
Dustin Cook
LQ Newbie
 
Registered: Feb 2015
Posts: 28

Rep: Reputation: Disabled
Manually Downgrading Bash & GCC


Hi all,

I have a strange request. I have a system running Fedora 21. This system is now not connected to the internet (for security reasons).

I have used the "yum downgrade bash" command to revert back to version 4.3.30, but I am still receiving compilation errors in some code (which I have rescued from a Fedora Core 4 installation [don't ask!!]).

Is it possible to download the source for Bash version 3, compile and install it to test it on my Fedora 21 installation?

If so, could someone help me please, as this is something I have never tried before?

Thanks in advance for any help.

Last edited by Dustin Cook; 05-27-2015 at 05:11 AM. Reason: Added GCC.
 
Old 05-27-2015, 04:53 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You can get bash version sources from here. And compile the sources:

Code:
untar the bash source
cd to bash dir
./configure --prefix=/opt/bash-3
make
make install
And bash gets installed to /opt/bash-3 (You may choose some other location). And whenever you want to use this bash, use with absolute path or put this directory in start of PATH env variable.
 
Old 05-27-2015, 05:08 AM   #3
Dustin Cook
LQ Newbie
 
Registered: Feb 2015
Posts: 28

Original Poster
Rep: Reputation: Disabled
Thanks veerain,

That has worked - thank you. I've downgraded and installed on my system, but still my compilation fails.

I am looking at now downgrading "gcc" but this is not as simple as bash - are there any instructions for how I can compile and make the new gcc install for my system (to match Fedora 4).

Thanks again in advance.
 
Old 05-27-2015, 05:11 AM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Can you show what errors you got while building bash version 3.
 
Old 05-27-2015, 05:19 AM   #5
Dustin Cook
LQ Newbie
 
Registered: Feb 2015
Posts: 28

Original Poster
Rep: Reputation: Disabled
Sorry, there are no errors building bash v3.

It works, but my code that I attempt to compile, still fails.

I believe my code is failing due to gcc now!
 
Old 05-27-2015, 05:24 AM   #6
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You can get gcc from here. Older gcc have a whole as well as split tarball. Core only has "C" support. And add on tarballs for "C++", fortran, etc...

After unpacking gcc tarball you can read docs in docs directory.

And compilation is same as with bash. Just change install location by modifying prefix switch.

And gcc may require old binutils as well but I am not sure.
 
Old 05-27-2015, 09:26 AM   #7
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,244

Rep: Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684
I am a little confused at how bash was affecting the compilation of something? Maybe if you presented the errors you are receiving it may be simpler to fix what I presume is a script?
 
Old 05-28-2015, 02:19 AM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,817

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
you know you can just install the fedora gcc34 compat
compat-gcc-34-3.4.6-34.fc21.x86_64.rpm
Code:
su -
yum install compat-gcc-34
KEEP in mind
gcc made a LOT of changes in gcc 4
then EVEN more DRASTIC changes in 4.1

or

just build the old gcc34

but trying to get the fedora 4 rpms to run on fedora 21
gcc-4.0.0-8.x86_64.rpm
glib and the kernel are VERY different

fedora 4 had the 2.6 kernel
21 is using the 3 kernel

you could try rebuilding the SRC rpm
http://archives.fedoraproject.org/pu....0.0-8.src.rpm

Last edited by John VV; 05-28-2015 at 02:27 AM.
 
  


Reply

Tags
bash, downgrade, gcc


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
Bash Script to manually import CSV into sqlite3 -> Spaces mess up everything burnhot Linux - Software 1 02-18-2015 02:17 PM
Crontab works differently as manually execute the bash script. How can I fix it? kyu0317 Linux - Newbie 2 12-11-2014 03:20 PM
How to end the bash script using commands in bash not manually by pressing ctrl+c Sanpreet Singh Linux - Newbie 1 07-03-2013 02:04 PM
Bash Script only works when manually running. rivacom Linux - General 6 10-13-2010 09:18 AM
How to manually add SATA driver manually when kernel boot? aixilin Linux - Kernel 6 08-15-2008 11:36 AM


All times are GMT -5. The time now is 01:52 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration