2

I am getting build errors when trying to build Nginx with Wurfl. I am running in a Centos7 VM, combining nginx with other modules and specifying other flags doesn't seem to be causing any problems for me. However when I try to bundle with the wurfl module it fails. It gives errors such as:

            -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()

I am trying to build with the latest stable nginx, and a pulled wurfl from yesterday, and gcc 5.3.1. I am more or less using the generic build script provided by WURFL.

Anyone have any thoughts?

halfer
  • 19,824
  • 17
  • 99
  • 186
DamnedNForsaken
  • 494
  • 1
  • 6
  • 14

1 Answers1

0

So there are a couple of components to the WURFL module and it looks like the issue could be a mismatch on the different components. I would make sure that your libwurfl and wurfl infuze version numbers are the same (the latest version is 1.8.4). Check out the first section of the documentation for more information on how to install libwurfl.

Next I would make sure that your nginx.conf file is appropriate for the version of wurfl you are using. There have been some big changes in the last few versionsof wurfl that may affect how it performs. You can check the documentation for an example configuration file for the latest version of wurfl. If you are using an older version, you can check the readme provided with the release.

If fixing these doesn't help, let me know what infuze version number you are working with so I can try to replicate your issue.

D. Gu
  • 16
  • 2
  • 1
    libwurfl-1.8.4.2-x86_64.rpm and nginx-mod_wurfl-1.8.4.1.tar These were pulled yesterday. I don't think that has to deal with the nginx.conf as I am at this point just trying to run the build script/make install to rebuild nginx from source. Yes any help would be much appreciated! Thanks. – DamnedNForsaken May 23 '17 at 21:30
  • I tried installing the wurfl mod witht the versions you provided and the installation went fine. The errors were reproducible however when an older libwurfl version was used (1.5.0). This leads me to believe that you have an older libwurfl on your system and it is included before the correct `/usr/include/wurfl/wurfl.h` of 1.8.4.2. Try looking for the old wurfl.h and getting rid of it. – D. Gu May 24 '17 at 15:08
  • 1
    This was exactly the problem!! :) Thank you so much D. Gu! Way back in the installation console output there was output about how libwurfl~1.5 was conflicted with newer ~1.8 libwurfl and so ~1.8 wouldn't install... always rpm issues.. when will i learn. Again this was exactly the issue, so I yum -y remove libwurfl and then the install script yum -y install "new libwurfl" and it built just fine Yay, thxs D. Gu – DamnedNForsaken May 24 '17 at 19:17