home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] Building latest versions of programs

Prof J C Nash wrote:
> Hold on. I'm wanting to build tests that DON'T install anything new to
> my system. Maybe I'm so much into a different mindspace that I'll have
> to go back to MS-DOS where things actually were fairly kind to folk
> who wanted to build test programs. I used to do a lot of that for
> optimization codes. Also on mainframes.
>
> Is there a way I can get an environment set up to do the compiles
> WITHOUT messing up my distro?
>
> JN


Actually, my suggestions to date do NOT alter your distribution!

Setting up the compile environment basically makes sure all the stuff is
in the right places for external programs to compile right and function
in the existing system.  Libraries, headers and all that stuff support
external programs, and external programs being compiled need to know
where everything is.

When you use an external program, it often accesses dynamically linked
external facilities from other programs found on the system.  Dialog
boxes, network code etc. are good examples.  In Windows, these shared
facilities are called "DLLs" in Linux they are called Shared Objects,
identified by name.so.version# - the .so. part is an indication of a
shared object.  Other programs use parts of the Linux source code tree
to add statically linked functions, and definitions, data structures
etc.  Again, most programs expect standard libraries of code to be
available for their use during compiles (and be where they expect).

Usually, all these things are where programs expect them ... hence you
can download a program someone else has compiled, and you've got some
degree of assurance it will run.

When you compile your own, the program to be compiled needs to know here
things are.  Usually, many programs search for expected elements based
on file system standards, find them and compile.  Autoconfig Makefiles
usually handle a lot of this for you. Typing ./configure --help will
show you options to be set at compile time, and expected defaults usually.

Most programs are written to be distribution (and in many cases
operating system) agnostic - so the same source can be compiled and run
on OpenBSD, FreeBSD, Linux and whatever.

None of what I suggested would alter your system, unless you were
creating a kernel loadable module for a peripheral - a typical task when
installing a new network card type or such.

I hope this helps calm worries about impending foot damage from a
holstered pistol.  Setting up a compile environment doesn't mean a
recompile of the operating system kernel and all loadable modules.

--
Bill Strosberg