【问题标题】:wurfl nginx build errorswurfl nginx 构建错误
【发布时间】:2017-05-23 19:28:34
【问题描述】:

我在尝试使用 Wurfl 构建 Nginx 时遇到构建错误。我在 Centos7 VM 中运行,将 nginx 与其他模块组合并指定其他标志似乎不会对我造成任何问题。但是,当我尝试与 wurfl 模块捆绑时,它失败了。它给出的错误如下:

            -o objs/addon/src/ngx_http_wurfl_module.o \
        ../src/ngx_http_wurfl_module.c
../src/ngx_http_wurfl_module.c:63:5: error: unknown type name ‘wurfl_useragent_priority’
     wurfl_useragent_priority useragent_priority;
     ^
../src/ngx_http_wurfl_module.c:86:15: error: ‘WURFL_UPDATER_FREQ_DAILY’ undeclared here (not in a function)
     {"DAILY", WURFL_UPDATER_FREQ_DAILY},
               ^
../src/ngx_http_wurfl_module.c:86:5: error: missing initializer for field ‘value’ of ‘nginx_wurfl_updater_frequency_t {aka const struct <anonymous>}’ [-Werror=missing-field-initializers]
     {"DAILY", WURFL_UPDATER_FREQ_DAILY},
     ^
../src/ngx_http_wurfl_module.c:82:15: note: ‘value’ declared here
     const int value;
               ^
../src/ngx_http_wurfl_module.c:87:16: error: ‘WURFL_UPDATER_FREQ_WEEKLY’ undeclared here (not in a function)
     {"WEEKLY", WURFL_UPDATER_FREQ_WEEKLY},
                ^
../src/ngx_http_wurfl_module.c:87:5: error: missing initializer for field ‘value’ of ‘nginx_wurfl_updater_frequency_t {aka const struct <anonymous>}’ [-Werror=missing-field-initializers]
     {"WEEKLY", WURFL_UPDATER_FREQ_WEEKLY},
     ^
../src/ngx_http_wurfl_module.c:82:15: note: ‘value’ declared here
     const int value;
               ^
In file included from src/core/ngx_core.h:58:0,
                 from ../src/ngx_http_wurfl_module.c:22:
../src/ngx_http_wurfl_module.c: In function ‘ngx_http_wurfl_init_main_conf’:
../src/ngx_http_wurfl_module.c:694:93: error: implicit declaration of function ‘wurfl_get_api_version’ [-Werror=implicit-function-declaration]
         ngx_log_error(NGX_LOG_NOTICE, cf->log, 0, "WURFL: Engine created - API version %s", wurfl_get_api_version()

我正在尝试使用最新的稳定 nginx、昨天拉的 wurfl 和 gcc 5.3.1 进行构建。我或多或少在使用 WURFL 提供的通用构建脚本。

有人有什么想法吗?

【问题讨论】:

    标签: c++ nginx makefile wurfl


    【解决方案1】:

    因此,WURFL 模块有几个组件,看起来问题可能是不同组件上的不匹配。我会确保您的 libwurfl 和 wurfl infuze 版本号相同(最新版本是 1.8.4)。查看documentation 的第一部分,了解有关如何安装 libwurfl 的更多信息。

    接下来,我将确保您的 nginx.conf 文件适合您使用的 wurfl 版本。 wurfl 的最后几个版本发生了一些重大变化,可能会影响其性能。您可以查看documentation 以获取最新版本 wurfl 的示例配置文件。如果您使用的是旧版本,您可以查看随发行版提供的自述文件。

    如果修复这些问题没有帮助,请告诉我您正在使用的 infuze 版本号,以便我可以尝试复制您的问题。

    【讨论】:

    • libwurfl-1.8.4.2-x86_64.rpm 和 nginx-mod_wurfl-1.8.4.1.tar 这些是昨天拉的。我认为不必处理 nginx.conf,因为此时我只是尝试运行构建脚本/make install 以从源代码重建 nginx。是的,任何帮助将不胜感激!谢谢。
    • 我尝试使用您提供的版本安装 wurfl mod,并且安装顺利。但是,当使用较旧的 libwurfl 版本 (1.5.0) 时,这些错误是可重现的。这让我相信您的系统上有一个较旧的 libwurfl,它包含在正确的 /usr/include/wurfl/wurfl.h 的 1.8.4.2 之前。尝试寻找旧的 wurfl.h 并删除它。
    • 这正是问题所在! :) 非常感谢 D. Gu!回到安装控制台输出中,有关于 libwurfl~1.5 如何与较新的~1.8 libwurfl 冲突的输出,所以~1.8 不会安装...总是 rpm 问题..我什么时候学习。再次,这正是问题所在,所以我 yum -y remove libwurfl 然后安装脚本 yum -y install "new libwurfl" 它构建得很好耶,谢谢 D. Gu
    猜你喜欢
    • 2013-02-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多