====== Portsあれこれ ======
===== 依存関係のエラーの対処方法 =====
たまに依存関係系のエラーが発生し、コンパイルに行く前に終了することがある。そんな時は/usr/ports/UPDATINGを見れば殆ど解決する。
例えばこんなエラーが出たとする。
===>>> Gathering dependency list for devel/llvm40 from ports
===>>> The dependency for devel/cmake
seems to be handled by cmake-modules-3.8.2
===>>> The devel/cmake-modules port has been deleted: Deleted, merged into devel/cmake
===>>> Aborting update
===>>> Update for llvm40-4.0.1_1 failed
===>>> Aborting update
devel/cmake-modulesが削除されdevel/cmakeに統合されたと言っている。すかさず/usr/ports/UPDATINGを見てみると…
20170914:
AFFECTS: users of CMake & CMake Modules
AUTHOR: adridg@FreeBSD.org
The devel/cmake-modules port has been merged into devel/cmake.
The benefit of being able to update the modules without the binary
is outweighed by the issues caused by having the binary out-of-sync
with the modules.
Users should delete the devel/cmake-modules package and then
upgrade or reinstall devel/cmake.
All ports have been updated to depend only on CMake.
丁寧な解説と対処方法がちゃんと載ってるんすな。というわけで、解説通りにdevel/cmake-modulesを消してdevel/cmakeを入れてみる。
$ sudo pkg remove devel/cmake-modules
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 2 packages (of 0 packages in the universe):
Installed packages to be REMOVED:
cmake-modules-3.8.2
cmake-3.8.2
Number of packages to be removed: 2
The operation will free 21 MiB.
Proceed with deinstalling packages? [y/N]: y
[1/2] Deinstalling cmake-3.8.2...
[1/2] Deleting files for cmake-3.8.2: 100%
[2/2] Deinstalling cmake-modules-3.8.2...
[2/2] Deleting files for cmake-modules-3.8.2: 100%
$ sudo pkg install cmake
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
cmake: 3.9.3
Number of packages to be installed: 1
The process will require 21 MiB more space.
4 MiB to be downloaded.
Proceed with this action? [y/N]: y
[1/1] Fetching cmake-3.9.3.txz: 100% 4 MiB 1.4MB/s 00:03
Checking integrity... done (0 conflicting)
[1/1] Installing cmake-3.9.3...
Extracting cmake-3.9.3: 100%