Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 699020 - app-arch/zstd-1.4.3 multithreaded support should be enabled by default
Summary: app-arch/zstd-1.4.3 multithreaded support should be enabled by default
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick Lauer
URL: https://github.com/facebook/zstd/blob...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-10-31 12:36 UTC by Andrew Aladjev
Modified: 2020-03-22 12:46 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Aladjev 2019-10-31 12:36:21 UTC
Hello. I've installed zstd and multithreaded support is not working. Multithreaded support is disabled in zstd by default. I've added it using the following workaround:

emake ... CFLAGS="-DZSTD_MULTITHREAD=1" CXXFLAGS="-DZSTD_MULTITHREAD=1" "${@}"

Please add "thread" use in ebuild, thank you.

Reproducible: Always

Steps to Reproduce:
1. Install zstd 1.4.3.
2. Check ZSTD_cParam_getBounds(ZSTD_c_nbWorkers) output.

Actual Results:  
bounds.upperBound equals 0

Expected Results:  
bounds.upperBound equals 200
Comment 1 Jan Ziak (atomsymbol) 2020-03-08 20:16:37 UTC
Hi. Is this issue still reproducible with zstd-1.4.4?

Note: Make sure to use make-4.2.1 (or zstd patched for make-4.3), see bug 708110.
Comment 2 Andrew Aladjev 2020-03-17 16:04:26 UTC
Yes, It is still can be reproduced with zstd 1.4.4-r2 and make 4.2.1-r4.
Comment 3 Jan Ziak (atomsymbol) 2020-03-17 16:46:57 UTC
(In reply to Andrew Aladjev from comment #2)
> Yes, It is still can be reproduced with zstd 1.4.4-r2 and make 4.2.1-r4.

When zstd 1.4.5 is cloned from github and compiled with default settings it will compile libzstd.a and libzstd.so without -DZSTD_MULTITHREAD. Only the executable zstd, which does not link to libzstd.{a,so}, is compiled with -DZSTD_MULTITHREAD.

Gentoo follows zstd's default policy when building libzstd.so.
Comment 4 Andrew Aladjev 2020-03-17 17:29:58 UTC
Cmake version of build has threads enabled by default https://github.com/facebook/zstd/blob/dev/build/cmake/CMakeLists.txt. It is possible to use cmake in ebuild instead of makefile.
Comment 5 Larry the Git Cow gentoo-dev 2020-03-20 18:33:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d12cc35e8dc72515330a2a94192f9796e76013ac

commit d12cc35e8dc72515330a2a94192f9796e76013ac
Author:     Jan Ziak <0xe2.0x9a.0x9b@gmail.com>
AuthorDate: 2020-03-17 18:44:22 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2020-03-20 18:31:44 +0000

    app-arch/zstd: IUSE=threads
    
    Closes: https://bugs.gentoo.org/699020
    Closes: https://github.com/gentoo/gentoo/pull/14992
    Signed-off-by: Jan Ziak <0xe2.0x9a.0x9b@gmail.com>
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 app-arch/zstd/zstd-1.4.4-r3.ebuild | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)