openwall / openwall/john

Reconsider --enable-opencl / --disable-opencl

Open
#5,397 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement maintenance/cleanup RFC / discussion
Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

We no longer depend on OpenCL library nor headers being available on the system at build time (we load the library dynamically at runtime, and we use our own copy of the headers), but we still check for both in configure and don't enable OpenCL support if either or both are missing.

Do we want to continue checking (I think @claudioandre-br said so)? If so, or regardless, do we possibly want explicit --enable-opencl to override any checks (just like --disable-opencl would)? I've just tested, and it does not yet do that, and indeed we currently only document --disable-opencl. We'll also need to document --enable-opencl if we start supporting it.

As to the default, if we do continue checking, then maybe check only for the library? We definitely don't need the headers anymore, at all, but the library we'd use at runtime, so it makes more sense to check for it. Alternatively, we could make the check an OR - enable OpenCL support by default if at least one of the two - library or headers - is found at build time, indicating that the system is possibly meant to work with OpenCL and is maybe just slightly misconfigured.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading configure to trace the current OpenCL library and header checks, then find the documentation for --disable-opencl. Compare the existing behavior with the proposed enable/disable policies and determine which default and override semantics should be adopted. Done means the chosen configuration behavior is implemented and both options are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.