[CDRIVER-4637] Minimize "AUTO" build settings Created: 08/May/23  Updated: 03/Nov/23

Status: Backlog
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Unknown
Reporter: Colby Pike Assignee: Colby Pike
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Quarter: FY24Q2

 Description   

Related to WRITING-13430: AUTO build settings are good for avoiding errors during the configuration process, at the expense of predictable build results.

In general, if a feature is possible on a platform, it should be ON by default. It should be well-documented how to address missing dependencies when the configure process fails, so that users will now what features they can turn OFF, and what packages they could install to have the feature succeed.



 Comments   
Comment by Githook User [ 03/Nov/23 ]

Author:

{'name': 'vector-of-bool', 'email': 'vectorofbool@gmail.com', 'username': 'vector-of-bool'}

Message: CDRIVER-4637 A config settings command (#1289)

  • New config settings code and defaults.

Almost all setting values have remained the same, and most setting
handling logic has remained unmodified, but this will serve as a basis
for better configuration settings handling in the future tasks for
CDRIVER-4637.

  • Aside: message() cleanup

Using `message()` without a mode argument will write the message
as a NOTICE to stderr. We want to use STATUS as the default, which goes
to stdout. Systems which colorize stderr output would seemingly-randomly
color certain lines where the mode argument was missing.

  • Use new CMake in more build tasks

Several build tasks still relied on older find-cmake logic. With the
new CMake changes, a more recent CMake version is required. These
tasks and scripts have been updated to use the same logic to find
the same CMake version as is used in the main build tasks.

  • Don't use Batch scripts to compile for MinGW

Batch scripting is fraught with peril and will almost never do what
one expects. Any other scripting language is preferable. Since we have
Bash available and the tools to properly convert paths, just use Bash
to do this work.

  • Redundant ENABLE_SHM_COUNTERS logic
  • Update the "Ask for Help" section
  • No longer applicable SASL checks
  • Remove ENABLE_BSON, as its purpose is confusing.
  • ENABLE_BSON=ON did the same as ENABLE_BSON=AUTO
  • There is no "ENABLE_BSON=OFF" since then there would be nothing to build.
  • USE_SYSTEM_LIBBSON=ON replaces ENABLE_BSON=SYSTEM.
  • To alleviate downstreams from needing to check versions before configuring,
    allow ENABLE_BSON=SYSTEM to be specified if USE_SYSTEM_LIBBSON=ON is also set,
    thus allowing one option pair to build both before and after this revision.
  • If ENABLE_BSON=SYSTEM is set but USE_SYSTEM_LIBBSON is not TRUE, then
    downstream will want to update their scripts to build with the new
    option rather than miscompile without being noticed.
  • New toolchain for the build
  • Don't inject the toolchain SSL into LD_LIBRARY_PATH

The toolchain CMake is incompatible with OpenSSL 1.1.0, so having it on the
library path breaks CMake. We don't need to modify LD_LIBRARY_PATH to cause
CMake to use the OpenSSL that we want. It is sufficient to prepend the SSL root
to the CMAKE_PREFIX_PATH.

Comment by Githook User [ 26/Jun/23 ]

Author:

{'name': 'vector-of-bool', 'email': 'vectorofbool@gmail.com', 'username': 'vector-of-bool'}

Message: CDRIVER-4637 Remove ENABLE_SRV=AUTO, clean up SRV URI support (#1301)

Remove AUTO for ENABLE_SRV, refactor .pc generation

This AUTO wasn't doing anything, and behaved very similar to plain ON.
Now we define an interface library that provides the resolving library.
Some cleanup to the ResSearch lookup module.

  • Use ENABLE_SRV to toggle SRV support rather than detection macros
  • Add distinct feature flag for SRV toggle.
  • Refactor pkg-config generation to use target properties
    This change uses target properties to fill in the slots in the
    generated pkg-config files. Previously this was unstructured strings
    and flag juggling.
  • Tweak method of detecting name resolution
    Co-authored-by: Roberto C. Sánchez <roberto@connexer.com>
    Branch: master
    https://github.com/mongodb/mongo-c-driver/commit/0dc1a4e833a9339096009ec26e7197e87842f6f7
Comment by Githook User [ 13/Jun/23 ]

Author:

{'name': 'vector-of-bool', 'email': 'vectorofbool@gmail.com', 'username': 'vector-of-bool'}

Message: CDRIVER-4637 A config settings command (#1289)

  • New config settings code and defaults.

Almost all setting values have remained the same, and most setting
handling logic has remained unmodified, but this will serve as a basis
for better configuration settings handling in the future tasks for
CDRIVER-4637.

  • Aside: message() cleanup

Using `message()` without a mode argument will write the message
as a NOTICE to stderr. We want to use STATUS as the default, which goes
to stdout. Systems which colorize stderr output would seemingly-randomly
color certain lines where the mode argument was missing.

  • Use new CMake in more build tasks

Several build tasks still relied on older find-cmake logic. With the
new CMake changes, a more recent CMake version is required. These
tasks and scripts have been updated to use the same logic to find
the same CMake version as is used in the main build tasks.

  • Don't use Batch scripts to compile for MinGW

Batch scripting is fraught with peril and will almost never do what
one expects. Any other scripting language is preferable. Since we have
Bash available and the tools to properly convert paths, just use Bash
to do this work.

  • Redundant ENABLE_SHM_COUNTERS logic
  • Update the "Ask for Help" section
  • No longer applicable SASL checks
  • Remove ENABLE_BSON, as its purpose is confusing.
  • ENABLE_BSON=ON did the same as ENABLE_BSON=AUTO
  • There is no "ENABLE_BSON=OFF" since then there would be nothing to build.
  • USE_SYSTEM_LIBBSON=ON replaces ENABLE_BSON=SYSTEM.
  • To alleviate downstreams from needing to check versions before configuring,
    allow ENABLE_BSON=SYSTEM to be specified if USE_SYSTEM_LIBBSON=ON is also set,
    thus allowing one option pair to build both before and after this revision.
  • If ENABLE_BSON=SYSTEM is set but USE_SYSTEM_LIBBSON is not TRUE, then
    downstream will want to update their scripts to build with the new
    option rather than miscompile without being noticed.
  • New toolchain for the build
  • Don't inject the toolchain SSL into LD_LIBRARY_PATH

The toolchain CMake is incompatible with OpenSSL 1.1.0, so having it on the
library path breaks CMake. We don't need to modify LD_LIBRARY_PATH to cause
CMake to use the OpenSSL that we want. It is sufficient to prepend the SSL root
to the CMAKE_PREFIX_PATH.

Generated at Wed Feb 07 21:21:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.