Skip to content

Fix Windows compilation error in ob_req_packet_code.h #914

Description

@ep-12221

Environment

  • Platform: Windows
  • Source Path: C:/Users/admin/git/oceanbase-lite/

Description

Compilation fails on Windows when building the ob_geo_func_covered_by2.cpp source file. The error originates from the header file ob_req_packet_code.h.

Steps to Reproduce

  1. Attempt to build the project on Windows.
  2. The build process fails during the compilation of ob_geo_func_covered_by2.cpp.

Error Details

The compilation error occurs in deps/oblib/src/rpc/frame/ob_req_packet_code.h:

C:/Users/admin/git/oceanbase-lite/deps/oblib/src/rpc/frame/ob_req_packet_code.h(97,11): error: expected identifier
   97 |   OPTIONAL,
      |           ^
C:/Users/admin/git/oceanbase-lite/deps/oblib/src/rpc/frame/ob_req_packet_code.h(121,49): error: expected unqualified-id
  121 |     ret_type = ObReqCheckSumCheckLevel::OPTIONAL;
      |                                                 ^
2 errors generated.
ninja: build stopped: subcommand failed.
[build.ps1][ERROR] Build failed (exit code 1)

The error is triggered during the compilation of the following file chain:
ob_geo_func_covered_by2.cpp -> ob_geo_func_covered_by_helper.ipp -> ob_geo_func_covered_by.h -> ob_geo_func_common.h -> ob_geo_bin.h -> ob_geo.h -> ob_geo_common.h -> ob_srs_info.h -> ob_array.h -> worker.h -> context.h -> utility.h -> ob_diagnose_info.h -> thread.h -> ob_req_packet_code.h.

Additional Context (Original Form Fields)

  • Version Information (Required): Not provided. It is recommended to include the output of bin/observer -V. If the test involves obproxy version changes, also include obproxy -V.
  • Is this an RD-provided temporary version?: No / [Not Specified]
  • Reproducibility: Consistent / Intermittent / Uncertain / Other
  • Test Change Details: Added a new test scenario / Changed to a new machine / Ran a new tool / Occurred after replacing with a new version
  • Other anomalies or changes in the environment: No / Clog disk was full / Manual operations performed / Injected specific exceptions
  • Environment Information: Please provide connection strings for the problematic tenant and the sys tenant, as well as deployment information. Was the scene preserved?
  • Log Information: [Not Provided]
  • Other: For issues reported by external business teams, please correctly select the "Work Item Type" based on the actual situation:
    • Customer Service Feedback: Specifically refers to issues before production deployment or during POC, where a product bug is confirmed and requires a fix and release.
    • Online Issue: An issue that occurred after production deployment, confirmed as a product bug, but not classified as a fault.
    • Online Fault: An issue that occurred after production deployment, confirmed as a product bug, which caused business errors or public impact on the customer side (the definition of a fault is at the discretion of the delivery service team).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions