Gcc .bz2

Hello,

I need to install GCC but the only archive (GCC-4.9.2) for it I can find is a .bz2 format file. Looking at How to unpack and install .tar.bz2 library ? provided some help, but when I use tar in that way I get the following, presumably because it's an older version or different flavour of tar.

 ]/release_backups>tar -jxvf gcc-4.9.2.tar.bz2
tar: j: unknown option
tar: usage  tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile] [blocksize] [[-C directory] file] ...

One way forward would be if I could find a .tar.Z version of GCC, or find out how to unpack the .b2z file I have.

Can some one help direct me?

Thanks

.bz2 files can be unpacked with bzip2. This is on a lot of different UNIXes. You can compile it yourself from:

bzip2 : Downloads

1 Like

Thanks Jim

---------- Post updated at 07:33 AM ---------- Previous update was at 07:22 AM ----------

I have downloaded and followed the README instructions and get an error because I don't have GCC, and yet im trying to install GCC so I can install the dependancies for rsync and rsync.

 /release_backups/bzip2-1.0.6>make
 If compilation produces errors, or a large number of warnings,
please read README.COMPILATION.PROBLEMS -- you might be able to
adjust the flags in this Makefile to improve matters.
 Also in README.COMPILATION.PROBLEMS are some hints that may help
if your build produces an executable which is unable to correctly
handle so-called 'large files' -- files of size 2GB or more.
         gcc -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c blocksort.c
sh: gcc:  not found.
*** Error exit code 127
 Stop.

I visited the URL you've posted (linuxfromscratch.org) and I saw that direct download link http://ftp.gnu.org/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2

If you leave out the archive name and go to GNU Project Archives you will find a tar.gz archive too.

Hope this helps.

---------- Post updated at 03:01 PM ---------- Previous update was at 02:56 PM ----------

D'oh! I see your tar command has no z option :o. Check if you have gzip . If so, you could

gzip -d archive.tar.gz

and then

tar xvf archive.tar
1 Like

Thanks Jim, fortunantly we have gunzip installed and that seems to have done the job with the other tar.gz files I think. I will try that now.

At the porting and Archive center you have a GCC package...
I suggest you get that one working first:
Go to:
HP-UX Porting and Archiving Centre | zlib-1.2.8
And download ( 11.11 PA-RISC2.0 binary grzip depot...) and install
then
HP-UX Porting and Archiving Centre | gettext-0.19.3
(same...)
then
HP-UX Porting and Archiving Centre | gcc-4.2.3
Like that you have at least a functional gcc to start with...
Then if you wish to compile bzip2 and install the latest gcc you can go ahead...

1 Like

Thanks vbe,

I think you will follow your suggestion and avoid bz2 if I can.

The idea is more get GCC working even if not the latest, because believe me it is not that obvious to compile from scratch with all the dependencies...
Even with HP depot you will have to solve the dependencies in some cases, like gcc.. that is why I gave you what you need to install first and in that order.. once you have a GCC compiler working ist up to you after if you wish to install from sources but if you never have done such, it it wise to start and have something that works, lest say you managed to install gcc by other means, when you will be trying to compile a new product and see something go wrong when you have typed "configure", wherewill you start searching? could it be you are missing C libraries? some dependencies form other sources? (It happens to me now I have no more HP (shame...) and see copies (yes...) of binaries on AIX where depending what I do, fail, and I have to trace EVERYTHING to see what is missing and spend weeks to get all working, because yes it can work and suddenly you compile using THE library from a dependency you did not need at the beginning and you are done...
So get your environment working first with ALL the needed tools to achieve your goals, then with peace of mind, you know when installing, failures are of other nature than missing a bit of soft ( well could be $PATH etc but you know you have it somewhere...) in most cases after its a question of ENV... ( and very rarely but could happen: kernel parameters...)

1 Like

vbe, looks like I got a typo on my reply. I meant to say, I will be following your advice. And yes your logic is sound in what you say. Apologies for mistyping. Basically I agree with everything you have said, and "I WILL BE" following your advice :slight_smile: