In file included from mod_shib_20.cpp:68:
mod_shib.cpp:118: warning: deprecated conversion from string constant to ‘char*‘
mod_shib.cpp: In member function ‘virtual const char* ShibTargetApache::getScheme() const‘:
mod_shib.cpp:385: error: ‘ap_http_method‘ was not declared in this scope
mod_shib.cpp: In member function ‘virtual std::string ShibTargetApache::getRemoteAddr() const‘:
mod_shib.cpp:417: error: ‘struct conn_rec‘ has no member named ‘remote_ip‘
In file included from mod_shib_20.cpp:68:
mod_shib.cpp: In function ‘int shib_post_read(request_rec*)‘:
mod_shib.cpp:681: warning: unused variable ‘rc‘
mod_shib.cpp: In member function ‘virtual shibsp::AccessControl::aclresult_t htAccessControl::authorized(const shibsp::SPRequest&, const shibsp::Session*) const‘:
mod_shib.cpp:1221: error: ‘ap_requires‘ was not declared in this scope
安装shibboleth-sp时一直报这个错。搞了好几天,查谷歌。百度都没找到解决的方法
无奈之下,从源代码下手,去找原因,
从谷歌得知这个问题是apache中include目录下的httpd.h没有ap_http_method这种方法
于是我搜索apache的源代码。从change文件中找到了原因,原来http2.2.14中ap_http_method已经被ap_http_scheme替代
这样写的:
ap_http_scheme() replaced with ap_http_method() - this function
returns the scheme (http v.s. https)
最终找到问题所在,看来shibboleth-sp-2.5.3源代码包是有bug的,然后打开源代码包中的mod_shib.cpp文件把
return m_sc->szScheme ?
m_sc->szScheme :
ap_http_scheme(m_req);
改为
return m_sc->szScheme ? m_sc->szScheme :
ap_http_scheme(m_req);
再次编译,问题解决了!!!
版权声明:本文博主原创文章,博客,未经同意不得转载。