Created attachment 220950 [details] Register the library + add a test target. science/wannier90 installs a shared library, but it is not registered: the attached patch fix that. Since I'm there, replace LIB_DEPENDS by USES+=blaslapack and add a test target. Note: some tests fail.
Created attachment 220969 [details] Register libwannier90 Actually it seems that the commonly expected name is rather libwannier90.
Committed, thanks!
A commit references this bug: Author: yuri Date: Sun Dec 27 02:31:01 UTC 2020 New revision: 559333 URL: https://svnweb.freebsd.org/changeset/ports/559333 Log: science/wannier90: Fix registration of libwannier in ldconfig by adding the symlink; Add the 'test' target. PR: 252162 Submitted by: thierry Changes: head/science/wannier90/Makefile
Yuri, sorry for the inconvenience, but it seems that we also need a libwannier.so, because this is the soname: $ objdump -p /usr/local/lib/libwannier90.so.0 | grep SONAME SONAME libwannier.so Please accept my additional patch to add it: Index: science/wannier90/Makefile =================================================================== --- science/wannier90/Makefile (revision 559348) +++ science/wannier90/Makefile (working copy) @@ -3,7 +3,7 @@ PORTNAME= wannier90 DISTVERSIONPREFIX= v DISTVERSION= 3.1.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= science MAINTAINER= yuri@FreeBSD.org @@ -29,6 +29,7 @@ PLIST_FILES= bin/postw90.x \ bin/w90chk2chk.x \ bin/wannier90.x \ + lib/libwannier.so \ lib/libwannier90.so \ lib/libwannier90.so.0 @@ -43,5 +44,6 @@ .endfor ${INSTALL_LIB} ${WRKSRC}/src/obj/libwannier.so ${STAGEDIR}${PREFIX}/lib/libwannier90.so.0 ${LN} -sf libwannier90.so.0 ${STAGEDIR}${PREFIX}/lib/libwannier90.so + ${LN} -sf libwannier90.so ${STAGEDIR}${PREFIX}/lib/libwannier.so .include <bsd.port.mk>
I think that this is simply a case of broken shared library. SONAME=libwannier.so which is a non-existent file name. I am not sure that adding it solves the problem: > $ ldconfig -r | grep wannier > 953:-lwannier90.0 => /usr/local/lib/libwannier90.so.0 ldconfig ignores libwannier.so.
The library name should be without "90". I will fix this.
This is not a problem with ldconfig (this one was fixed yesterday by r559333). But if you build a program linked with libwannier90.so, the linker register the library named according to it soname. ldd will show it to you. I noticed it when building abinit: I've just sent a PR about it, see PR 252221.
(In reply to Yuri Victorovich from comment #6) It is known as libwannier90 and abinit looks for it. If you prefer to not create another symlink, another possibility is to patch the makefile to change the soname.