question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

C++ client support for arm64 (like Raspberry Pi)

See original GitHub issue

Is your feature request related to a problem? Please describe. I was trying to build it for Raspberry Pi so that client libraries can be built/ran on Pi. It failed. Error messages are attached below. Looks like we have very specific dependency on some CPU flags like msse4.2 -mpclmul

Describe the solution you’d like Can we have a client library for Raspberry Pi

Describe alternatives you’ve considered None

Additional context I was compiling it inside a docker. Error message as follows


root@pulsar-client-cpp-lib:/code/pulsar/pulsar-client-cpp# make  -j4
[  0%] Building CXX object lib/CMakeFiles/pulsarShared.dir/Authentication.cc.o
[  0%] Building CXX object lib/CMakeFiles/pulsarShared.dir/BatchAcknowledgementTracker.cc.o
c++: error: unrecognized command line option '-msse4.2'
[  1%] Building CXX object lib/CMakeFiles/pulsarShared.dir/Backoff.cc.o
c++: error: unrecognized command line option '-mpclmul'
c++: error: unrecognized command line option '-msse4.2'
lib/CMakeFiles/pulsarShared.dir/build.make:69: recipe for target 'lib/CMakeFiles/pulsarShared.dir/Authentication.cc.o' failed
make[2]: *** [lib/CMakeFiles/pulsarShared.dir/Authentication.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
c++: error: unrecognized command line option '-mpclmul'
lib/CMakeFiles/pulsarShared.dir/build.make:117: recipe for target 'lib/CMakeFiles/pulsarShared.dir/BatchAcknowledgementTracker.cc.o' failed
make[2]: *** [lib/CMakeFiles/pulsarShared.dir/BatchAcknowledgementTracker.cc.o] Error 1
c++: error: unrecognized command line option '-msse4.2'
c++: error: unrecognized command line option '-mpclmul'
[  2%] Building CXX object lib/CMakeFiles/pulsarStatic.dir/Authentication.cc.o
lib/CMakeFiles/pulsarShared.dir/build.make:93: recipe for target 'lib/CMakeFiles/pulsarShared.dir/Backoff.cc.o' failed
make[2]: *** [lib/CMakeFiles/pulsarShared.dir/Backoff.cc.o] Error 1
CMakeFiles/Makefile2:151: recipe for target 'lib/CMakeFiles/pulsarShared.dir/all' failed
make[1]: *** [lib/CMakeFiles/pulsarShared.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
c++: error: unrecognized command line option '-msse4.2'
c++: error: unrecognized command line option '-mpclmul'
lib/CMakeFiles/pulsarStatic.dir/build.make:69: recipe for target 'lib/CMakeFiles/pulsarStatic.dir/Authentication.cc.o' failed
make[2]: *** [lib/CMakeFiles/pulsarStatic.dir/Authentication.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[  3%] Building CXX object lib/CMakeFiles/pulsarStatic.dir/BatchAcknowledgementTracker.cc.o
[  3%] Building CXX object lib/CMakeFiles/pulsarStatic.dir/Backoff.cc.o
[  3%] Building CXX object lib/CMakeFiles/pulsarStatic.dir/BatchMessageContainer.cc.o
c++: error: unrecognized command line option '-msse4.2'
c++: error: unrecognized command line option '-mpclmul'
lib/CMakeFiles/pulsarStatic.dir/build.make:117: recipe for target 'lib/CMakeFiles/pulsarStatic.dir/BatchAcknowledgementTracker.cc.o' failed
make[2]: *** [lib/CMakeFiles/pulsarStatic.dir/BatchAcknowledgementTracker.cc.o] Error 1
c++: error: unrecognized command line option '-msse4.2'
c++: error: unrecognized command line option '-mpclmul'
lib/CMakeFiles/pulsarStatic.dir/build.make:93: recipe for target 'lib/CMakeFiles/pulsarStatic.dir/Backoff.cc.o' failed
make[2]: *** [lib/CMakeFiles/pulsarStatic.dir/Backoff.cc.o] Error 1
c++: error: unrecognized command line option '-msse4.2'
c++: error: unrecognized command line option '-mpclmul'
lib/CMakeFiles/pulsarStatic.dir/build.make:141: recipe for target 'lib/CMakeFiles/pulsarStatic.dir/BatchMessageContainer.cc.o' failed
make[2]: *** [lib/CMakeFiles/pulsarStatic.dir/BatchMessageContainer.cc.o] Error 1
CMakeFiles/Makefile2:188: recipe for target 'lib/CMakeFiles/pulsarStatic.dir/all' failed
make[1]: *** [lib/CMakeFiles/pulsarStatic.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
root@pulsar-client-cpp-lib:/code/pulsar/pulsar-client-cpp# 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
sekarpdktcommented, Apr 22, 2019

I am able to successfully compile it with following changes.

  1. Removed crc32c_sse42.cc and crc32c_sse42.h from lib/checksum directory
  2. Modified ChecksumProvider.cc and crc32c_sw.cc to remove references to above two files. Modified files are attached.
  3. Disabled BUILD_TEST thru cmake . -DBUILD_TESTS=OFF

Not sure how to configure a switch for the same.

ChecksumProvider.cc.txt crc32c_sw.cc.txt

1reaction
tspannhwcommented, Feb 10, 2022

I have made it work. I disabled tests and examples for the build. see my info and compiled executable. This is on a RPI4. https://github.com/tspannhw/PulsarOnRaspberryPi

Read more comments on GitHub >

github_iconTop Results From Across the Web

Raspberry Pi Alternatives: 14 Best Single Board Computers in ...
Best Raspberry Pi Alternative: Rock Pi 4 Model C ($59.00) ... Targeted at gaming applications, as it supports multiple displays ...
Read more >
Visual Studio Code C++ Extension: ARM and ARM64 support
The latest release of the Visual Studio Code C++ extension brings C++ IntelliSense and build support for Windows ARM64, Linux ARM and Linux...
Read more >
Nextcloud alternatives - RaspberryPI4 - arm64 | Blogs
What is the alternative to Nextcloud on RaspberryPI4 (arm64)?
Read more >
Conflicts with 64 bit - Raspberry Pi Forums
Love the performance improvements with the new 64bit OS. I have run into two problems so far. Both cases are a lack of...
Read more >
Build TensorFlow Lite for ARM boards
Cross-compilation for ARM with Bazel ; armhf (ARM32), --config=elinux_armhf, RPI3, RPI4 with 32 bit Raspberry Pi OS ; AArch64 (ARM64), --config= ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found