You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/07/12 19:47:05 UTC

[GitHub] [pulsar] mediocregopher opened a new issue #4720: Compilation errors in `pulsar-client-cpp`

mediocregopher opened a new issue #4720: Compilation errors in `pulsar-client-cpp`
URL: https://github.com/apache/pulsar/issues/4720
 
 
   **Describe the bug**
   When attempting to compile `pulsar-client-cpp`, I get these compilation errors:
   
   ```
   [  7%] Building CXX object lib/CMakeFiles/pulsarStatic.dir/CompressionCodecSnappy.cc.o                                                                                                                                                         
   /home/mediocregopher/src/pulsar/pulsar-client-cpp/lib/CompressionCodecSnappy.cc: In member function ‘virtual pulsar::SharedBuffer pulsar::CompressionCodecSnappy::encode(const pulsar::SharedBuffer&)’:                                     
   /home/mediocregopher/src/pulsar/pulsar-client-cpp/lib/CompressionCodecSnappy.cc:38:59: error: ‘res’ was not declared in this scope
      38 |         LOG_ERROR("Failed to compress to snappy. res=" << res);
         |                                                           ^~~
   /home/mediocregopher/src/pulsar/pulsar-client-cpp/lib/CompressionCodecSnappy.cc:38:9: error: ‘LOG_ERROR’ was not declared in this scope; did you mean ‘SO_ERROR’?
      38 |         LOG_ERROR("Failed to compress to snappy. res=" << res);
         |         ^~~~~~~~~
         |         SO_ERROR
   /home/mediocregopher/src/pulsar/pulsar-client-cpp/lib/CompressionCodecSnappy.cc: In member function ‘virtual bool pulsar::CompressionCodecSnappy::decode(const pulsar::SharedBuffer&, uint32_t, pulsar::SharedBuffer&)’:
   /home/mediocregopher/src/pulsar/pulsar-client-cpp/lib/CompressionCodecSnappy.cc:52:74: error: invalid conversion from ‘uint32_t’ {aka ‘unsigned int’} to ‘size_t*’ {aka ‘long unsigned int*’} [-fpermissive]
      52 |                                              decompressed.mutableData(), uncompressedSize);
         |                                                                          ^~~~~~~~~~~~~~~~
         |                                                                          |
         |                                                                          uint32_t {aka unsigned int}
   In file included from /home/mediocregopher/src/pulsar/pulsar-client-cpp/lib/CompressionCodecSnappy.cc:23:
   /usr/include/snappy-c.h:106:41: note:   initializing argument 4 of ‘snappy_status snappy_uncompress(const char*, size_t, char*, size_t*)’
     106 |                                 size_t* uncompressed_length);
         |                                 ~~~~~~~~^~~~~~~~~~~~~~~~~~~
   ```
   
   **To Reproduce**
   Steps to reproduce the behavior:
   ```
   git clone https://github.com/apache/pulsar.git
   # git checkout v2.4.0 (optional)
   cd pulsar/pulsar-client-cpp
   cmake .
   make
   ```
   As shown, this happens on both the `v2.4.0` tag and `master`
   
   **Expected behavior**
   The build successfully finishes.
   
   **Desktop (please complete the following information):**
   ```
    ~ :: uname -a
   Linux very-cool-thinkpad 5.1.16-arch1-1-ARCH #1 SMP PREEMPT Wed Jul 3 20:23:07 UTC 2019 x86_64 GNU/Linux
   
    ~ :: pacman -Q | grep boost
   boost 1.69.0-2
   boost-libs 1.69.0-2
   
    ~ :: pacman -Q | grep proto
   protobuf 3.7.0-1
   
    ~ :: pacman -Q | grep log4cxx
   log4cxx 0.10.0-4
   
    ~ :: pacman -Q | grep curl
   curl 7.65.1-3
   libcurl-compat 7.65.1-1
   
    ~ :: pacman -Q | grep gtest
   gtest 1.8.1-3
   
    ~ :: pacman -Q | grep jsoncpp
   jsoncpp 1.8.4-2
   
    ~ :: pacman -Q | grep clang
   clang 8.0.0-4
   
    ~ :: pacman -Q | grep glibc
   glibc 2.29-3
   ```
   
   **Additional context**
   I am able to build the library files using the `docker-build.sh` script, but the built files aren't usable on my system because they are not statically compiled, and the versions of libraries they link to are different.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services