The math/openblas installation process only installs the libraries. This makes it impossible to actually use the library because the necessary header files are missing. $ pkg info -l openblas openblas-0.2.14,1: /usr/local/lib/libopenblas.a /usr/local/lib/libopenblas.so /usr/local/lib/libopenblas.so.0 /usr/local/lib/libopenblasp.a /usr/local/lib/libopenblasp.so /usr/local/lib/libopenblasp.so.0 /usr/local/share/licenses/openblas-0.2.14,1/BSD3CLAUSE /usr/local/share/licenses/openblas-0.2.14,1/LICENSE /usr/local/share/licenses/openblas-0.2.14,1/catalog.mk As a minimum, cblas.h needs to be installed. Based on Makefile.install, this depends on openblas_config.h (which is built by Makefile.install).
(In reply to Peter Jeremy from comment #0) Hi, Currently I have no plan to add cblas.h to the installation process. If you require cblas.h please install math/cblas and specify libopenblas at link time. Although I can modify the port to be installing the header file, this will require conflict mark to other cblas implementation (math/cblas and math/atlas). I think that the conflict mark restricts the flexibility of BLAS library selection at link time. However, because this port is used many users, convenience for C interface also should be considered. [plan A] * maintain current installation [plan B] * install cblas.h to /use/local/include and add conflict mark to cblas [plan C] * install cblas.h to some other place (e.g., /usr/local/include/openblas) How do you think about this? Best regards, Shibusawa
Plan A effectively makes openblas useless unless you solely use packages and hope that the openblas ABI (not API) precisely matches the ABI for whichever other BLAS was used to compile the packages that depend on BLAS. My preference would be option B - looking at some of the other BLAS implementations, it seems to be a tossup whether they conflict or not. Option C is probably workable. A fourth option would be to make installing the header files an config option - which would also toggle the conflicts.
Created attachment 159637 [details] Patches and their poudriere log Ok, I have created two patches corresponding to the option B and D, respectively. The attached contains the two patches and their poudriere logs. Before you decide which patch will be committed, please obtain agreement of at least one committer who maintains dependency of this port. If you use the Phabricator, I would appreciate it if you let me know the URL. Thanks in advance, Shibusawa
I've tried using the patch for option D and, whilst it installs /usr/local/include/cblas.h, it doesn't install the "common.h" that cblas.h includes. This leads to failures similar to the following: In file included from ./include/caffe/util/mkl_alternate.hpp:11: /usr/local/include/cblas.h:5:10: fatal error: 'common.h' file not found #include "common.h" ^ 1 error generated.
Created attachment 160965 [details] Alternative Makefile patch Attached is an alternative patch to the Makefile for option D. Using this patch, I could build an application that needs BLAS.
Created attachment 167178 [details] patch to head Please notice that this is a conditional approval under the agreement described in comment #3. Because conflict mark may affect all ports which depend to math/openblas. Shibusawa
Is the last patch you provided in this PR the one that needs to be committed? Is there any further work or investigation that needs to be done? Thanks
When this patch will be commited?
I have tried compiling using patch "patch_to_head" and got this error: ===> Generating temporary packing list /bin/mkdir -p /usr/ports/math/openblas/work/include/openblas cd /usr/ports/math/openblas/work/ && for i in cblas.h cblas_noconst.h; do /usr/bin/sed 's:include ":include "openblas/:' /usr/ports/math/openblas/work/OpenBLAS-0.2.15/$i > include/$i ; done sed: /usr/ports/math/openblas/work/OpenBLAS-0.2.15/cblas_noconst.h: No such file or directory *** Error code 1 Stop.
Openblas has now version 0.2.20. Is this still relevant.
I close here. Should there still problems with newer version, please open a new PR.