使用 debuild 构建包时,我无法强制 make 查看某些目录中的 *.h 文件

使用 debuild 构建包时,我无法强制 make 查看某些目录中的 *.h 文件

我想要做的是建立一个 deb 包拆除命令,鉴于我已经提供了所有必要的文件,如 debian/control、debian/rules、debian/changelog 等...当尝试运行 debuild 时,它会启动,但一开始会失败并显示消息:

make[2]: Entering directory '/home/VS/pxfbld/pxf/external-table'
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -pie -fno-omit-frame-pointer -fPIC -DPXF_API_VERSION=\"16\" -I. -I./ -I/usr/include/postgresql/10/server -I/usr/include/postgresql/internal -I/usr/include/x86_64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/mit-krb5  -c -o src/pxfprotocol.o src/pxfprotocol.c
In file included from src/pxfbridge.h:27:0,
                 from src/pxfprotocol.c:21:
src/cdb/cdbvars.h:23:63: **fatal error: catalog/gp_segment_config.h: No such file or directory**
compilation terminated.

我想要什么 - 我想让它与额外的包含目录一起编译,也就是添加:-I / usr / local / gpdb / include -I / usr / local / gpdb / include / postgresql / server

我尝试将其放入 Debian 规则中:

export CXXFLAGS="-I/usr/local/gpdb/include -I/usr/local/gpdb/include/postgresql/server"
export CFLAGS="-I/usr/local/gpdb/include -I/usr/local/gpdb/include/postgresql/server"
export CPPFLAGS="-I/usr/local/gpdb/include -I/usr/local/gpdb/include/postgresql/server"

我试着把它说成

export DEB_CXXFLAGS_MAINT_APPEND= -I/usr/local/gpdb/include -I/usr/local/gpdb/include/postgresql/server
export DEB_CFLAGS_MAINT_APPEND= -I/usr/local/gpdb/include -I/usr/local/gpdb/include/postgresql/server
export DEB_CPPFLAGS_MAINT_APPEND= -I/usr/local/gpdb/include -I/usr/local/gpdb/include/postgresql/server
export DEB_CXXFLAGS_APPEND= -I/usr/local/gpdb/include -I/usr/local/gpdb/include/postgresql/server
export DEB_CFLAGS_APPEND= -I/usr/local/gpdb/include -I/usr/local/gpdb/include/postgresql/server
export DEB_CPPFLAGS_APPEND= -I/usr/local/gpdb/include -I/usr/local/gpdb/include/postgresql/server

我也执行了

export DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

export CPPFLAGS=$CPPFLAGS" -I/usr/local/gpdb/include -I/usr/local/gpdb/include/postgresql/server"

这两个选项对我来说都不起作用...这意味着这些行没有出现在 gcc 参数中......

你能告诉我我做错了什么吗?我只是不想把那些头文件放到这个存储库中,我想让 debuild 从我要求它读取它们的地方读取它们……

或许这是不可能的。

先感谢您!

相关内容