You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by ch...@apache.org on 2026/05/04 03:39:00 UTC
(cloudberry) 21/26: Do not include protobuf files twice
This is an automated email from the ASF dual-hosted git repository.
oppenheimer01 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 33225f5840aa102adebfb9ba6687baa932e8dbc8
Author: Leonid Borchuk <xi...@qavm-f9b691f5.qemu>
AuthorDate: Mon Apr 13 16:20:34 2026 +0000
Do not include protobuf files twice
We have two sections in a Makefile - one for CPP_OBJS and one for OBJS.
CPP_OBJS use wildcards and src/protos includes bot in CPP_OBJS and in
OBJS. So generated gcc string includes multiple items of proto *.o
files. That leads to multiple definitions errors in linking time. Do not
include proto files in CPP_OBJS macros and use it in OBJS macros.
---
gpcontrib/gp_stats_collector/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gpcontrib/gp_stats_collector/Makefile b/gpcontrib/gp_stats_collector/Makefile
index 43255ca1955..b3228d2c45e 100644
--- a/gpcontrib/gp_stats_collector/Makefile
+++ b/gpcontrib/gp_stats_collector/Makefile
@@ -7,7 +7,7 @@ PROTO_BASES = gpsc_plan gpsc_metrics gpsc_set_service
PROTO_OBJS = $(patsubst %,src/protos/%.pb.o,$(PROTO_BASES))
C_OBJS = $(patsubst %.c,%.o,$(wildcard src/*.c src/*/*.c))
-CPP_OBJS = $(patsubst %.cpp,%.o,$(wildcard src/*.cpp src/*/*.cpp))
+CPP_OBJS = $(patsubst %.cpp,%.o,$(wildcard src/*.cpp src/log/*.cpp src/memory/*.cpp))
OBJS = $(C_OBJS) $(CPP_OBJS) $(PROTO_OBJS)
PG_CXXFLAGS += -Werror -Wall -Wno-unused-but-set-variable -std=c++17 -Isrc/protos -Isrc -Iinclude -DGPBUILD
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org