[CDRIVER-3472] Unknown CMake command "CHECK_STRUCT_HAS_MEMBER". Created: 21/Dec/19  Updated: 28/Oct/23  Resolved: 26/Dec/19

Status: Closed
Project: C Driver
Component/s: Build
Affects Version/s: 1.15.3
Fix Version/s: 1.16.0, 1.15.4

Type: Bug Priority: Major - P3
Reporter: Ryan Schmidt Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

macOS High Sierra 10.13.6, Xcode 9.4.1, MacPorts 2.6.2, CMake 3.16.2



 Description   

Hi,

I'm the maintainer of the mongodb C driver in MacPorts. 1.15.2 build fine, but 1.15.3 has this problem:

CMake Error at src/libmongoc/CMakeLists.txt:400 (CHECK_STRUCT_HAS_MEMBER):
  Unknown CMake command "CHECK_STRUCT_HAS_MEMBER".



 Comments   
Comment by Githook User [ 26/Dec/19 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3472 add missing cmake include
Branch: r1.15
https://github.com/mongodb/mongo-c-driver/commit/7bbeb6953558653b51816ac0283fee0c4c47f966

Comment by Githook User [ 26/Dec/19 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3472 add missing cmake include
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/ba92b566c4eb14d343a84f338db3e81702144cd6

Comment by Ryan Schmidt [ 21/Dec/19 ]

Yes! Thank you, that works. I'll use that patch in MacPorts for now.

Comment by Kevin Albertson [ 21/Dec/19 ]

Hi ryandesign, thanks for the report, and apologies for the disruption! I believe the root cause is a missing cmake include. Oddly, configuring with cmake 3.15.5 on my mac seems ok, our CI tests pass, which use a variety of cmake versions on different platforms, and after downloading 3.16.2 on my mac I also don't see the error locally.

I believe this patch (also on this branch) may fix this error. Since I cannot repro, if possible, would you be able to confirm this fixes the issue for you?

Thank you,
Kevin

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