pkg・ports アップデート関連 - その他一般 - openblas-0.3.27,2 → 0.3.29,2

クラウディア 
1. 概要
2. 状況
3. 対策
4. 後始末

1. 概要

 発生は、2025年1月27日です。  当初の表題は、「py311-pytorch-2.5.1_2 → 2.5.1_3」だったのでありますが、原因を究明していくうちに、現在の表題荷った次第です。  本ページは、下記のサイトを参考にさせていただきました。
284425 – math/openblas: 0.3.29 fails to build at phase: stage

2. 状況

 当初、下記の状況でありました。

$ pkg version -vl "<"
blis-0.9.0_2                       <   needs updating (index has 1.1)
py311-pytorch-2.5.1_2              <   needs updating (index has 2.5.1_3)
 で、上記をいったん、アンインストールしたら。  現在は。

openblas-0.3.27,2           <  needs updating (port has 0.3.29,2)
protobuf-28.3,1             <  needs updating (port has 29.3,1)
py311-numpy-1.26.4_4,1      <  needs updating (port has 1.26.4_5,1)
suitesparse-cholmod-5.3.0   <  needs updating (port has 5.3.0_1)
suitesparse-config-7.8.3    <  needs updating (port has 7.8.3_1)
suitesparse-umfpack-6.3.5   <  needs updating (port has 6.3.5_1)
 もしくは。

py311-numpy-1.26.4_4,1      <  needs updating (port has 1.26.4_5,1)
py311-scipy-1.11.1_2,1      <  needs updating (port has 1.11.1_3,1)
suitesparse-cholmod-5.3.0   <  needs updating (port has 5.3.0_1)
suitesparse-config-7.8.3    <  needs updating (port has 7.8.3_1)
suitesparse-umfpack-6.3.5   <  needs updating (port has 6.3.5_1)
 これらのうち、例えば、「py311-numpy」をアップグレードしようとすると。

portupgrade -rR py311-numpy
 すると。

[Reading data from pkg(8) ... - 651 packages found - done]
[Gathering depends for math/py-numpy ................................................................................... done]
[Gathering depends for math/py-numexpr ...... done]
[Gathering depends for math/py-bottleneck ........ done]
[Exclude up-to-date packages ............................................. done]
--->  Upgrading 'openblas-0.3.27,2' to 'openblas-0.3.29,2' (math/openblas)
--->  Building '/usr/ports/math/openblas'
===>  Cleaning for openblas-0.3.29,2

・・・	略	・・・

Install OK!
gmake[1]: Leaving directory '/usr/ports/math/openblas/work/OpenBLAS-ce3f668'
/usr/bin/strip /usr/ports/math/openblas/work/stage/usr/local/lib/libopenblasp-r0.3.27.so
strip: open /usr/ports/math/openblas/work/stage/usr/local/lib/libopenblasp-r0.3.27.so failed: No such file or directory
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/math/openblas
*** Error code 1

Stop.
make: stopped in /usr/ports/math/openblas
egrep: empty (sub)expression
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20250131-80639-pvesr0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=openblas-0.3.27,2 UPGRADE_PORT_VER=0.3.27,2 make
** Fix the problem and try again.
--->  Skipping 'math/suitesparse-config' (suitesparse-config-7.8.3) because a requisite package 'openblas-0.3.27,2' (math/openblas) failed (specify -k to force)
--->  Skipping 'math/suitesparse-cholmod' (suitesparse-cholmod-5.3.0) because a requisite package 'suitesparse-config-7.8.3' (math/suitesparse-config) failed (specify -k to force)
--->  Skipping 'math/suitesparse-umfpack' (suitesparse-umfpack-6.3.5) because a requisite package 'suitesparse-config-7.8.3' (math/suitesparse-config) failed (specify -k to force)
--->  Skipping 'math/py-numpy' (py311-numpy-1.26.4_4,1) because a requisite package 'suitesparse-umfpack-6.3.5' (math/suitesparse-umfpack) failed (specify -k to force)
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! math/openblas (openblas-0.3.27,2)     (new compiler error)
        * math/suitesparse-config (suitesparse-config-7.8.3)
        * math/suitesparse-cholmod (suitesparse-cholmod-5.3.0)
        * math/suitesparse-umfpack (suitesparse-umfpack-6.3.5)
        * math/py-numpy (py311-numpy-1.26.4_4,1)
 どれも、最終的に、こうなっちゃいます。

3. 対策

 参考サイトを読めば、いずれ、対応したものがリリースされるような気はしますが。  応急処置として、前項のエラーの箇所へ着目して。

cd /usr/ports/math/openblas
make deinstall clean
make config
 で、オプションのチェックは、すべてはずしておきます。  で。

cd /usr/ports/math/openblas
make
 これが、同じ個所でエラーになるのですが。

cd /usr/ports/math/openblas/work/stage/usr/local/lib/
ln -s libopenblas_nehalemp-r0.3.27.so libopenblasp-r0.3.27.so
 そのうえで。

cd /usr/ports/math/openblas
make
 これで、最後までいきます。

===>  Staging for openblas-0.3.29,2
===>   openblas-0.3.29,2 depends on executable: gfortran13 - found
===>   Generating temporary packing list

・・・	略	・・・

Generating OpenBLASConfig.cmake in /usr/ports/math/openblas/work/stage/usr/local/lib/cmake/openblas
Generating OpenBLASConfigVersion.cmake in /usr/ports/math/openblas/work/stage/usr/local/lib/cmake/openblas
Install OK!
gmake[1]: Leaving directory '/usr/ports/math/openblas/work/OpenBLAS-ce3f668'
/usr/bin/strip /usr/ports/math/openblas/work/stage/usr/local/lib/libopenblasp-r0.3.27.so
cd /usr/ports/math/openblas/work/stage/usr/local && ls lib/libopenblas_*p-r0.3.27.* >> /usr/ports/math/openblas/work/.PLIST.mktmp
====> Compressing man pages (compress-man)
 その後。

make reinstall
 こんななっちゃうのが、いるので。

===>  Deinstalling for openblas
===>   openblas not installed, skipping
===>  Installing for openblas-0.3.29,2
===>  Checking if openblas is already installed
===>   Registering installation for openblas-0.3.29,2
Installing openblas-0.3.29,2...
pkg-static: openblas-0.3.29,2 conflicts with blis-1.1 (installs files into the same place).  Problematic file: /usr/local/include/cblas.h
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/math/openblas
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/math/openblas
*** Error code 1

Stop.
make: stopped in /usr/ports/math/openblas

cd /usr/ports/math/blis
make deinstall clean
 してから。

cd /usr/ports/math/openblas
make reinstall
 これで、なんとか、「openblas」は、更新できました。  後は、残りのものを「portupgrade」します。  アップグレードできました。

4. 後始末

 残るは、ひとつの環境で。

$ portversion -v | grep "<"
[Reading data from pkg(8) ... - 651 packages found - done]
protobuf-28.3,1             <  needs updating (port has 29.3,1)
 となるのですが。

pkg remove protobuf
 すると。

Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        protobuf: 28.3,1

Number of packages to be removed: 1

The operation will free 12 MiB.

Proceed with deinstalling packages? [y/N]:
 となるので、依存しているものは、今んとこなさそうです。  なので。

cd /usr/ports/devel/protobuf
make deinstall clean
 これで、しばらく、様子を見ましょ。
ハイスピードプラン