Bug 231538

Summary: math/openblas 0.2.20_3,1 fails to compile with SGEMM_DEFAULT_UNROLL_M undefined
Product: Ports & Packages Reporter: Philip Homburg <pch-freebsd-bugs-1>
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Only Me CC: jonc, phd_kimberlite, pi, rozhuk.im
Priority: --- Flags: phd_kimberlite: maintainer-feedback+
pi: merge-quarterly+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Poudriere log file
none
patch for this issue none

Description Philip Homburg 2018-09-21 10:15:20 UTC
Created attachment 197298 [details]
Poudriere log file

11.2, poudriere, AMD64 (attached is the poudriere log file)

openblas 0.2.20_3,1 fails to compile:

===>  Building for openblas-0.2.20_3,1
cd /wrkdirs/usr/ports/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=/wrkdirs/usr/ports/math/openblas/work/stage
gmake[1]: Entering directory '/wrkdirs/usr/ports/math/openblas/work/OpenBLAS-0.2.20'
getarch_2nd.c:12:35: error: use of undeclared identifier 'SGEMM_DEFAULT_UNROLL_M'
    printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);

Just in case it is CPU related:

CPU: AMD Ryzen 5 2600X Six-Core Processor            (3593.35-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x800f82  Family=0x17  Model=0x8  Stepping=2
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x7ed8320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD Features2=0x35c233ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,SKINIT,WDT,TCE,Topology,PCXC,PNXC,DBE,PL2I,MWAITX>
  Structured Extended Features=0x209c01a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA>
  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
  AMD Extended Feature Extensions ID EBX=0x7<CLZERO,IRPerf,XSaveErPtr>
  SVM: (disabled in BIOS) NP,NRIP,VClean,AFlush,DAssist,NAsids=32768
  TSC: P-state invariant, performance statistics
Comment 1 Philip Homburg 2018-10-10 10:16:48 UTC
Created attachment 197998 [details]
patch for this issue

Added model IDs for Ryzen 2nd generation.
Comment 2 Ivan Rozhuk 2018-11-07 23:51:43 UTC
Works ok with 2700x.
Comment 3 Jonathan Chen 2018-11-16 19:58:14 UTC
Patch is good. Please consider adding it to the port.
Comment 4 Kurt Jaeger freebsd_committer 2018-11-17 03:14:43 UTC
Committed, thanks!
Comment 5 commit-hook freebsd_committer 2018-11-17 03:14:55 UTC
A commit references this bug:

Author: pi
Date: Sat Nov 17 03:14:22 UTC 2018
New revision: 485112
URL: https://svnweb.freebsd.org/changeset/ports/485112

Log:
  math/openblas: fix compile on newer Ryzen 2

  - Added model IDs for Ryzen 2nd generation

  PR:		231538
  Submitted by:	Philip Homburg <pch-freebsd-bugs@u-1.phicoh.com>
  Reviewed by:	rozhuk.im@gmail.com, jonc@chen.org.nz
  Approved by:	phd_kimberlite@yahoo.co.jp (maintainer)

Changes:
  head/math/openblas/files/patch-cpuid_x86.c
Comment 6 commit-hook freebsd_committer 2018-11-17 03:29:08 UTC
A commit references this bug:

Author: pi
Date: Sat Nov 17 03:28:31 UTC 2018
New revision: 485113
URL: https://svnweb.freebsd.org/changeset/ports/485113

Log:
  MFH: r485112 (build fix blanket)

  math/openblas: fix compile on newer Ryzen 2

  - Added model IDs for Ryzen 2nd generation

  PR:		231538
  Submitted by:	Philip Homburg <pch-freebsd-bugs@u-1.phicoh.com>
  Reviewed by:	rozhuk.im@gmail.com, jonc@chen.org.nz
  Approved by:	phd_kimberlite@yahoo.co.jp (maintainer)
  Approved by:	portmgr (implicit)

Changes:
_U  branches/2018Q4/
  branches/2018Q4/math/openblas/files/patch-cpuid_x86.c