Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jan 2018 15:06:23 -0500
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        "O. Hartmann" <ohartmann@walstatt.org>, Conrad Meyer <cem@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r327706 - in head/sys: conf contrib/zstd/lib/freebsd
Message-ID:  <b38423ad-c17d-eea4-10e1-be907e54921d@FreeBSD.org>
In-Reply-To: <20180109104739.3fc77a44@freyja.zeit4.iv.bundesimmobilien.de>
References:  <201801082014.w08KEGv8071627@repo.freebsd.org> <20180109104739.3fc77a44@freyja.zeit4.iv.bundesimmobilien.de>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--OjetDBMHcicdtFM2d9KFQ5unK6VeKr8gi
Content-Type: multipart/mixed; boundary="hlOuFXcISLJWP5wSum5yijB0ocDxzKtlj";
 protected-headers="v1"
From: Jung-uk Kim <jkim@FreeBSD.org>
To: "O. Hartmann" <ohartmann@walstatt.org>, Conrad Meyer <cem@FreeBSD.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Message-ID: <b38423ad-c17d-eea4-10e1-be907e54921d@FreeBSD.org>
Subject: Re: svn commit: r327706 - in head/sys: conf contrib/zstd/lib/freebsd
References: <201801082014.w08KEGv8071627@repo.freebsd.org>
 <20180109104739.3fc77a44@freyja.zeit4.iv.bundesimmobilien.de>
In-Reply-To: <20180109104739.3fc77a44@freyja.zeit4.iv.bundesimmobilien.de>

--hlOuFXcISLJWP5wSum5yijB0ocDxzKtlj
Content-Type: multipart/mixed;
 boundary="------------7E711460D23535621727A074"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------7E711460D23535621727A074
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 01/09/2018 04:47, O. Hartmann wrote:
> On Mon, 8 Jan 2018 20:14:16 +0000 (UTC)
> Conrad Meyer <cem@FreeBSD.org> wrote:
>=20
>> Author: cem
>> Date: Mon Jan  8 20:14:16 2018
>> New Revision: 327706
>> URL: https://svnweb.freebsd.org/changeset/base/327706
>>
>> Log:
>>   Integrate zstd into the kernel
>>  =20
>>   Mock userspace headers and include mocked headers first in compilati=
on
>>   command to inject kernel headers and override e.g., malloc(3) with
>>   malloc(9).
>>  =20
>>   Submitted by:	allanjude
>>   Reviewed by:	imp (earlier version), bapt (earlier version)
>>   Differential Revision:	https://reviews.freebsd.org/D10407
>>
>> Added:
>>   head/sys/contrib/zstd/lib/freebsd/
>>   head/sys/contrib/zstd/lib/freebsd/stddef.h   (contents, props change=
d)
>>   head/sys/contrib/zstd/lib/freebsd/stdint.h   (contents, props change=
d)
>>   head/sys/contrib/zstd/lib/freebsd/stdio.h   (contents, props changed=
)
>>   head/sys/contrib/zstd/lib/freebsd/stdlib.h   (contents, props change=
d)
>>   head/sys/contrib/zstd/lib/freebsd/string.h   (contents, props change=
d)
>>   head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.h   (contents, props=

>> changed) head/sys/contrib/zstd/lib/freebsd/zstd_kmalloc.c   (contents,=
 props
>> changed) Modified:
>>   head/sys/conf/files
>>   head/sys/conf/kern.pre.mk

=2E..

> It seems that CURRENT is unwilling to build due to the error shown belo=
w:
>=20
> [...]
> --- fse_decompress.o ---
> In file included from /usr/src/sys/contrib/zstd/lib/common/fse_decompre=
ss.c:41:
> /usr/src/sys/contrib/zstd/lib/common/bitstream.h:71:12: fatal error:
> 'immintrin.h' file not found #  include <immintrin.h>   /* support for =
bextr
> (experimental) */ ^~~~~~~~~~~~~
> --- modules-all ---

I reported the same problem yesterday but I didn't get any reply yet.
Basically, if CPUTYPE is set in /etc/make.conf and the CPU supports BMI
instructions, it breaks.  You can use the attached patch as a stopgap.
Please note the patch was updated after r327715.

Jung-uk Kim

--------------7E711460D23535621727A074
Content-Type: text/x-patch;
 name="zstd.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="zstd.diff"

Index: sys/conf/kern.pre.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- sys/conf/kern.pre.mk	(revision 327736)
+++ sys/conf/kern.pre.mk	(working copy)
@@ -133,7 +133,7 @@ NORMAL_FWO=3D ${LD} -b binary --no-warn-mismatch -d
 	-m ${LD_EMULATION} -o ${.TARGET} ${.ALLSRC:M*.fw}
=20
 # for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS)
-ZSTD_C=3D ${CC} -c -DZSTD_HEAPMODE=3D1 -I$S/contrib/zstd/lib/freebsd ${C=
FLAGS} -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} -Wno-=
inline -Wno-missing-prototypes ${PROF} ${.IMPSRC}
+ZSTD_C=3D ${CC} -c -DZSTD_HEAPMODE=3D1 -U__BMI__ -I$S/contrib/zstd/lib/f=
reebsd ${CFLAGS} -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WER=
ROR} -Wno-inline -Wno-missing-prototypes ${PROF} ${.IMPSRC}
=20
 # Common for dtrace / zfs
 CDDL_CFLAGS=3D	-DFREEBSD_NAMECACHE -nostdinc -I$S/cddl/compat/opensolari=
s -I$S/cddl/contrib/opensolaris/uts/common -I$S -I$S/cddl/contrib/opensol=
aris/common ${CFLAGS} -Wno-unknown-pragmas -Wno-missing-prototypes -Wno-u=
ndef -Wno-strict-prototypes -Wno-cast-qual -Wno-parentheses -Wno-redundan=
t-decls -Wno-missing-braces -Wno-uninitialized -Wno-unused -Wno-inline -W=
no-switch -Wno-pointer-arith -Wno-unknown-pragmas

--------------7E711460D23535621727A074--

--hlOuFXcISLJWP5wSum5yijB0ocDxzKtlj--

--OjetDBMHcicdtFM2d9KFQ5unK6VeKr8gi
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAlpVIL8ACgkQfJ+WJvzb
8UaONwgAj4jnrogWEJ4FIIvf7qwgtnyX7jrcEq5VaHWVE2KS1lN5hfuuYGAFgwM+
NbClJVCxN7FVKaxha8aCgJFOJgIDX4gESTi++YL3b+29FbzOuCh379vjdB5AIYYg
oiMKqsdj8PyvR08QWttl6gpfkQ5G/Goo6n8t+ouxwCHz/c4Mrmb7/24GwaTXuwMf
fRjcwK3Poc9APgQaP6oJRnfgcTtP1ggOZuSu+s6zRl3C68eY0VRXv36yOIDFjiVo
gEVn5AjYhXfeiz782ouPDaIc3N3To5bl3W0jOr0nzxda6Vr4xXAYuw/9GoSXgqCg
DaS3cRrKtJvKvnJVT6HyYwqsr4dWMw==
=vAtt
-----END PGP SIGNATURE-----

--OjetDBMHcicdtFM2d9KFQ5unK6VeKr8gi--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b38423ad-c17d-eea4-10e1-be907e54921d>