mofeneh619 发表于 2020-8-12 09:26:32

请教编译memcached扩展过程报错,但是正常编译通有影响吗?

非lnmp.org安装,来这里请教一下

安装了gcc7和g++7,编译memcached扩展报warning和fatal,另一台机器试了下gcc g++ 4.8编译通过无警告

fatal都是在libtest,请问这个可以不理它吗?还是说会产生其他影响?

libhashkit/jenkins.cc:230:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
   case 12: c+=((uint32_t)k)<<24;
            ~^~~~~~~~~~~~~~~~~~~~~~~
......
libmemcached/io.cc:278:26: warning: this statement may fall through [-Wimplicit-fallthrough=]
       memcached_set_error(*instance, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, memcached_literal_param("RLIMIT_NOFILE exceeded, or if OSX the timeout value was invalid"));
......

./libtest/thread.hpp: In destructor 'libtest::thread::Mutex::~Mutex()':
./libtest/thread.hpp:59:93: warning: throw will always call terminate() [-Wterminate]
       throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_cond_destroy: %s", strerror(_err));
                                                                                             ^
./libtest/thread.hpp:59:93: note: in C++11 destructors default to noexcept
./libtest/thread.hpp: In destructor 'libtest::thread::ScopedLock::~ScopedLock()':
./libtest/thread.hpp:92:92: warning: throw will always call terminate() [-Wterminate]
       throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_mutex_unlock: %s", strerror(err));
                                                                                          ^
./libtest/thread.hpp:92:92: note: in C++11 destructors default to noexcept
./libtest/thread.hpp: In destructor 'libtest::thread::Condition::~Condition()':
./libtest/thread.hpp:132:92: warning: throw will always call terminate() [-Wterminate]
       throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_cond_destroy: %s", strerror(err));
......

这是lnmp包的memcached2.php测试结果:
Use PHP Memcached extension.<br />Memcached Server version:1.6.6<br />Get key1 value: This is first value<br />Get key1 value: This is replace value<br />Get key2 value: Array
(
    => aaa
    => bbb
    => ccc
    => ddd
)
<br />Get key1 value: <br />Get key2 value: <br />Memcached Test tools for <a href="https://lnmp.org" target="_blank">LNMP一键安装包</a> <a href="https://bbs.vpser.net/forum-25-1.html" target="_blank">LNMP支持论坛</a>

licess 发表于 2020-8-12 10:49:05

只要是编译成功了就是成功了,过程中的警告之类的信息无影响
页: [1]
查看完整版本: 请教编译memcached扩展过程报错,但是正常编译通有影响吗?