apache / apache/pulsar-client-cpp

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

未關閉
#255 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
C++
星號
71
分支
91
平均合併
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!

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

使用 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 摘要。