3 ms·
I tried to get into linux development within the last year or so. One of the most frustrating obstacles I ran into was that attempting to install packages woul
by recursive 11y ago
I tried to get into linux development within the last year or so. One of the most frustrating obstacles I ran into was that attempting to install packages would mysteriously fail. I found it that was because I was missing a package called "build-essential". I thought one of the package manager's reason for existence was that it could track dependencies, and it didn't appear to be doing that. I still don't understand how that can happen. It seems to me that a package installation ought to be tested against a fresh image to verify the dependency tracking is working correctly.
- khedoros 11y agoPackaging dependencies and build dependencies are tracked separately. For example, if I don't have a C compiler installed, installing a development package like "libxml2-devel" will probably cause the compiler to be installed. In the opposite case, say that I have the compiler installed, but not the dev package for the library. Compiling an object will fail, if it #includes a required header, but that will be in the form of a "file not found" error emitted by the compiler. Similarly, if I tried to link a program and include the "-lxml2" flag, the linker will reply "cannot find -lxml2", meaning that libxml2 isn't installed, so it can't be linked against. Generally, we'd say that it's not the compiler or linker's job to talk to the package manager. The build configuration system included with the project (autoconf scripts, cmake or ant profiles, etc) ought to check for prerequisites.
- db48x 11y agobuild-essentials is an Ubuntu package which depends on a number of important libraries, gcc, the associated toolchain, etc. Just installing a pre-compiled package won't require a compiler though, it's only when you want to build something from source that you need it. There are a number of python packages that don't come pre-compiled; that may be what you were seeing.