rocketmq-client-cpp icon indicating copy to clipboard operation
rocketmq-client-cpp copied to clipboard

[ISSUE #194] Fix build error on aarch64/arm platform

Open yg0x01 opened this issue 5 years ago • 2 comments

What is the purpose of the change

Fix build error on aarch64 platform

Brief changelog

The build.sh runs failed on arm64. I checked and fix some error, add some judgement logic on the point which could failed on arm64.

  1. In CmakeList.txt there is -m32 and -m64 option for compile, but for arm64 this params should not exist. I add an option named BUILD_FOR_ARM and when it is ON there will no -m32/64 parameter which lead build error on arm. In build.sh we should add this option when detect arm platform.
  2. Old openssl-1.1.1d build failed on arm, but 1.1.1i version fix the error, so we should update openssl version for arm.
  3. Jsoncpp copy .a from x86_64-linux-gnu folder, but on arm it should be aarch64-linux-gnu.
  4. Boost b2 tool have a option architecture for build arm. When we build from arm we should add it.

Verifying this change

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

  • [x] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • [x] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when a cross-module dependency exists.
  • [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

yg0x01 avatar Dec 26 '20 10:12 yg0x01

What other problems are there at the moment? It is still necessary for some users to use it on a Mac arm.

leizhiyuan avatar Jan 04 '24 07:01 leizhiyuan

now arm may be arm64
image

leizhiyuan avatar Jan 04 '24 09:01 leizhiyuan