System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

What is compile and recompile?

SOLVED
Go to solution
senthil_kumar_1
Super Advisor

What is compile and recompile?

Hi All,

Does compile mean installing the software?

what recompile mean?
21 REPLIES
Viveki
Trusted Contributor

Re: What is compile and recompile?

Hi Senthil,

Compile is a term used in programming language, which translates the program (say JAVA or C) to machine language (binaries) so that a system can understand that. Now a days, it also refers to translating source code written in a computer language into another computer language (the target language).

Recomile simply means, compiling the source code again (after correcting some bugs etc.)

senthil_kumar_1
Super Advisor

Re: What is compile and recompile?

Does recompile mean compiling the software from already installed server (that is where the software is already installed)?


what is the software is used to recompile.


Sunny123_1
Esteemed Contributor

Re: What is compile and recompile?

Hi

compile does not means any installation.
It just term of programming language.


Regards
Sunny
James R. Ferguson
Acclaimed Contributor

Re: What is compile and recompile?

Senthil:

No, "compiling" does not necessarily mean "installing". While compilation creates executable code from source code this may only be one step that is necessary to correctly configure a working environment.

"Re-compiling" as the prefix "re-' means equates to REpeating a compilation phase because the source code has changed.

Regards!

...JRF...
Viveki
Trusted Contributor

Re: What is compile and recompile?

Compiler is used to perform both compiling and recompiling.

As already mentioned, recompile is only doing the compiling again and thus it is just another compiling.

senthil_kumar_1
Super Advisor

Re: What is compile and recompile?

Still i am not clear.

I want to explain my situation.

We are running some older applications like Synergy and Unigraphics in HP-UX 10.20.

Now are in discussion about moving those applicaitons to HP-UX 11.31, that time my team lead told us for that we need to recompile the application.

so what does here recompile mean?




James R. Ferguson
Acclaimed Contributor

Re: What is compile and recompile?

Hi (again):

> Now are in discussion about moving those applicaitons to HP-UX 11.31, that time my team lead told us for that we need to recompile the application. so what does here recompile mean?

In this context, "recompile" simply means that you want to take the source code (C, C++, Fortran, Cobol) and _compile_ it with a current compiler to generate object code (executables) that is tailored for the hardware on which you will be running. This also allows the generated code to be optimized.

Specifically in the case of HP-UX, instead of having to run PA-RISC code under ARIES emulation (and therefore sacrificing some performance) re-compilation of the source code into instructions native to the Itanium architecture will be beneficial.

Regards!

...JRF...
Steven Schweda
Honored Contributor

Re: What is compile and recompile?

> I want to explain my situation.

Already? I was expecting the guessing game
to continue for at least a whole day.

> [...]
> my team lead told us for that we need to
> recompile the application.
>
> so what does here recompile mean?

At the risk of appearing stupid, perhaps you
should ask _him_ what he meant.

> [...] Synergy and Unigraphics [...]

I assume that these are commercial programs,
and that you don't have the source code for
them, so perhaps he was trying to say that
the old programs will be useless on the new
computer, because you can't recompile them.

> [...] sacrificing some performance [...]

Even if you can use them with an emulator,
they may or may not be faster than they were
on the old computer.
OldSchool
Honored Contributor

Re: What is compile and recompile?

"We are running some older applications like Synergy and Unigraphics in HP-UX 10.20.

Now are in discussion about moving those applicaitons to HP-UX 11.31, that time my team lead told us for that we need to recompile the application."

I'd suggest that you ask your "team lead" ... especially if you think *you're* going to recompile UniGraphics. Its commercial software and its doubtful that you have the source. Depending on what you mean by "Synergy" the same may apply.

You might want to recompile applications that use API's defined by the above. That *might* possibly depend on if you purchased / obtained versions of the above for 11.31 or tried to run them under ARIES as well
Torsten.
Acclaimed Contributor
Solution

Re: What is compile and recompile?

Maybe we really need to start at the beginning ...


If you want to write a program, you open a text editor and write



* HelloWorld.c */

#include

main()
{
printf("Hello World \n");

/* "\n" - new line */
}



You can probably read and understand this (hopefully), but your computer cannot.

You need to "translate" this into "computer binary language" by *compiling".

For example

# gcc -o HelloWorld HelloWorld.c

Now you can start your program

#./HelloWorld

and it will should you a very kind message.


So understand "compile" as translate into a language *your* computer understands.




If you have done this on your hp-ux machine, the result cannot run on let's say a linux.



If you want to run this on linux, you need to transfer your text file (the source code) to the linux machine and compile again (re-compile) for this system, because it understands its own language only.




I try to keep this simple as possible, I hope you understand.





But I have some doubts if somebody who is not familiar with terms like "compile" will be able to migrate something from 10.20 to 11.31 ... sorry, might be impossible.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
dirk dierickx
Honored Contributor

Re: What is compile and recompile?

more then you probably want to know and understand on compilers can be found on wikipedia:

http://en.wikipedia.org/wiki/Compiler
senthil_kumar_1
Super Advisor

Re: What is compile and recompile?

Hi Torsten,

I knew that, but what i want to know is

1) Normally one software is comming with lot of files, so do we need to compile each file?


2) For some softwares they are giving one install.sh file to install, here install.sh is taking care of compile, am i correct?


3)In our environment, unigraphics and synergy is coming with only only file or multiple files, if multilple files do we need to compile each file or is there any script like install.sh that will do compiling.


Torsten.
Acclaimed Contributor

Re: What is compile and recompile?

As said earlier by others, I doubt if you have sources at all.


A script can do what an admin writes into that script - no idea what is in yours.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Dennis Handly
Acclaimed Contributor

Re: What is compile and recompile?

>1) Normally one software is coming with lot of files, so do we need to compile each file?

Most likely. You could have an application composed of multiple executables and shlibs.
Some executables aren't performance critical, so maybe you don't have to recompile it.

>2) For some softwares they are giving one install.sh file to install, here install.sh is taking care of compile, am i correct?

It depends. HP-UX ships it's software already compiled. In most cases it is already linked. So, swinstall, just copies the bits.

Oracle's could do links.

3) In our environment, unigraphics and synergy is coming with only file or multiple files, if multiple files do we need to compile each file or is there any script like install.sh that will do compiling.

Again it depends. If they distribute source, there should be a "make" system for compiling and linking.
Duncan Edmonstone
Honored Contributor

Re: What is compile and recompile?

senthil,

time to go back to IT school methinks... I don't want to be rude, but these are really some very basic principles of computing and IT - if you don't understand this sort of thing, you really need to go take a basic computing course of some kind...

compiling is what _developers_ do - you know, Microsoft Developers compile apps like word and excel, Oracle developers compile apps like oracle database server... etc

if your company has a customised (bespoke) application, then you might have some developers in your own company that compile applications as well.

these developers compile applications from source code (like the examples Torsten posted) and create _binaries_ - which are usually made up of _executables_ and _libraries_ (libraries being extra bits of exceutable code which might be used by many different executables). the binaries are what are usually distributed to customers... not the source code

as a rule sysadmins don't compile applications - although sometimes we might get the source code for some open source software and compile something ourselves - but for most sysadmins this is the exception not the rule.

so for your applications, I seriously doubt that you have the source code as they sound like commercial applications - the "install.sh" script that you see do excatly that - just install the application (you know like clicking setup.exe in windows??)

One thing I can tell you - if you don't understand these concepts, don't worry too much as I can be 99.9% sure you _won't_ be doing any compiling.

HTH

Duncan

HTH

Duncan
senthil_kumar_1
Super Advisor

Re: What is compile and recompile?

Hi Dennis Handly,

you are telling that "make" is doing compile of the source code, am i correct?

So "make" is installing (compiling - making binary) the software in HPUX, then we can use the software.
Torsten.
Acclaimed Contributor

Re: What is compile and recompile?

"make" is not necessarily doing compile or install - make does what the Makefile says.





If you have the source of your apps, you certainly have a README too.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
senthil_kumar_1
Super Advisor

Re: What is compile and recompile?

Hi Duncan Edmonstone,

I have understand some thing about install.sh that for example in lab of HPUX they are compiling the source code to binary, if one software have lot of binaries then they are selling software with lot of binaries and libraries with install.sh, now when we execute install.sh it will copy all the binaries and libraries in corresponding location.
Dennis Handly
Acclaimed Contributor

Re: What is compile and recompile?

>you are telling that "make" is doing compile of the source code, am I correct?

make would just be invoking the compiler, archiver, lex/yacc and linker to build the application.

>now when we execute install.sh it will copy all the binaries and libraries in corresponding location.

It can also do customization.
OldSchool
Honored Contributor

Re: What is compile and recompile?

>> "1) Normally one software is comming with lot of files, so do we need to compile each file?"

If you're buying 3rd party software (Like UniGraphics) then *you* don't usually need to compile ANYTHING. They supply you with the correct binaries (compiled code) for the OS you specify at purchase time. They (most likely) *don't* supply the source. If they did, it'd take a mountain of money, lawyers and "Non-Discloser" agreements

>> "2) For some softwares they are giving one install.sh file to install, here install.sh is taking care of compile, am i correct?"

Probably not (see above). What its probably doing is copying the binaries to the appropriate locations. It *COULD* be doing anything. Since it appears to be a shell script, then you could simply read it to see what it does.

>> "3)In our environment, unigraphics and synergy is coming with only only file or multiple files, if multilple files do we need to compile each file or is there any script like install.sh that will do compiling."

Again, you probably *won't* be doing any compilation of purchased / or third party software.. What they supply, as well as the installation instructions, is up to them. It could be something like "install.sh", it could be a "makefile", it could come as a software depot and on and on and on and on.....

>> "you are telling that "make" is doing compile of the source code, am I correct?"

depends on what's in the "makefile".


At this point, I can't tell if you've worked yourself up into a panic, or you simply are in over your head. I suspect that it may be the later....

In any case, given the statement:
"Now are in discussion about moving those applicaitons to HP-UX 11.31, that time my team lead told us for that we need to recompile the application."

one continues to wonder why you didn't speak with your "team lead" about this (and related issues). I have a suspicions about the reasoning. I'm sorry if that seems rude, its not intended to be.



Suraj K Sankari
Honored Contributor

Re: What is compile and recompile?

Yes you are right.

Suraj