1

Some dependencies of packages are only required for compilation, while others are required for actual usage. As an example, I happen to know net-misc/unison does require dev-lang/ocaml only for compilation, while its sys-libs/glibc dependency is (also) for usage. But how can one actually figure out the difference?

3
  • I do not think you can figure it out easily. Of course unmerging the dependencies one by one and trying if your program still works would do the trick, but nobody would want to do this. I do not think that there is an automated approach, since the dependencies are not automatically generated but defined in the ebuilds and there is no distinction between what the dependencies are needed for.
    – Tim
    Commented Nov 25, 2013 at 13:38
  • @Tim Hm, this sounds like a slight flaw in the system - when packaging binaries, they clearly shouldn't have to require the build-dependencies... Commented Nov 25, 2013 at 14:28
  • It perfectly makes sense for a source based distribution. You would not want to remove these dependencies after installation, because you may need them again for updates later. I guess binary packages are more like a workaround for allowing to manage large groups of identical computers without having to compile on every system.
    – Tim
    Commented Nov 25, 2013 at 14:43

1 Answer 1

2

Gentoo is a bit special... ;-)

It will depend on the source. If you need some special tool - awk, sed, flex, ... - to process/generate some part of the source-code for the program, then you'll need these tools to compile/build it... However, once the program is built - ie. you have some executable file - these tools are not needed to use the program.

The same goes for programs where parts are written in unusual languages. If parts of the program is written in Ocaml, Ada or Pascal; you'll need suitable compilers for these languages installed. Once they're compiled into object-files and linked into a finished executable, only the shared libraries are needed - unless it was built with static-libraries, in which case not even libraries will be needed.

Even some part of the documentation may sometimes need extra tools and programs installed - like something written in LaTeX and thus needing LaTeX to be created. After all, even simple man-pages needs TROFF to interpert the markup-language used.

For other distros than Gentoo - distros where you don't build everything yourself - you don't have to worry about tools needed during building, since packages are pre-buildt.

1
  • 1
    Well, exactly, and therefore my question is how to figure out which dependencies are build-only dependencies... Commented Nov 25, 2013 at 12:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .