Building a Compiler

In an earlier thread, I mentioned that I needed something like Netcat or Socat to create a serial > IP connection. I realized after some thought that I had downloaded the netcat tarball, unpacked it and ended up with the uncompiled program. I attempted to put it together with cc and discovered that i have no compiler application on my production box. Google mentioned GCC, which I found the correct RPM's (including dependencies) for, and I was able to install most of then until I realized that I have a quandry:

[root@dev21 /home/dev/gcc] rpm -Uvh gcc-4.6.3-2.aix5.2.ppc.rpm
error: failed dependencies:gcc-cpp = 4.6.3-2 is needed by gcc-4.6.3-2

[root@dev21 /home/dev/gcc] rpm -Uvh gcc-cpp-4.6.3-2.aix5.2.ppc.rpm
error: failed dependencies: gcc = 4.6.3-2 is needed by gcc-cpp-4.6.3-2

A needs B needs A

Please explain this to me. Can i use the --nodeps flag?

I'm at a loss at this point. Any help would be appreciated.

No, you can not use the --nodeps flag it you want it to work. Each rpm has its own dependency and it is necessary for that dependency to be met.
If you want to do it manually (which is what you are doing), you must know the dependencies of each package and issue the rpm command with each one in daisy chain. That is:

rpm -Uvh one.rpm two.rpm three.rpm ...

Now, there is a tool that automatically checks for each dependency required and it will try to download it from the configured distribution repository.
This tool is yum for RHEL and clones of it, and Fedora <= 21.
Fedora >= 22 had yum replaced by DNF .
Suse uses zypper .

The basic command for yum:

yum install gcc

Assuming that you want to install gcc on aix you will have to find a pre-compiled version of gcc.
Index of /download/RPMS/gcc

because in fact i know the dependencies of the gcc-compiler-rpm on AIX i can assure you: in fact you can and this is the way to go. This is a somehwat awkward point in the (overall quite well maintained) rpms of Michael Perzl.

This would be fine if threads OP had't stated that he is on AIX 5.2, which is IBMs version of UNIX for the POWER-hardware (IIRC he did so in his other thread he mentioned). There is an rpm-port for AIX, initiated with AIX 5L and its "Linux-friendly" initiative, but still it is definitely no Linux at all and even its rpm is quite unlike current rpm-versions in Linux systems because in fact it is rpm v3.2. So, even if you'd get yum (which is Phyton-based, so there might be an outside chance) to work on AIX it would perhaps fail because it expects rpm v4.x to be available.

PS: Before you ask: there is a similar situation when installing Mediawiki where you have to install gettext-0.17-1.aix5.1.ppc.rpm and glib2-2.36.3-1.aix5.1.ppc.rpm with the --nodeps option too, because Michael Perzl has (erroneously?) put in circular requirements.

I hope this helps.

bakunin

Thanks for the responses guys. These are in fact Perzl's RPM's, and yes I know that this OS was likely what controlled navigation for Noah's Ark, but it's what I was given to work with.
I did see this error after I installed the gettext rpm with the --nodeps. RPM came back reporting a circular dependency error. I also saw a thread that said use a devel rpm and it would eliminate the dependency. Anyone know about this route?

Does your system happen to have Perl on it? A nc-like something could probably be cobbled together from it..

Surprisingly yes, we dol, but our perl SME left about 3 years ago, and we don't have anyone left that could code this.

Before things get too crazy maybe take a look at netcat.pl

I think you'd use it like cat file | ./netcat.pl server:port

I have exactly the same problem, did you manage to solve it?.

-bash-4.2# rpm -Uvh gcc-6.1.0-5.aix7.1.ppc.rpm
error: failed dependencies:
        gcc-cpp = 6.1.0-5 is needed by gcc-6.1.0-5
-bash-4.2# rpm -Uvh gcc-cpp-6.1.0-5.aix7.1.ppc.rpm
error: failed dependencies:
        gcc = 6.1.0-5 is needed by gcc-cpp-6.1.0-5

First off: welcome to the forum, but PLEASE use code-tags!

See above, i posted the solution: install one of the packages with the --nodeps -option. I know this to work because i did so and it worked for me with (in the meantime) several versions of the gcc-compiler.

I hope this helps.

bakunin

So simple!. Thanks a lot bakunin. Sorry about the code-tags thing.