WURFL nginx 构建错误



我在尝试使用 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提供的通用构建脚本。

有人有什么想法吗?

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

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

如果解决这些问题没有帮助,请让我知道您正在使用的引信版本号,以便我可以尝试复制您的问题。

最新更新