Bug 251636

Summary: archivers/c-blosc: fails to build with CPUTYPE=haswell
Product: Ports & Packages Reporter: Greg V <greg>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: New ---    
Severity: Affects Only Me CC: iblis.dif01
Priority: --- Flags: bugzilla: maintainer-feedback? (iblis.dif01)
Version: Latest   
Hardware: amd64   
OS: Any   

Description Greg V 2020-12-06 12:13:57 UTC
/usr/ports/archivers/c-blosc/work/c-blosc-1.15.0/blosc/shuffle.c:171:1: error: function cannot return function type 'int (uint32_t)' (aka 'int (unsigned int)')
/usr/local/llvm11/lib/clang/11.0.0/include/xsaveintrin.h:35:42: note: expanded from macro '_xgetbv'
#define _xgetbv(A) __builtin_ia32_xgetbv((long long)(A))
/usr/ports/archivers/c-blosc/work/c-blosc-1.15.0/blosc/shuffle.c:171:1: error: definition of builtin function '__builtin_ia32_xgetbv'
/usr/local/llvm11/lib/clang/11.0.0/include/xsaveintrin.h:35:20: note: expanded from macro '_xgetbv'
#define _xgetbv(A) __builtin_ia32_xgetbv((long long)(A))
/usr/ports/archivers/c-blosc/work/c-blosc-1.15.0/blosc/shuffle.c:171:1: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions]
/usr/local/llvm11/lib/clang/11.0.0/include/xsaveintrin.h:35:43: note: expanded from macro '_xgetbv'
#define _xgetbv(A) __builtin_ia32_xgetbv((long long)(A))
/usr/ports/archivers/c-blosc/work/c-blosc-1.15.0/blosc/shuffle.c:181:10: error: use of undeclared identifier 'xcr'
    "c" (xcr)
2 warnings and 3 errors generated.

As a workaround, we can force unset cpu flags with


as I've suggested for bug 251590 also.
Comment 1 Iblis Lin 2021-04-19 12:14:15 UTC
Hi Greg,

Could you try the update out? (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255221)

Since the upstream has resolved the haswell issue in 1.16.3.
Reference: https://github.com/Blosc/c-blosc/releases/tag/v1.16.3