Skip to content

Compilation fails when ORCA optimizer is disabled with --disable-orca flag #1329

@robertmu

Description

@robertmu

Description

When building Cloudberry with the --disable-orca configure option, the compilation fails due to missing type definitions (OptimizerOptions and planner_hook_type) in the planner header file. These types appear to be ORCA-related but are still referenced even when ORCA is disabled.

Steps to Reproduce

  1. Run configure with ORCA disabled:
    ./configure --with-perl --with-python --with-libxml --with-gssapi --disable-orca --disable-pax --with-openssl --prefix=/home/cbdb/cbdb
  2. Run make: make

Error Output

make -C optimizer all
make[3]: Entering directory '/home/cbdb/Projects/cloudberry/src/backend/optimizer'
make -C path all
make[4]: Entering directory '/home/cbdb/Projects/cloudberry/src/backend/optimizer/path'
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-but-set-variable -Werror=implicit-fallthrough=3 -Wno-format-truncation -Wno-stringop-truncation -O3 -fPIC  -DUSE_INTERNAL_FTS=1  -Werror=uninitialized -Werror=implicit-function-declaration -Werror -I../../../../src/include   -D_GNU_SOURCE -I/usr/include/libxml2   -c -o allpaths.o allpaths.c
In file included from allpaths.c:46:
../../../../src/include/optimizer/planner.h:31:14: error: unknown type name ‘OptimizerOptions’
   31 |              OptimizerOptions *optimizer_options);
      |              ^~~~~~~~~~~~~~~~
../../../../src/include/optimizer/planner.h:32:20: error: unknown type name ‘planner_hook_type’
   32 | extern PGDLLIMPORT planner_hook_type planner_hook;
      |                    ^~~~~~~~~~~~~~~~~
../../../../src/include/optimizer/planner.h:46:11: error: unknown type name ‘OptimizerOptions’
   46 |           OptimizerOptions *optimizer_options);
      |           ^~~~~~~~~~~~~~~~
make[4]: *** [<builtin>: allpaths.o] Error 1
make[4]: Leaving directory '/home/cbdb/Projects/cloudberry/src/backend/optimizer/path'
make[3]: *** [../../../src/backend/common.mk:39: path-recursive] Error 2
make[3]: Leaving directory '/home/cbdb/Projects/cloudberry/src/backend/optimizer'
make[2]: *** [common.mk:39: optimizer-recursive] Error 2
make[2]: Leaving directory '/home/cbdb/Projects/cloudberry/src/backend'
make[1]: *** [Makefile:45: all-backend-recurse] Error 2
make[1]: Leaving directory '/home/cbdb/Projects/cloudberry/src'
make: *** [GNUmakefile:11: all-src-recurse] Error 2

Environment

  • Operating System: Linux robertmu-VirtualBox 5.15.0-139-generic \#149~20.04.1-Ubuntu SMP Wed Apr 16 08:29:56 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
  • Compiler: gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
  • Branch: main

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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