3

I'm trying to install numpy using this. This link opens with these instructions:

These instructions describe how to build NumPy and SciPy libraries from source.

If you just want to use NumPy or SciPy, install pre-built binaries as described in Installing the SciPy Stack.

If I'm not wrong, to "build" generally means to compile files into machine readable ones and then group them into an executable. From the expression "build from source", I infer that, firstly, there are multiple ways to build a file and, secondly, this particular way builds the file from its source code.

If this is true, is a pre-built binary a set of files that have already been compiled?

8

If I'm not wrong, to "build" generally means to compile files into machine readable ones and then group them into an executable.

Basically yes, though the term is a lot more general than that. For instance, the machine readable files might be libraries rather than executables. Or the output might be a set of scripts designed to run on a VM of some kind rather than a blob of native machine code. The key thing is that it's an automated process which transforms "source" files edited by humans into some other files which are actually useful.

From the expression "build from source", I infer that, firstly, there are multiple ways to build a file and, secondly, this particular way builds the file from its source code.

Usually when this phrase is used, it's referring to building something from source as opposed to using a pre-built version of it. There is no "other way" to build stuff that does not involve source, unless the build process has been split into multiple stages and for some reason you're only involved in one of those stages.

If this is true, is a pre-built binary a set of files that have already been compiled?

In the context of a traditional, ahead-of-time compiled language such as C or C++, that is correct.

3

In general, the 'from source' part of 'build from source is redundant, though it is a commonly included redundancy.

However, it is entirely plausible (though very rare, if it happens at all) to build from a non-source format. For example, one could compile to C source code to LLVM IR and distribute that. Users would then compile the LLVM IR to their target architecture. This could provide an architecture-independent format to distribute, while also obfuscating the actual code.

is a pre-built binary a set of files that have already been compiled?

Yes, generally this means compiled into an executable format or linkable library (as opposed to an intermediate format like above).

1

As you have already found, building from sources generally implies going from the source form (i.e. non executable, not usable) to the final form of something (an executable program, but even a shared library has a binary form).

But there's usually not more than one way to build something: you may skip steps, e.g. when something depends on something else, you may get those dependencies already compiled from elsewhere - or like this case you may get the precompiled binaries.

Yes, a pre-built binary is the final product which components have already been compiled - this holds true for an executable as a shared library.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.