You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: libmemcached 1.0.18
Operating System: Amazon Linux 2023
Issue Summary
I encountered a compilation error while trying to build libmemcached version 1.0.18. The error arises in the clients/memflush.cc file when comparing a pointer (opt_servers) to an integer (false), which is not permitted in ISO C++.
Steps to Reproduce
Clone the libmemcached repository or download the libmemcached-1.0.18 tarball.
Navigate to the source directory.
Run the following commands to configure and build:
./configure --enable-tls --with-openssl
make
Observe the compilation error.
Compilation Error
Here is the specific error message that was output during the build process:
CXX clients/memflush.o
clients/memflush.cc: In function ‘int main(int, char**)’:
clients/memflush.cc:42:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
42 | if (opt_servers == false)
| ~~~~~~~~~~~~^~~~~~~~
clients/memflush.cc:51:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
51 | if (opt_servers == false)
| ~~~~~~~~~~~~^~~~~~~~
make[1]: *** [Makefile:5832: clients/memflush.o] Error 1
Proposed Solution
The comparisons involving opt_servers should be modified to check against nullptr instead of false.
For example, changing:
if (opt_servers == false)
to:
if (opt_servers == NULL)
would resolve the compilation error.
Additional Information
I have verified that all required dependencies are installed.
This issue seems to stem from the handling of pointer types in the codebase.
Thank you for your attention to this matter. I look forward to any updates or solutions you might have regarding this issue.
The text was updated successfully, but these errors were encountered:
Description
Version: libmemcached 1.0.18
Operating System: Amazon Linux 2023
Issue Summary
I encountered a compilation error while trying to build libmemcached version 1.0.18. The error arises in the clients/memflush.cc file when comparing a pointer (opt_servers) to an integer (false), which is not permitted in ISO C++.
Steps to Reproduce
Clone the libmemcached repository or download the libmemcached-1.0.18 tarball.
Navigate to the source directory.
Run the following commands to configure and build:
./configure --enable-tls --with-openssl
make
Observe the compilation error.
Compilation Error
Here is the specific error message that was output during the build process:
CXX clients/memflush.o
clients/memflush.cc: In function ‘int main(int, char**)’:
clients/memflush.cc:42:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
42 | if (opt_servers == false)
| ~~~~~~~~~~~~^~~~~~~~
clients/memflush.cc:51:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
51 | if (opt_servers == false)
| ~~~~~~~~~~~~^~~~~~~~
make[1]: *** [Makefile:5832: clients/memflush.o] Error 1
Proposed Solution
The comparisons involving opt_servers should be modified to check against nullptr instead of false.
For example, changing:
if (opt_servers == false)
to:
if (opt_servers == NULL)
would resolve the compilation error.
Additional Information
I have verified that all required dependencies are installed.
This issue seems to stem from the handling of pointer types in the codebase.
Thank you for your attention to this matter. I look forward to any updates or solutions you might have regarding this issue.
The text was updated successfully, but these errors were encountered: