[Bug]: Hardcoded include paths
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
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
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/couchdb
-
Difficulty 4/5 3-5 days Newbie friendliness 44/100
Maintainers usually reply within 1 day
-
Fix: Warning: 'catch ...' is deprecated; please use 'try ... catch ... end' insteadPossibly taken @devx-arjun claimed this 5 days ago. Openbeginner-friendly build chore patches-welcome
Difficulty 4/5 3-5 days Newbie friendliness 45/100
apache/couchdb#6144 · 4 comments ·
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 4/5 3-5 days Newbie friendliness 48/100
apache/couchdb#6132 · 3 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
apache/couchdb#6120 · 4 comments ·
Maintainers usually reply within 1 day
-
enhancement needs-triage
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
atlassian-labs/compiled#1960 ·
Maintainers usually reply within 1 day
-
status: team-only type: dependency-upgrade
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
spring-projects/spring-boot#52143 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day