pulsar: Release procedure: Building OSX packages is broken, at least in 2.9.1

Describe the bug

Building OSX packages is broken, at least in 2.9.1 https://github.com/apache/pulsar/wiki/Release-process

To Reproduce

cd pulsar-client-cpp/python/pkg/osx/
$ ./generate-all-wheel.sh v2.9.1

Error

default: [  2%] Building CXX object lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/AckGroupingTrackerDisabled.cc.o
default: [  2%] Building CXX object lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/BatchMessageContainer.cc.o
default: [  2%] Building CXX object lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/AckGroupingTrackerEnabled.cc.o
default: [  4%] Building CXX object lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/Backoff.cc.o
default: [  4%] Building CXX object lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/Authentication.cc.o
default: [  5%] Building CXX object lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/BatchAcknowledgementTracker.cc.o
default: 
default: error
default: : 
default: 
default: unknown warning option '-Werror=cpp' [-Werror,-Wunknown-warning-option]
default: 
default: make[3]: 
default: *** [lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/AckGroupingTracker.cc.o] Error 1
default: make[3]: 
default: *** Waiting for unfinished jobs....
default: error: unknown warning option '-Werror=cpp' [-Werror,-Wunknown-warning-option]
default: make[3]: 
default: *** [lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/AckGroupingTrackerDisabled.cc.o] Error 1
default: error: unknown warning option '-Werror=cpp' [-Werror,-Wunknown-warning-option]
default: make[3]: 
default: *** [lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/BatchMessageContainer.cc.o] Error 1
default: error: unknown warning option '-Werror=cpp' [-Werror,-Wunknown-warning-option]
default: make[3]: 
default: *** [lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/BatchAcknowledgementTracker.cc.o] Error 1
default: error: unknown warning option '-Werror=cpp' [-Werror,-Wunknown-warning-option]
default: make[3]: 
default: *** [lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/Backoff.cc.o] Error 1
default: error: unknown warning option '-Werror=cpp' [-Werror,-Wunknown-warning-option]
default: error: unknown warning option '-Werror=cpp' [-Werror,-Wunknown-warning-option]
default: make[3]: 
default: *** [lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/Authentication.cc.o] Error 1
default: make[3]: *** [lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/AckGroupingTrackerEnabled.cc.o] Error 1
default: [  7%] Building CXX object lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/BatchMessageContainerBase.cc.o
default: error: unknown warning option '-Werror=cpp' [-Werror,-Wunknown-warning-option]
default: make[3]: *** [lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/BatchMessageContainerBase.cc.o] Error 1
default: make[2]: *** [lib/CMakeFiles/PULSAR_OBJECT_LIB.dir/all] Error 2
default: make[1]: *** [python/CMakeFiles/_pulsar.dir/rule] Error 2
default: make: *** [_pulsar] Error 2

The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 21 (19 by maintainers)

Most upvoted comments

See https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html for reference.

-Werror= makes the specified warning into an error, while -Wno-error= is used to negate -Werror= for specified warning.

If you can modify the CMakeLists.txt, maybe a quickest way is to remove the -Werror option, which makes all warnings into errors.

Hi all,

I think this may be due to my change to enable warnings as errors in the c++ client. I tested on GCC, Clang, and Visual Studio… but I don’t have a Mac to test with and I’m guessing the OSX compiler is different (not sure what AppleClang is… I have zero experience with macs). The error message states that it doesn’t know the option -Werror=cpp. I think if you simply strip that flag out of from the CMakeLists.txt file, this will go away for you.

Ideally we’d add another branch for AppleClang that has the proper flag so that this works, because warnings as errors is a valuable tool for hardening any C++ code base. Although given the range of compliers y’all need to support, maybe it’s more trouble than it’s worth… my experience is mostly with big commercial code bases where there’s only one or two compilers that need to be supported.

Sorry for the inconvenience here!