apache / apache/brpc

brpc作为子模块,cmake编译时error: 'z_stream' does not name a type

Open
#2,593 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

**Describe the bug (描述bug)**

`In file included from /root/MEVpp/third-party/brpc/src/brpc/policy/gzip_compress.h:23,
from /root/MEVpp/third-party/brpc/src/brpc/builtin/flot_min_js.cpp:21:
/root/vcpkg/installed/arm64-linux/include/google/protobuf/io/gzip_stream.h:95:3: error: 'z_stream' does not name a type
95 | z_stream zcontext_;
| ^~~~~~~~
/root/vcpkg/installed/arm64-linux/include/google/protobuf/io/gzip_stream.h: In member function 'const char* google::protobuf::io::GzipInputStream::ZlibErrorMessage() const':
/root/vcpkg/installed/arm64-linux/include/google/protobuf/io/gzip_stream.h:81:56: error: 'zcontext_' was not declared in this scope
81 | inline const char* ZlibErrorMessage() const { return zcontext_.msg; }
| ^~~~~~~~~
/root/vcpkg/installed/arm64-linux/include/google/protobuf/io/gzip_stream.h: At global scope:
/root/vcpkg/installed/arm64-linux/include/google/protobuf/io/gzip_stream.h:183:3: error: 'z_stream' does not name a type
183 | z_stream zcontext_;
| ^~~~~~~~
/root/vcpkg/installed/arm64-linux/include/google/protobuf/io/gzip_stream.h: In member function 'const char* google::protobuf::io::GzipOutputStream::ZlibErrorMessage() const':
/root/vcpkg/installed/arm64-linux/include/google/protobuf/io/gzip_stream.h:149:56: error: 'zcontext_' was not declared in this scope
149 | inline const char* ZlibErrorMessage() const { return zcontext_.msg; }
| ^~~~~~~~~
make[2]: *** [third-party/brpc/src/CMakeFiles/SOURCES_LIB.dir/build.make:678: third-party/brpc/src/CMakeFiles/SOURCES_LIB.dir/brpc/builtin/flot_min_js.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:380: third-party/brpc/src/CMakeFiles/SOURCES_LIB.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....`
**To Reproduce (复现方法)**
brpc作为子模块,vcpkg安装各个依赖(zip, protobuf, gflags, openssl)

**Expected behavior (期望行为)**

**Versions (各种版本)**
OS: Ubuntu 20.04 arm
Compiler: gcc12
brpc:1.8.0
protobuf: arm64-linux 3.21.12

**Additional context/screenshots (更多上下文/截图)**

![image](https://github.com/apache/brpc/assets/73780784/f1ad2bfc-6005-4bfa-b82f-1f9f99188b6d)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the CMake build described for brpc 1.8.0 as a submodule on Ubuntu 20.04 arm with the listed vcpkg dependencies. Inspect brpc/policy/gzip_compress.h, brpc/builtin/flot_min_js.cpp, and the included google/protobuf/io/gzip_stream.h around z_stream; done means the build completes without the reported z_stream errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, ubuntu
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.