openvenues / jpostal

Java/JNI bindings to libpostal for for fast international street address parsing/normalization
MIT License
105 stars 42 forks source link

error: request for member 'language' in something not a structure or union #35

Open Karin-Basis opened 5 years ago

Karin-Basis commented 5 years ago

Hi! Thanks for creating jpostal. I've built and successfully used it twice on both Mac and Linux machines, but now I'm trying to install it on a Docker container (https://hub.docker.com/r/scpike/libpostal-docker) and keep getting this error when I run "gradlew assemble":

jpostal_AddressParser.c: In function 'Java_com_mapzen_jpostal_AddressParser_setupDataDir': jpostal_AddressParser.c:18:10: warning: implicit declaration of function 'libpostal_setup_datadir' [-Wimplicit-function-declaration] if (!libpostal_setup_datadir((char )datadir) || !libpostal_setup_parser_datadir((char )datadir)) { ^ jpostal_AddressParser.c:18:55: warning: implicit declaration of function 'libpostal_setup_parser_datadir' [-Wimplicit-function-declaration] if (!libpostal_setup_datadir((char )datadir) || !libpostal_setup_parser_datadir((char )datadir)) { ^ jpostal_AddressParser.c: In function 'Java_com_mapzen_jpostal_AddressParser_libpostalParse': jpostal_AddressParser.c:31:5: error: unknown type name 'libpostal_address_parser_options_t' libpostal_address_parser_options_t options = libpostal_get_address_parser_default_options(); ^ jpostal_AddressParser.c:31:50: warning: implicit declaration of function 'libpostal_get_address_parser_default_options' [-Wimplicit-function-declaration] libpostal_address_parser_options_t options = libpostal_get_address_parser_default_options(); ^ jpostal_AddressParser.c:45:16: error: request for member 'language' in something not a structure or union options.language = (char )(env)->GetStringUTFChars(env, jLanguage, 0); ^ jpostal_AddressParser.c:56:16: error: request for member 'country' in something not a structure or union options.country = (char )(env)->GetStringUTFChars(env, jCountry, 0);

My gcc version is 5.3.1.