Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ripgrep man page differs from CPU #1441

Closed
bmwiedemann opened this issue Dec 5, 2019 · 2 comments
Closed

ripgrep man page differs from CPU #1441

bmwiedemann opened this issue Dec 5, 2019 · 2 comments
Labels
bug A bug. rollup A PR that has been merged with many others in a rollup.

Comments

@bmwiedemann
Copy link

What version of ripgrep are you using?

11.0.2

What operating system are you using ripgrep on?

openSUSE Tumbleweed

Describe your question, feature request, or bug.

While working on reproducible builds for openSUSE, I found that
ripgrep man page content differs on different CPUs

--- /usr/share/man/man1/rg.1.gz
-11\&.0\&.2 \-SIMD \-AVX (compiled) +SIMD +AVX (runtime)
+11\&.0\&.2 \-SIMD \-AVX (compiled) \-SIMD \-AVX (runtime)

The strings come from ripgrep-11.0.2/src/app.rs fn runtime_cpu_features()

If this is a bug, what are the steps to reproduce the behavior?

use my "rbk" script from the reproducibleopensuse repo (needs some setup and an openSUSE account) or do a distribution/release build on different CPUs (e.g. I use kvm -cpu qemu64 and -cpu host )

If this is a bug, what is the actual behavior?

The man page differs depending on build machine CPU.

If this is a bug, what is the expected behavior?

The man page should be the same on every build (everytime, everywhere)

See https://reproducible-builds.org/ for why this matters.

@BurntSushi
Copy link
Owner

It's likely that the SIMD and AVX designations should be removed entirely from the man page, as they don't really make sense there. They are there probably because they are derived from the same template that drives the output of rg --version (which should show the SIMD and AVX designations).

@BurntSushi BurntSushi added the bug A bug. label Dec 5, 2019
@BurntSushi BurntSushi added the rollup A PR that has been merged with many others in a rollup. label Mar 15, 2020
BurntSushi added a commit that referenced this issue Mar 15, 2020
It doesn't really belong in the man page since it's an artifact of a
build/runtime configuration. Moreover, it inhibits reproducible builds.

Fixes #1441
@bmwiedemann
Copy link
Author

I tested your fix. Build is now reproducible.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug. rollup A PR that has been merged with many others in a rollup.
Projects
None yet
Development

No branches or pull requests

2 participants