depends_lib, depends_build, depends_run, oh my
Have various dependency questions here. I couldn't find info on this in the new guide. Why do we have depends_lib, depends_build and depends_run? Why not just a single "depends"? Why does it matter which phase requires the other software? Isn't it enough to know that the other software is required at some point, and so MacPorts should install that other software first? What are these three keywords supposed to denote? I thought "depends_lib" was for libraries a program links with (e.g. gettext), "depends_build" was for things only the build system needs (e.g. pkgconfig) and "depends_run" was for binaries that need to be present at runtime (e.g. I have no idea). To this end, I tried adding "depends_build pkgconfig" to a port that needs it (graphviz), and then I forcibly deactivated the installed pkgconfig to make sure that worked. Well, it didn't. "sudo port install graphviz" proceeded to build just graphviz, without attempting to activate the required pkgconfig first. If, on the other hand, I completely uninstalled pkgconfig first, it then correctly installed pkgconfig when I tried to install graphviz. Why does a deactivated port seem to satisfy the dependency? That should not be. Hm... could it be that the point is that it should be fine to uninstall a build dependency later, but uninstalling a library or runtime dependency would cause installed ports to fail? Is that the reasoning? MacPorts trunk (past 1.5.0), Xcode 2.4.1, Intel Core 2 Duo
A dependency is considered satisfied if the dependency is installed, not if it is activated. I think this should be considered a bug. You encountered a problem unrelated to the separation of dependencies into runtime (_run), linked against (_lib), and build time (_build) dependencies. On 5 Aug 2007, at 04:41, Ryan Schmidt wrote:
Have various dependency questions here. I couldn't find info on this in the new guide.
Why do we have depends_lib, depends_build and depends_run? Why not just a single "depends"? Why does it matter which phase requires the other software? Isn't it enough to know that the other software is required at some point, and so MacPorts should install that other software first?
What are these three keywords supposed to denote? I thought "depends_lib" was for libraries a program links with (e.g. gettext), "depends_build" was for things only the build system needs (e.g. pkgconfig) and "depends_run" was for binaries that need to be present at runtime (e.g. I have no idea).
To this end, I tried adding "depends_build pkgconfig" to a port that needs it (graphviz), and then I forcibly deactivated the installed pkgconfig to make sure that worked. Well, it didn't. "sudo port install graphviz" proceeded to build just graphviz, without attempting to activate the required pkgconfig first. If, on the other hand, I completely uninstalled pkgconfig first, it then correctly installed pkgconfig when I tried to install graphviz. Why does a deactivated port seem to satisfy the dependency? That should not be.
Hm... could it be that the point is that it should be fine to uninstall a build dependency later, but uninstalling a library or runtime dependency would cause installed ports to fail? Is that the reasoning?
MacPorts trunk (past 1.5.0), Xcode 2.4.1, Intel Core 2 Duo
_______________________________________________ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-dev
Randall Wood rhwood@mac.com http://shyramblings.blogspot.com "The rules are simple: The ball is round. The game lasts 90 minutes. All the rest is just philosophy."
Oops. Resending to the list with the correct address minus the cc's.
Have various dependency questions here. I couldn't find info on this in the new guide.
Why do we have depends_lib, depends_build and depends_run? Why not just a single "depends"? Why does it matter which phase requires the other software? Isn't it enough to know that the other software is required at some point, and so MacPorts should install that other software first?
What are these three keywords supposed to denote? I thought "depends_lib" was for libraries a program links with (e.g. gettext), "depends_build" was for things only the build system needs (e.g. pkgconfig) and "depends_run" was for binaries that need to be present at runtime (e.g. I have no idea).
I have the same questions. I would really like to get accurate information on this into the new guide. The only section of the old guide relating to it that I can find is not helpful: http://geeklair.net/macports_guide/ch03.html#additional%20options The portfile.7 has more (pasted below), but is there any real functional difference between these? It seems llike they are functionally the same in practice and ports listed as dependencies all get installed before any phases of a port are begun. Were the three distinguished for some future use not yet implemented? Can someone explain this so it can be documented? Mark depends_build List of dependencies to check before build, destroot, install, and package targets. Type: optional Example: depends_build port:autoconf depends_run List of dependencies to check before destroot, install and package targets. Type: optional Example: depends_run port:bash depends_lib List of dependencies to check before configure, build, destroot, install, and package targets. Type: optional Example: depends_lib port:libfetch
On Aug 6, 2007, at 10:07 AM, markd@macports.org wrote:
Why do we have depends_lib, depends_build and depends_run? Why not just a single "depends"? Why does it matter which phase requires the other software? Isn't it enough to know that the other software is required at some point, and so MacPorts should install that other software first?
Depends_build dependencies are only needed if you're actually building the software. They're not needed at all once the software is built and installed. (Think of gcc). Depends_run dependencies are needed when the software is run, but not necessarily to build the software. (Think of a program that does a fork/exec of /usr/bin/foo at runtime). Depends_lib dependencies are needed both at build time (for headers and libraries to link against) and at run time (to provide necessary code). For binary packages, you'd only need to consider depends_lib + depends_run. Even for those building their own software, it makes sense to distinguish since it gives a better sense of what uninstalls might break (i.e. gcc is a depends_build for most projects, but uninstalling it wouldn't interfere with many ports operation). - kvv
Kevin Van Vechten <kvv@ writes:
Why do we have depends_lib, depends_build and depends_run? Why not just a single "depends"? Why does it matter which phase requires the other software? Isn't it enough to know that the other software is required at some point, and so MacPorts should install that other software first?
Depends_build dependencies are only needed if you're actually building the software. They're not needed at all once the software is built and installed. (Think of gcc).
Depends_run dependencies are needed when the software is run, but not necessarily to build the software. (Think of a program that does a fork/exec of /usr/bin/foo at runtime).
Depends_lib dependencies are needed both at build time (for headers and libraries to link against) and at run time (to provide necessary code).
For binary packages, you'd only need to consider depends_lib + depends_run. Even for those building their own software, it makes sense to distinguish since it gives a better sense of what uninstalls might break (i.e. gcc is a depends_build for most projects, but uninstalling it wouldn't interfere with many ports operation).
Thanks, Kevin. I'll review this more closely in a bit and document it in the new guide. Mark
Le 07-08-06 à 04:22, Randall Wood a écrit :
A dependency is considered satisfied if the dependency is installed, not if it is activated. I think this should be considered a bug.
It is https://trac.macosforge.org/projects/macports/ticket/7361 yves
participants (5)
-
Kevin Van Vechten
-
markd@macports.org
-
Randall Wood
-
Ryan Schmidt
-
Yves de Champlain