Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug]: Hardcoded include paths

Open
#6,110 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
erlang
Domain
build-system

Research direction

Start in src/couch/rebar.config.script around line 155, where hardcoded library paths are listed. Trace the other include-path locations and check how the build behaves during cross-compilation or in Nix-like environments. Done means pkg-config is used as the preferred lookup where supported, with fallback behavior for systems without it.

Written by the indexing model from the issue text.

Description

bug needs-triage
Version

3.5.2

Describe the problem you're encountering

Hardcoded include paths are used in several places in couchdb. couchdb is at least considerate enough to check both /usr/include, /usr/local/include and even /opt/homebrew/include/ in the code I reviewed, but this is still insufficient when cross compiling or when building in strange environments like Nix.

The /opt/homebrew/include/ include paths is especially telling. Adding a include path to the hardcoded list of library paths every time a supported target of couchdb needs it is bad.

For example this file includes plenty of hardcoded library paths.

Expected Behaviour

pkg-config should be used to get the appropriate paths. If pkg-config works well on all target environments supported by couchdb, it can fully replace the hardcoded lists, improving the readability and portability of the build system.

Even if pkg-config cannot be used on all supported couchdb systems, the advantages it provides justify it being added as one of the lookup methods (preferably the first) in my opinion. The lookup can fall back to hardcoded paths on systems where pkg-config isn't available.

Dominant language
Erlang
Stars
7k
Forks
1.1k
Avg merge
10h 37m
Merged PRs (30d)
34

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from apache/couchdb

All issues in apache/couchdb

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.