Repository navigation
fix(build): make cmake --install produce a usable SDK - #40
Merged
Merged
Conversation
Antruly
added a commit
that referenced
this pull request
Oct 19, 2026
- `CMakeLists.txt` 在 install 段前插入 61 行、pkg-config 段前再插入 6 行, 被引区间整体 +61/+67;`uvcpp_http_client.cpp` 的助手与新读循环让它后段 +8/+20/+91/+148;`uvcpp_http_client.h` 的两处参数说明 +2。 按 check_doc_lines.py --update 的 [移] 报告逐条改文档正文后刷新锁。 - `doc/web-http-guide.md`「三个容易写错的地方」第三节/第四节原本描述的是 修复前的行为(timeout 仅 Windows、失败交默认 200 OK),改写为现在的语义 (两个平台都设、每次 I/O 超时、失败返回 NONE 与负错误码)。 - 同页两处裸/歧义引用人工定到正确目标:`set_keep_alive` 声明改指 `uvcpp_http_client.h:242`;`doc/http2-status.md` 的 `set_http2_enabled` 声明改指 `.h:307`;`RELEASE.md` 的 `CMakeLists.txt:3099-3518` 随插入 改为 `3099-3579`。
Three gaps made an installed prefix unusable even though a release zip built by package_release.py worked: * shared FetchContent dependencies (llhttp) were not installed, so the installed libuvcpp.so had a DT_NEEDED entry nothing in the prefix satisfied (STATUS_DLL_NOT_FOUND on Windows); * installed shared libraries had no RPATH, so even a copied dependency in the same lib/ directory was not found; * consumers of a libuv-from-source build had no include path for <uv.h>. Install shared dependency targets, set INSTALL_RPATH to $ORIGIN/@loader_path, and expose include/libuv only when that directory is actually installed. Add the matching -I flag to uvcpp.pc for that configuration.
CMakeLists.txt 增加了 install 规则段,CMake 变量引用与内部 target 名移位,同步更新所有文档、脚本、workflow 中的行号引用。
Antruly
force-pushed
the
fix/install-complete
branch
from
October 20, 2026 02:57
0e57c31 to
1ca6f65
Compare
The callback posts the semaphore before the library runs finish_one(), so the main thread can wake while in_flight is still 1. This shows up reliably on Windows MSVC. Poll (bounded to 5s) until the counter reaches 0.
This was referenced Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
tests/tools/package_release.py手工组装的 release zip 可以使用,但从源码cmake --install --prefix X出来的前缀不行:libuvcpp.so的DT_NEEDED里有libllhttp.so.9.2,前缀里没有;ldd显示not found;libuvcpp.dll的导入表依赖libllhttp.dll,前缀bin/里没有,程序以0xC0000135(STATUS_DLL_NOT_FOUND)静默退出;lib/也找不到;include/libuv/,但公开头写的是#include <uv.h>,导出的 CMake target 没有把这个目录传给消费者。修改
SHARED_LIBRARYtarget(llhttp、zlib、libuv);install(TARGETS ...)会一并生成 SONAME 符号链接。uvcpp/uvcpp_s设置INSTALL_RPATH:Linux$ORIGIN,macOS@loader_path。include/libuv写进INTERFACE_INCLUDE_DIRECTORIES;系统 libuv 不安装这个目录,无条件写会让find_package在 generate 阶段报 “includes non-existent path”。uvcpp.pc的Cflags里补-I${includedir}/libuv。验证(Linux x64)
消费者:
配置、编译、运行通过:
建议
增加一个 CI 冒烟格:安装到临时前缀,配置并运行一个只包含
<uvcpp.h>、<net/uvcpp_tcp_client.h>的消费者。这样 install 规则和package_release.py两条路径不会再次漂移。兼容性