Building a Compiler


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Building a Compiler
# 1  
Old 05-12-2016
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:

Code:
[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.

Last edited by Scrutinizer; 05-13-2016 at 01:45 AM.. Reason: code tags
# 2  
Old 05-13-2016
Quote:
Originally Posted by kopfgeldjagar1
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:
Code:
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:
Code:
yum install gcc


Last edited by Aia; 05-13-2016 at 01:56 AM..
# 3  
Old 05-13-2016
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

Last edited by jgt; 05-13-2016 at 10:01 AM..
# 4  
Old 05-13-2016
Quote:
Originally Posted by Aia
No, you can not use the --nodeps
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.

Quote:
Originally Posted by Aia
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.
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

Last edited by bakunin; 05-13-2016 at 11:32 AM..
# 5  
Old 05-13-2016
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?
# 6  
Old 05-13-2016
Does your system happen to have Perl on it? A nc-like something could probably be cobbled together from it..
# 7  
Old 05-13-2016
Surprisingly yes, we dol, but our perl SME left about 3 years ago, and we don't have anyone left that could code this.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cc compiler and gcc compiler

hi, can we install gcc compiler in unix based OS(sun solar,IBM AIX,HP,etc) and also can we install sun cc compiler in AIX environment and vice versa. and more ..is linux support cc compiler regards Ajay (3 Replies)
Discussion started by: ajaysahoo
3 Replies

2. Linux

Building a ppc476 enabled GCC cross compiler and tool chain

Building a ppc476 enabled GCC cross compiler and tool chain Hello, I am trying to build a cross GCC compiler for PPC476. I applied all the relevant patches. Cross compiler build was successful. When i try to compile the source code using the cross compiler i am getting the below error... (1 Reply)
Discussion started by: raghuhb
1 Replies

3. UNIX for Advanced & Expert Users

Building a ppc476 enabled GCC cross compiler and tool chain

Building a ppc476 enabled GCC cross compiler and tool chain Hello, I am trying to build a cross GCC compiler for PPC476. I applied all the relevant patches. Cross compiler build was successful. When i try to compile the source code using the cross compiler i am getting the below error... (1 Reply)
Discussion started by: raghuhb
1 Replies

4. Red Hat

Building a ppc476 enabled GCC cross compiler and toolchain

Building a ppc476 enabled GCC cross compiler and tool chain Hello, I am trying to build a cross GCC compiler for PPC476. I applied all the relevant patches. Cross compiler build was successful. When i try to compile the source code using the cross compiler i am getting the below error... (0 Replies)
Discussion started by: raghuhb
0 Replies

5. UNIX and Linux Applications

Help with building firewall

Hi, I've installed firewall builder into my operating system (PCLinuxOS) from the repository. Now I need to configure and make run firewall builder in the main server (production server) of my company. The technique that I want to use is pushing the script from my laptop (where I've got the... (3 Replies)
Discussion started by: anaigini45
3 Replies

6. Programming

How Can a Machine Reads a Compiler Since A Compiler is Written in Text! Not Binaries?

To make a programming language you need a compiler, so what was the first programming language and how was is created if you need the compiler first? The compiler itself is considered as a high language comparing to the machine! since the compiler is not created in 1's and 0's... Eventhough i... (12 Replies)
Discussion started by: f.ben.isaac
12 Replies

7. UNIX for Dummies Questions & Answers

xl C/C++ compiler to GCC compiler

Hi, we are converting from IBM-AIX(xl c/c++ compiler) to Linux(GCC complier). As a part of this i need to change the CFLAGS. The xl c/c++ complier CFLAGS is CFLAGS := $(CDEBUG) $(PROJECT_INCLUDE_DIRS) $(COBJECT_MODE) -qcpluscmt -qmakedep -qcheck=all \ -qalign=bit_packed $(LINT_FLAGS)... (0 Replies)
Discussion started by: pbattu1
0 Replies

8. UNIX for Dummies Questions & Answers

Building a new PC

Hi, im building a new PC for my FreeBSD - sorry it's not really UNIX related but I dont really visit any other online forums, and lost ideas of people to ask, Basically would it work if bought this motherboard -... (0 Replies)
Discussion started by: ErNci
0 Replies

9. IP Networking

building a server

hi, i am a pretty good linux user..but i have no idea on building a server witha domain and everthing. please help! (5 Replies)
Discussion started by: hamza11050
5 Replies
Login or Register to Ask a Question