Scenario: - ports tree at r524653 - building math/openblas using portmaster - selecting default build options, which is none (interactive default) Result: - Instead of libopenblasp-r0.3.7.so a library libopenblasp-rnehalem0.3.7.so (or other architecture specific) library is built, breaking the install stage Note: - Building using automated package building etc. does not uncover this issue because in that case, DYNAMIC_ARCH is set by default. Proposed fix: - DYNAMIC_ARCH should not be an option but be set unconditionally. -- Martin
As a confirmation; I have the same issue. (12.1-STABLE, amd64).
===> Registering installation for openblas-0.3.7_1,1 pkg-static: Unable to access file /usr/ports/math/openblas/work/stage/usr/local/lib/libopenblasp@comment -r0.3.7.a:No such file or directory pkg-static: Unable to access file /usr/ports/math/openblas/work/stage/usr/local/lib/libopenblasp-r0.3.7.so:No such file or directory *** Error code 74 -- ls -al /usr/ports/math/openblas/work/stage/usr/local/lib/libopenblas* -rw-r--r-- 1 root wheel 28864528 30 Jan. 21:50 /usr/ports/math/openblas/work/stage/usr/local/lib/libopenblas_barcelonap-r0.3.7.a -rwxr-xr-x 1 root wheel 14670760 30 Jan. 22:07 /usr/ports/math/openblas/work/stage/usr/local/lib/libopenblas_barcelonap-r0.3.7.so lrwxr-xr-x 1 root wheel 31 30 Jan. 22:07 /usr/ports/math/openblas/work/stage/usr/local/lib/libopenblas.a -> libopenblas_barcelonap-r0.3.7.a lrwxr-xr-x 1 root wheel 32 30 Jan. 22:07 /usr/ports/math/openblas/work/stage/usr/local/lib/libopenblas.so -> libopenblas_barcelonap-r0.3.7.so
the line with @comment is not the original error (this was my error).
${WRKSRC}/Makefile.prebuild builds getarch. getarch outputs LIBCORE=*** to somewhere. ${WRKSRC}/Makefile.system picks up LIBCORE from somewhere and concat it to LIBNAME. Should we disguise LIBCORE to a fixed value?
Same here: ===> Registering installation for openblas-0.3.7_1,1 pkg-static: Unable to access file /usr/obj/usr/ports/math/openblas/work/stage/usr/local/lib/libopenblasp-r0.3.7.a:No such file or directory pkg-static: Unable to access file /usr/obj/usr/ports/math/openblas/work/stage/usr/local/lib/libopenblasp-r0.3.7.so:No such file or directory *** Error code 74 # ls /usr/obj/usr/ports/math/openblas/work/stage/usr/local/lib/libopenblas* /usr/obj/usr/ports/math/openblas/work/stage/usr/local/lib/libopenblas_penrynp-r0.3.7.a /usr/obj/usr/ports/math/openblas/work/stage/usr/local/lib/libopenblas_penrynp-r0.3.7.so /usr/obj/usr/ports/math/openblas/work/stage/usr/local/lib/libopenblas.a /usr/obj/usr/ports/math/openblas/work/stage/usr/local/lib/libopenblas.so OPTIONS_FILE_UNSET+=AVX OPTIONS_FILE_UNSET+=AVX2 OPTIONS_FILE_UNSET+=DYNAMIC_ARCH OPTIONS_FILE_UNSET+=INTERFACE64 OPTIONS_FILE_UNSET+=OPENMP
(In reply to Tatsuki Makino from comment #4) Or maybe, we can do something like this: post-install: .if !${PORT_OPTIONS:MDYNAMIC_ARCH} ${MV} ${STAGEDIR}${PREFIX}/lib/libopenblas_*-r${PORTVERSION}.a \ ${STAGEDIR}${PREFIX}/lib/libopenblasp-r${PORTVERSION}.a ${MV} ${STAGEDIR}${PREFIX}/lib/libopenblas_*-r${PORTVERSION}.so \ ${STAGEDIR}${PREFIX}/lib/libopenblasp-r${PORTVERSION}.so ${RM} ${STAGEDIR}${PREFIX}/lib/libopenblas.a ${RM} ${STAGEDIR}${PREFIX}/lib/libopenblas.so ${LN} -sf libopenblasp-r${PORTVERSION}.a \ ${STAGEDIR}${PREFIX}/lib/libopenblas.a ${LN} -sf libopenblasp-r${PORTVERSION}.so \ ${STAGEDIR}${PREFIX}/lib/libopenblas.so .endif
For me it would be important to build a generic library because I am installing the packages on various architectures. This is why I would prefer DYNAMIC_ARCH to be set unconditionally. The alternative would be to build some kind of generic version which would work on "most" 64-bit processors. Specifically for me "most" is architectures since 2010. :-) But that would nullify any optimizations offered by later architectures. -- Martin
A commit references this bug: Author: swills Date: Fri Jan 31 14:57:32 UTC 2020 New revision: 524713 URL: https://svnweb.freebsd.org/changeset/ports/524713 Log: math/openblas: fix plist with DYNAMIC_ARCH off This is further fallout from r523749 and r524642 While here, fix order of PORTREVISION. There is no PORTREVISION bump because this a build fix. PR: 231371 PR: 243739 Reported by: many Changes: head/math/openblas/Makefile head/math/openblas/pkg-plist
I believe this is fixed, please let me know if there's still an issue.
(In reply to Steve Wills from comment #9) I think it is a perfect fix for all LIBCORE. Thank you very much.
The package is fine, but there is no library with a /^libopenblas.*\.so\.[[:digit:]]/ style file name. It is scanned by libpkg (libpkg/elfhints.c) and ldconfig (sbin/ldconfig/ldconfig.c). It causes errors like: py37-numpy is missing a required shared library: libopenblas.so