Avahi is not available but cups/dnssd.c tries to use it unconditional
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 85/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- c
- 领域
- build-system
调研方向
从 cups/dnssd.c 开始:dnssdGetAddrInfo/backend 代码块落入一个 #else // HAVE_AVAHI 分支,该分支在 config.h 中未定义 HAVE_AVAHI 的情况下仍然包含 <avahi-client/client.h>。对比提交 23a183b63a4c94a 中对 cups/dest.c 里同等 HAVE_AVAHI 用法的保护方式,应用同样的保护,使非 Avahi 的 Linux 构建能够编译。完成标准 = 在没有 avahi-client 头文件的系统上 ./configure && gmake 成功,并且在定义了 HAVE_AVAHI 时没有任何功能性变更。
由索引模型根据 Issue 内容生成。
描述
.
Describe the bug
- Version: CUPS 2.4.20 from today git clone
- Platform: SLES 15 SP7, 64-bit
./configurereports:checking for Avahi client... no- Generated
config.hcontains:/* #undef HAVE_AVAHI */ - Nevertheless,
cups/dnssd.chas:#ifdef HAVE_MDNSRESPONDER ... #elif _WIN32 ... #else // HAVE_AVAHI # include <avahi-client/client.h> - Consequently, on Linux without Avahi, the
#elsebranch is taken and compilation fails with:fatal error: avahi-client/client.h: Datei oder Verzeichnis nicht gefunden - the preceding
cups/dest.cproblem was fixed by commit23a183b63a4c94a.
That makes the problem reproducible and, importantly, demonstrates that installing avahi-devel would merely mask the inconsistency between configure and the source.
To Reproduce
Steps to reproduce the behavior:
- Go to
cups - Run
./configure && gmake
- 主要语言
- C
- 星标
- 1.8k
- 派生
- 342
- 平均合并
- 3 天 20 小时
- 30 天内合并 PR
- 11
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenPrinting/cups 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
OpenPrinting/cups#1751 ·
维护者通常 1 天内回复
-
Potential integer overflow when using atoi() In cgi-bin/var.c可能已有人在做 @lynayur 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
OpenPrinting/cups#1748 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
OpenPrinting/cups#1721 ·
维护者通常 1 天内回复
-
investigating platform issue printer specific issue
难度 3/5 1-2 天 新手友好度 65/100
OpenPrinting/cups#1727 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 30/100
OpenPrinting/cups#1726 ·
维护者通常 1 天内回复
查看 OpenPrinting/cups 的全部 Issue
相似的 Issue
-
IO.get_env on Node truncates names at embedded NUL可能已有人在做 @Yi-111-a 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
HigherOrderCO/Bend#1449 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 88/100
FujiNetWIFI/fujinet-firmware#1872 ·
维护者通常 1 天内回复
-
bug C/C++ code
难度 2/5 1-3 小时 新手友好度 70/100
webarkit/WebARKitLib#84 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
obsproject/obs-studio#14013 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
es-ude/OnDeviceTraining#488 ·
维护者通常 1 天内回复