fix(ip2country): default ENABLE_IP2COUNTRY=ON, hard-fail on missing dep - #119
Merged
got3nks merged 1 commit intoJun 12, 2026
Merged
Conversation
Drop the find_path/find_library probe in cmake/options.cmake that defaulted ENABLE_IP2COUNTRY based on whether libmaxminddb was discoverable. The probe-driven default was a "silent activation" that conflicted with the project's feature-gating policy (amule-project#113 review). Switch to the same shape used by ENABLE_NLS, ENABLE_BFD, and ENABLE_UPNP: default the option ON unconditionally. cmake/ip2country.cmake already FATAL_ERRORs with an actionable hint ("install libmaxminddb-dev or pass -DENABLE_IP2COUNTRY=NO") when the dep is missing, so the missing-dep UX is preserved. Docs updated to match: - INSTALL.md: ENABLE_IP2COUNTRY default flipped to YES. - IP2Country.md: build-prerequisites paragraph rewritten to describe the hard-fail behaviour and the opt-out flag.
got3nks
added a commit
to amule-org/amule-org.github.io
that referenced
this pull request
Jun 12, 2026
…179) Tracks amule-org/amule#119 (merged 2026-06-12): ENABLE_IP2COUNTRY now defaults to YES with a configure-time hard-fail if libmaxminddb is missing, matching how ENABLE_NLS and ENABLE_UPNP have always worked. docs/developer/compilation/index.md: - Build-options table: ENABLE_IP2COUNTRY default flipped NO → YES. - BUILD_EVERYTHING note: ENABLE_IP2COUNTRY is no longer the odd-one-out that needed an explicit -DENABLE_IP2COUNTRY=YES; rewrite to list it alongside ENABLE_NLS and ENABLE_UPNP as a default-on toggle. docs/developer/compilation/linux.md: - "libmaxminddb not found" troubleshooting paragraph: users hitting the FATAL_ERROR now usually didn't explicitly opt in; rewrite to name the default-YES behaviour as the trigger and point at the install-or-opt-out fix. The per-OS Quick Start cmake invocations (linux/macos/windows/bsd) keep their explicit -DENABLE_IP2COUNTRY=YES — the doc style elsewhere is "list every ENABLE_* explicitly even when it matches the default", same as the existing -DENABLE_NLS=YES / -DENABLE_UPNP=YES entries. Value still matches the new default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #113 review feedback from @Vollstrecker. Drops the probe-driven default in
cmake/options.cmakethat flippedENABLE_IP2COUNTRYbased on whetherlibmaxminddbwas discoverable. The probe was a "silent activation" that conflicted with the project's feature-gating policy.Fix
Switch to the same shape used by
ENABLE_NLS,ENABLE_BFD, andENABLE_UPNP: default the optionONunconditionally.cmake/ip2country.cmakealready produces aFATAL_ERRORwith an actionable hint ("install libmaxminddb-dev or pass-DENABLE_IP2COUNTRY=NO") when the dep is missing, so the missing-dep UX is preserved.Net effect on the configure matrix:
=YES=NO=YES=NOThe behavioural change is in row 4: a user on a system without
libmaxminddbwho never set the flag previously got a silent no-feature build; they now get a configure-time error pointing them at the rightapt/dnf/brewinstall or the-DENABLE_IP2COUNTRY=NOopt-out — matching how NLS/UPnP handle missing deps today.Docs
docs/INSTALL.md— table cell flippedNO→YES.docs/IP2Country.md— "Build prerequisites" paragraph rewritten to describe the hard-fail behaviour and the opt-out flag.Test plan
libmaxminddbinstalled, no flag: configures cleanly withENABLE_IP2COUNTRY=ON, builds, binary linkslibmaxminddb.0.dylib.libmaxminddbhidden viaCMAKE_IGNORE_PATH: configure hard-fails atcmake/ip2country.cmake:21with the install/opt-out hint.