Bug 233266 - math/openblas build error: detecting CPU failed
Summary: math/openblas build error: detecting CPU failed
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2018-11-17 01:22 UTC by Pavel Minaev
Modified: 2019-08-13 10:32 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (phd_kimberlite)
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Minaev 2018-11-17 01:22:21 UTC
When building math/openblas, it fails to build due to CPU detection failure:


===>  Building for openblas-0.2.20_3,1
cd /construction/xports/math/openblas/work/OpenBLAS-0.2.20 ; /usr/bin/env BINARY64=1 DYNAMIC_ARCH=1 NO_AVX=1 NO_AVX2=1 NUM_THREADS=1 USE_THREAD=0  gmake DESTDIR=/construction/xports/math/openblas/work/stage
gmake[1]: Entering directory '/construction/xports/math/openblas/work/OpenBLAS-0.2.20'
Makefile:128: *** OpenBLAS: Detecting CPU failed. Please set TARGET explicitly, e.g. make TARGET=your_cpu_target. Please read README for the detail..  Stop.
gmake[1]: Leaving directory '/construction/xports/math/openblas/work/OpenBLAS-0.2.20'
*** Error code 2


Note that DYNAMIC_ARCH=1, and this is not a manual build! The problem is that the port assumes that this flag disables CPU detection in OpenBLAS build, but it actually doesn't; see https://github.com/xianyi/OpenBLAS/issues/1024. It seems that the only workaround is to explicitly specify some reasonable baseline CPU with TARGET= - this will allow the build do proceed, but shouldn't matter for the resulting binaries due to DYNAMIC_ARCH being set.

This will not repro on those machines for which CPU type is known by OpenBLAS, since CPU detection succeeds there - this is likely the reason why it doesn't show up in official package builds. In my case, the machine is a Lenovo Thinkpad 11e with Celeron N2940 CPU.
Comment 1 Walter Schwarzenfeld freebsd_triage 2019-08-13 10:32:35 UTC
Maintainer feedback, please!