apache / apache/pulsar-client-cpp

[Bug] subscribeAsync and createProducerAsync return UnknownErrorCode when built using devtoolset-11

未关闭
#255 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
71
派生
90
平均合并
2 小时 33 分钟
30 天内合并 PR
3

描述

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar-client-cpp/issues) and found nothing similar.

### Version

OS: CentOS 7
Pulsar C++ client: 3.1.2

### Minimal reproduce step

1. Install gcc 11.
```
yum install devtoolset-11
. /opt/rh/devtoolset-11/enable
```

2. Install the same dependencies as this Dockerfile:
https://github.com/apache/pulsar-client-cpp/blob/v3.1.2/pkg/rpm/Dockerfile

3. Build rpm using this spec file:
https://github.com/apache/pulsar-client-cpp/blob/v3.1.2/pkg/rpm/SPECS/pulsar-client.spec

4. Install pulsar client library.
```
rpm -ivh apache-pulsar-client*.rpm
```

### What did you expect to see?

#subscribeAsync and #createProducerAsync return ResultOk.

### What did you see instead?

#subscribeAsync and #createProducerAsync return UnknownErrorCode.
When I tried to output the value of return value, it returned unexpected values like 1915086316.

### Anything else?

When built using gcc-toolset-11 on Rocky Linux 8, #subscribeAsync and #createProducerAsync return ResultOk.

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

贡献指南

打开贡献指南

调研方向

使用 pkg/rpm/Dockerfile 和 pkg/rpm/SPECS/pulsar-client.spec,在使用 devtoolset-11 的 CentOS 7 上复现该问题。跟踪 subscribeAsync 和 createProducerAsync,以确定它们返回的值为何会变成 UnknownErrorCode,然后验证在报告的构建中两者都返回带有有效值的 ResultOk。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp, linux
领域
api
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。