尝试使用 Visual Studio 在 Windows 上构建 apr 1.7,尝试了 2017 年和 2013 年。
构建项目(调试|x86)或编译时,例如,dso.c如果收到以下错误消息:
1>dso.c
1>c:\dev\log4cxx\apr\include\arch\win32\apr_arch_misc.h(503): error C2143: syntax error: missing ')' before '*'
1>c:\dev\log4cxx\apr\include\arch\win32\apr_arch_misc.h(503): error C2143: syntax error: missing '{' before '*'
1>c:\dev\log4cxx\apr\include\arch\win32\apr_arch_misc.h(503): error C2059: syntax error: ')'
1>c:\dev\log4cxx\apr\include\arch\win32\apr_arch_misc.h(503): error C2061: syntax error: identifier 'apr_winapi_pfn_if_indextoname'
1>c:\dev\log4cxx\apr\include\arch\win32\apr_arch_misc.h(503): error C2059: syntax error: ';'
1>c:\dev\log4cxx\apr\include\arch\win32\apr_arch_misc.h(503): error C2513: ' ': no variable declared before '='
1>c:\dev\log4cxx\apr\include\arch\win32\apr_arch_misc.h(503): error C2065: 'apr_winapi_pfn_if_indextoname': undeclared identifier
1>c:\dev\log4cxx\apr\include\arch\win32\apr_arch_misc.h(503): warning C4047: '=': 'int' differs in levels of indirection from …Run Code Online (Sandbox Code Playgroud) 我正在运行一些软件并收到有关未找到 apr 的以下错误。我发现它不存在,那么就到了四月的文件夹,RAN./configure和./make和./make install。
它在/usr/local/apr/lib.
然后我创建了Tomcat日志中提到的文件夹:
/root/Kony/KonyServer/tomcat/instance1/bin/tomcat-native-1.1.29-src/jni/native/.libs
Run Code Online (Sandbox Code Playgroud)
并将文件复制到此处:
-rwxrwxrwx. 1 10848 10848 8351 Apr 13 19:35 apr.exp
-rwxrwxrwx. 1 10848 10848 1352604 Apr 13 19:35 libapr-1.a
-rwxrwxrwx. 1 10848 10848 826 Apr 13 19:35 libapr-1.la
-rwxrwxrwx. 1 10848 10848 736579 Apr 13 19:35 libapr-1.so
-rwxrwxrwx. 1 10848 10848 736579 Apr 13 19:35 libapr-1.so.0
-rwxrwxrwx. 1 10848 10848 736579 Apr 13 19:35 libapr-1.so.0.4.5
Run Code Online (Sandbox Code Playgroud)
我什至给了他们一个 777 口罩,所有者/小组与父母匹配。它仍然给我下面的错误。
Apr 13, 2015 7:46:42 PM org.apache.catalina.core.AprLifecycleListener init …Run Code Online (Sandbox Code Playgroud) 我真的很挣扎这个。我已经为 Windows 下载了以下每个 Apache APR 产品的最新版本:
我已经解压缩了 zip 文件并根据APR Windows 构建说明重命名了目录。然后我在 Visual Studio 2017 中打开apr-util/apr-util.dsw解决方案并执行所需的升级。当我构建时,我从apr-util/xml/xml.vcxproj项目中收到一堆关于缺少源文件的错误。我已经验证了xml项目引用的所有文件实际上都不存在于磁盘上(或在 zip 存档中)。这些文件也不存在于Linux 源代码下载中。此外,所有这些文件都存在于 APR-util v1.5.4 中。在我看来,这只剩下三种可能:
我已经根据预期的 MD5 哈希验证了我的apr-util下载,甚至尝试从其他镜像下载以消除 #1 的可能性。
这个版本的apr-util是在 2.5 个月前发布的,所以如果 #2 是这种情况,我希望它现在已经修复了。有没有其他人成功构建过这个版本的 Apache APR?
从未使用过boost的新手学生哪种方式更好?
当新标准到来时,答案将是显而易见的,但现在我有疑虑.Pro的提升是它更接近未来的标准.
我已经开始努力在torquebox(www.torquebox.org)上实现类似于mod_xsendfile的功能支持.Torquebox基本上是JBoss AS 7上的一堆代码,这使我的努力等同于使sendfile在JBoss AS 7上运行.
这里的主要问题可能是我对JBoss的困惑,但是在浪费了太多时间耗费我所有的谷歌搜索资源之后,我必须相信那里有人确实知道这个东西在AS 7中是如何工作的.
据我了解,JBoss通过使用JBoss Web本机连接器(http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-10)支持sendfile,即APR http连接器.
花了好几个小时没有在AS 7上安装这些,这看起来像其他人的魅力(https://community.jboss.org/message/614790),grep'ing我的本地JBoss目录告诉我,这些本机连接器是显然与AS 7捆绑在一起.在我的情况下,所需的dll被放入
%JBOSS_HOME%\模块\组织\ jboss的\作为\网络\主\ LIB\WIN-x86_64的
如此史诗般的失败,试图安装已经存在的东西.检查我的standalone.xml配置文件还会显示正在使用此本机连接器
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="false">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
Run Code Online (Sandbox Code Playgroud)
将所有日志记录级别切换为调试并检查日志会显示日志消息
standalone/log/server.log.2012-02-10:324:23:12:17,964 INFO [org.apache.coyote.http11.Http11AprProtocol](MSC服务主题1-5)在http-127.0上启动Coyote HTTP/1.1 .0.1-127.0.0.1-8080
其中Http11AprProtocol指示使用APR http连接器.但是,网上的很多帖子都提到还应该显示以下行:
org.apache.catalina.core.AprLifecycleListener init INFO:APR功能:IPv6 [true],sendfile [true],接受过滤器[false],random [true].
无论日志记录级别如何,AprLifecycleListener行都不会显示.
当我回顾一下,似乎APR http连接器现在正在使用中.
根据文档,我可以使用以下servlet
public class Sendfile extends HttpServlet {
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
if(Boolean.TRUE == request.getAttribute("org.apache.tomcat.sendfile.support")){
// Send all the files!!
}
else{ …Run Code Online (Sandbox Code Playgroud) 阅读Apache模块书,我在3.4.3部分中遇到了这个主张:
"第二个好处是在大多数平台上池分配比malloc更快!"
我意识到一个悬而未决的问题,但是......好吧,为什么?