# Q: Forcing the use of binary packages for certain packages



## swo123 (May 27, 2018)

Hi,

I am generally installing all my required software from the ports collection which works great for me. Now I was wondering whether for some packages (e.g. for llvm) there is a way to force the use of binary packages to prevent the system from building/compiling the software package from scratch? I know there are pros and cons with using packages & ports but for me the compilation of things like llvm just take forever (i.e. hours) on my server and I would like to avoid having to wait for hours for the compilation to complete. Any hints/ideas would be appreciated as I could not find any information about this online.

Thanks.

Best regards
Sebastian


----------



## ShelLuser (May 27, 2018)

There are indeed _massive_ drawbacks with combining these methods together. But this doesn't have to create problems all the time, something which ports-mgmt/portmaster manages to showcase by providing an option for this:


```
# Install packages for build-only dependencies (--packages-build)
# PM_PACKAGES_BUILD=pmp_build
```
Even so, it still doesn't rule out all the potential problems which can come from this.

So to answer your question: just installing the binary package is enough to satisfy the dependency. So: `# pkg install llvm60` is enough to ensure that if you build a port which has a build dependency for lang/llvm60 then it will recognize the installed package and use that.

Don't forget that no matter if you build using Ports or install using a binary repository: in the end everything ends up as a package on your system. Technically there is no difference between installing LLVM 6.0 from ports or from a package.

Be careful though. Because ports such as lang/llvm60 also have specific building dependencies such as Perl and Python. And if your system doesn't use the default versions for those then you could run into problems. But other than that it should be perfectly fine.


----------

