Git Product home page Git Product logo

jpostal's Introduction

openvenues

Open information extraction project for indexing and normalizing real-world venue/POI information from across the Web. Can be used standalone to extract venues from individual websites, or on a full-fledged copy of the entire Internet using the Common Crawl.

Project layout

  • extract: the "easy way", extract structured (or at least semi-structured) address and geo data from HTML markup. Supports schema.org microdata, RDFa Lite, hcard, geotags, HTML5 <address> elements, OpenGraph and extracting url params from Google map embeds
  • jobs: Amazon Elastic Mapreduce jobs for extracting places from the Common Crawl (224TB or 3.6+ billion urls available on S3 as of August 2014, new crawls published periodically).

Notes

BeautifulSoup vs. lxml

The first version of the Common Crawl extraction job was written using lxml, a fast C library based on libxml2, for parsing. However, running said parser over billions of badly-encoded webpages revealed some bugs in lxml/libxml2 related to reading from uninitialized memory at the C level (see https://bugs.launchpad.net/lxml/+bug/1240696), which eats up all the system's memory and crashes the box. The bug occurs non-deterministically, so is hard to track down, but will occur, on different documents, if the job is run for long enough. Until there's a fix lxml won't be usable for this project. BeautifulSoup is a forgiving pure-Python regex-based "parser" designed for working with "tag soup". It's up to 100x slower than lxml, so we currently use a high-recall (not necessarily high-precision) regex to filter out documents that definitely don't contain the keywords we're looking for before committing to a full parse. With this filter, the job still completes in a reasonable amount of time using 100 8-core machines.

Coming up next:

  • Address extraction (find postal addresses in text)
  • Deduping and normalization of venue names, addresses and locations

jpostal's People

Contributors

albarrentine avatar ets avatar jaewoongchoi1 avatar kputnam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jpostal's Issues

./gradlew assemble

./gradlew assemble
:buildJniLib
libtoolize: putting auxiliary files in .'. libtoolize: copying file ./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, m4'. libtoolize: copying file m4/libtool.m4'
libtoolize: copying file m4/ltoptions.m4' libtoolize: copying file m4/ltsugar.m4'
libtoolize: copying file m4/ltversion.m4' libtoolize: copying file m4/lt~obsolete.m4'
configure.ac:11: installing './compile'
configure.ac:11: installing './config.guess'
configure.ac:11: installing './config.sub'
configure.ac:9: installing './install-sh'
configure.ac:9: installing './missing'
src/main/c/Makefile.am: installing './depcomp'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries...yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcj... no
checking for guavac... no
checking for jikes... no
configure: error: no acceptable Java compiler found in $PATH
checking for javac... no
make: *** No rule to make target `install'. Stop.

:buildJniLib FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':buildJniLib'.

Process 'command './build.sh'' finished with non-zero exit value 2

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 24.033 secs

gradlew check fail on :test

I followed the steps of installing libpostal and followed it with installing jpostal. Libpostal works via command line and the jpostal built successfully but the test :test failed when running "./gradlew check" per the readme.md. Below is the following output to the console and the log file is attached.

:test FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':test'.

    Process 'Gradle Test Executor 1' finished with non-zero exit value 134

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':test'.
    hs_err_pid80052.log.zip

./gradlew assemble fails due to missing file when the file clearly exists

I'm trying to build JPostal as described in this link using the following command:

./gradlew assemble

However, the command produces the following output claiming the file /../tcl-tea.m4 does not exist when it clearly does:

:buildJniLibaclocal-1.16: error: aclocal: file '/x/Program Files/Msys64/usr/share/aclocal/tcl-tea.m4' does not exist
autoreconf-2.71: error: aclocal failed with exit status: 1
./build.sh: line 3: ./configure: No such file or directory
make: *** No rule to make target 'install'.  Stop.
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildJniLib'.
> Process 'command 'sh'' finished with non-zero exit value 2

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3.387 secs

I can clearly see a file named tcl-tea.m4 in the directory: C:\x\Program Files\Msys64\usr\share\aclocal

See the screenshot below:

enter image description here

If the file clearly exists, why am I getting this error? Why is the file being discriminated against?

Expander and Parser not in java.library.path

Hi, I'm trying to execute the package but I got this errors (after a lot of work to build and compile everything from libpostal!!).
What I've done is:

  • install libpostal
  • build jpostal (./gradlew assemble) -> this give me the jpostal-master.jar
  • copy jpostal-master.jar into lib in my project -> this let me import com.mapzen.jpostal.AddressExpander into a class of my project
  • when I try to execute one of the examples (Parser, and Expander) this is the result:

Hello JPostal!
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_expander in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at MerchantBuilder.examples.AddressExpander.(AddressExpander.java:7)
at MerchantBuilder.TestJPostal.main(TestJPostal.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

Please can u help me with this? I really want to explore the possibilities of LibPostal in NLP workflows...but it's really hard to set up all the environment, cause to the fact there is no sbt/maven inclusion!!
Thanks

Setup Error: Error loading transliteration module

Trying to install on the following :
Linux HP-Pavilion-15-Notebook-PC 4.8.0-41-generic #44~16.04.1-Ubuntu SMP Fri Mar 3 17:11:16 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

When I try to check ./src/address_parser I get the following error:
Loading models...
ERR Error loading transliteration module, dir=(null)
at libpostal_setup_datadir (libpostal.c:1069) errno: No such file or directory

The following are the steps I've used:

cd ~
rm -rf libpostal
git clone https://github.com/openvenues/libpostal
cd libpostal
./bootstrap.sh
./configure LDFLAGS=-L/usr/lib64 --datadir=$(pwd)/data --prefix=$(realpath $(pwd)) --bindir=$(realpath $(pwd)/bin)
make install
sudo ldconfig
./src/address_parser

Any guidance would be great. I'm a newbie ubuntu user but would love to check this module out for python.

Deploy jpostal into an EC2 instances

Hello,

I am trying deploying jpostal artifacts into an EC2 instances so that our web application can use the library. As I understand, jni files in "scr/main/jniLibs" are linking to c libraries in "/usr/local/include/libpostal" and "/usr/local/lib/". However, I do not have permission to write "libpostal.h" into "/usr/local/include/libpostal" and "pkgconfig,libpostal.a,libpostal.la,libpostal.so,libpostal.so.1,libpostal.so.1.0.0" into "/usr/local/lib/" in the EC2 instances. Is there any solution for this?

Thanks.

unsatisfied link error, no jpostal_expander

I'm attempting to run jpostal on an Ubuntu AWS machine and am receiving an exception of Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_expander in java.library.path when calling AddressExpander.getInstance(); and AddressParser.getInstance(); as seen in the jpostal documentation.

I built a simple maven project locally and successfully imported com.mapzen.jpostal into the project, including it in the pom file. However, when executing the built jar with dependencies locally and on AWS, I get the error below. I tried to include the libpostal.dylib in the java.library.path, but that did not change the error. Have you seen this unsatisfied link error before?
bothlinkererror

no jpostal_parser in java.library.path

I have been trying to load jpostal into an existing maven project. To do this, I added a jpostal folder with the following files at the root directory of my project:

  1. libjpostal_expander.a
  2. libjpostal_expander.jnilib
  3. libjpostal_expander.la
  4. libjpostal_parser.a
  5. libjpostal_parser.jnilib
  6. libjpostal_parser.la

This is my main class:

public class Main {
    public static void main(String[] args) {
        System.loadLibrary("jpostal_parser");
    }
}

Before running my class, I set -Djava.library.path=./jpostal.

This is the output:

/Library/Java/JavaVirtualMachines/jdk-11.0.15.jdk/Contents/Home/bin/java -Djava.library.path=./jpostal -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=56917:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Users/areeb.siddiqui/Documents/Projects/jpostalLibTest/target/classes Main
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_parser in java.library.path: [./jpostal]
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2662)
	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:827)
	at java.base/java.lang.System.loadLibrary(System.java:1871)
	at Main.main(Main.java:3)

Process finished with exit code 1

Compute Details:
Chip: MacBook Pro (M1 Pro chip)
OS: macOS Monterey (v12.1)

Things already tried:

  1. Copy jpostal files into another project and try and load it there. Doesn't work.
  2. I tried using System.load() instead of loadLibrary by giving it the absolute path of the libjpostal_parser.jnilib. It gave me an error that it can not find the file.
  3. I tried playing with changing the working directory and java.library.path to reference the library in other ways. Didn't work.
  4. Clone jpostal locally and build it on my computer then copy the resulting src/main/jniLibs content into /jpostal in my project.
    Building it was a bit tricky. I had to comment out AX_JNI_INCLUDE_DIR in configure.ac because it kept trying to find JDK header in locations where it isnt as I have installed oracle jdk and the macro fails to look inside /Library/Java/JavaVirtualMachines/jdk-11.0.15.jdk/Contents/Home/include. Then removed the loop that was creating CFLAGS variable and replace that with the following lines:
CFLAGS="-I/Library/Java/JavaVirtualMachines/jdk-11.0.15.jdk/Contents/Home/include"
CFLAGS="$CFLAGS -I/Library/Java/JavaVirtualMachines/jdk-11.0.15.jdk/Contents/Home/include/darwin"

Didn't work.

I am out of ideas on what could possibly be wrong. How to fix this?

Create a tag of the latest commit as 1.0 release?

Hi, thanks for all the work you do on libpostal and the various language bindings! We are excited to use them to improve our data quality.

I am using RPM to package and distribute libpostal and jpostal to our fleet. Our RPM builder bootstraps source code packages, preferably from the Releases tab of the upstream Github project.

I see that you have tagged a pypostal as 1.0, which has an analog in jpostal.

Would it be possible for you to tag the latest jpostal commit so that Github packages it up as tarball and zip packages?

Getting SIGSEGV on consecutive parsings

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x000000012fa7bfdc, pid=91884, tid=0x0000000000001407

JRE version: Java(TM) SE Runtime Environment (8.0_171-b11) (build 1.8.0_171-b11)

Java VM: Java HotSpot(TM) 64-Bit Server VM (25.171-b11 mixed mode bsd-amd64 compressed oops)

Problematic frame:

C [libpostal.1.dylib+0x25fdc] address_parser_parse+0x1bc

Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

An error report file with more information is saved as:

hs_err_pid91884.log

If you would like to submit a bug report, please visit:

http://bugreport.java.com/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

Frame is different every time.
When trying address_parser directly in libpostal problem doesn't happen

Can't build jpostal

Hi,
I followed your installation instruction (using Ubuntu 16.04) until "./gradlew assemble".
I installed gradle 4.3.1 and after executing "sudo ldconfig" I ran the command "gradle wrapper". When I try now to run "./gradlew assemble" then i get a build exception:

"FAILURE: Build failed with an exception.

  • What went wrong:
    Task 'assemble' not found in root project 'libpostal'.

  • Try:
    Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED"

Thanks for your help!

Build Jpostal erro on Mac OS Ventura 13.2.1

ERROR:
checking if gcc supports -fno-rtti -fno-exceptions... yes checking for gcc option to produce PIC... -fno-common -DPIC checking if gcc PIC flag -fno-common -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin22.3.0 dyld checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for gcj... no checking for guavac... no checking for jikes... no checking for javac... javac checking if javac works... yes checking for /System/Library/Frameworks/JavaVM.framework/Headers/jni.h... no configure: error: cannot find JDK header files checking for /System/Library/Frameworks/include/jni.h... no make: *** No rule to make target install'. Stop.
:buildJniLib FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':buildJniLib'.

Process 'command './build.sh'' finished with non-zero exit value 2

`
below env variable already set but still facing this issue.
JAVA_HOME= /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
JNI_INCLUDE_DIRS=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/include/

I tried debugging by following steps mentioned in #14 but no luck yet.

Tests failing to link

When I run the tests using ./gradle check or as a unit test in IntelliJ I get:
java.lang.UnsatisfiedLinkError: /home/<>/jpostal/src/main/jniLibs/libjpostal_expander.so.0.0.0: libpostal.so.1: cannot open shared object file: No such file or directory

The files are there and libpostal works.

So far I've tried cleaning out and reinstalling the libpostal libraries, explicitly pointing to /usr/local/lib, and a few other things but no hints as to why it's not being found.

Building on Linux btw.

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_parser in java.library.path

Running this in Mac. I have done the gradle assemble.

`package com.mapzen.jpostal;

public class test1 extends TestAddressParser {

// Singleton, parser setup is done in the constructor
public static void main(String[] args) {

	AddressParser p = AddressParser.getInstance();
	ParsedComponent[] components = p.parseAddress(
			"The Book Club 100-106 Leonard St, Shoreditch, London, Greater London, EC2A 4RH, United Kingdom");

	for (ParsedComponent c : components) {
		System.out.printf("%s: %s\n", c.getLabel(), c.getValue());
	}

}

}
`

ERROR

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_parser in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at com.mapzen.jpostal.AddressParser.(AddressParser.java:8)
at com.mapzen.jpostal.test1.main(test1.java:8)

jpostal_expander not present

Hi,

When I say AddressExpander.getInstance(); I get the following exception
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_expander in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at com.mapzen.jpostal.AddressExpander.(AddressExpander.java:7)
at addresscleanup.AddressCleanup.main(AddressCleanup.java:21)

It seems jpostal_expander is not present at all in src/main/jniLibs. Do I need to explicitly set the java library path to another location?

How to Make use of jpostal in Hosting Environment

Hi ,

I am using jpostal library as part of java web project(based on the steps mentioned here jpostal.) , which is working perfectly in my local Linux server.

Now i want to deploy this application in the hosted server (like amazon/any hosted env), but before deploy this i need to install all the steps mentioned in the above link, because in my code i have dependency of following line.
AddressParser p = AddressParser.getInstanceDataDir("/some/path");
"./configure --datadir=[]
which is configure path of data directory as part of libpostal installatioin.
I cannot install any packages of libpostal in the hosted envirounment, is there any possibility to bundle all the libpostal dependencies, including data-dir as part of the project.

Thanks,
Raju.

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

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.

tomcat 7, failed libpostal_setup

During the libpostal install, I set datadir to /var/lib. After the gradle build for jpostal I copied everything from src/main/jniLibs/lib to /usr/local/lib/jpostal.

In tomcat.conf, the java.library.path is set to /usr/local/lib/libpostal:/usr/local/lib/jpostal.

Upon trying to parse an address, tomcat crashes with the following in catalina.log :

^[[31mERR^[[39m   Error loading transliteration module
  ^[[90m at libpostal_setup (libpostal.c:1057) ^[[94merrno: No such file or directory^[[39m

I poked around through the source of libpostal and traced that back to loading the transliteration.dat file, which is located at /var/lib/libpostal/transliteration/transliteration.dat.

What do I need to add to the tomcat configuration so that it finds the datafile?

Can't build jpostal

After following the instructions in https://github.com/openvenues/jpostal/blob/master/README.md to install libpostal on my mac, everything seem to work, and I did not get any errors.

When I try running ./gradlew assemble, I get the following error:

checking for libpostal... no
configure: error: Could not find libpostal
make: *** No rule to make target `install'. Stop.
:buildJniLib FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':buildJniLib'.

    Process 'command './build.sh'' finished with non-zero exit value 2

  • Try:
    Run with --info or --debug option to get more log output.

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':buildJniLib'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
    at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:77)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:47)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    Caused by: org.gradle.process.internal.ExecException: Process 'command './build.sh'' finished with non-zero exit value 2
    at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:367)
    at org.gradle.process.internal.DefaultExecAction.execute(DefaultExecAction.java:31)
    at org.gradle.api.tasks.AbstractExecTask.exec(AbstractExecTask.java:54)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:227)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 60 more

BUILD FAILED

Total time: 11.833 secs

jpostal in msys2 issues

Been trying to get this working in msys2 - the build.sh keeps erroring out

fun descriptive error with --stacktrace

# ./gradlew assemble --stacktrace
:buildJniLib FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildJniLib'.
> A problem occurred starting process 'command './build.sh''

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':buildJniLib'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
        at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
        at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
        at org.gradle.internal.Factories$1.create(Factories.java:22)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
        at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:77)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:47)
        at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
        at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
        at org.gradle.launcher.Main.doAction(Main.java:33)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process 'command './build.sh''
        at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:197)
        at org.gradle.process.internal.DefaultExecHandle.failed(DefaultExecHandle.java:327)
        at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:86)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
        at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: net.rubygrapefruit.platform.NativeException: Could not start './build.sh'
        at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:27)
        at net.rubygrapefruit.platform.internal.WindowsProcessLauncher.start(WindowsProcessLauncher.java:22)
        at net.rubygrapefruit.platform.internal.WrapperProcessLauncher.start(WrapperProcessLauncher.java:36)
        at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:68)
        ... 2 more
Caused by: java.io.IOException: Cannot run program "./build.sh" (in directory "C:\msys64\home\<redacted>\jpostal"): CreateProcess error=193, %1 is not a valid Win32 application
        at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
        ... 5 more
Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
        ... 6 more

So I thought I would run it line by line and it was fine until I got to 'make install'

found an issue with the JAVA_HOME and corrected it - then it could not find jni_md.h

So I modified the ax_jni_include_dir.m4 to assume that it was going to look in the subdirectory win32

But wait - there's more ;)

Now after all that I am getting the error

/c/Java/jdk1.8.0_231/include/win32/jni_md.h:34:9: error: unknown type name ‘__int64’
   34 | typedef __int64 jlong;
      |         ^~~~~~~
make[1]: *** [Makefile:473: libjpostal_parser_la-jpostal_AddressParser.lo] Error 1
make[1]: Leaving directory '/home/<redacted>/jpostal/src/main/c'
make: *** [Makefile:402: install-recursive] Error 1

Am I using the wrong version of java? Any help is appreciated.

Update for libpostal 1.0?

I'm in the process of updating to 1.0 and it appears that the C api is slightly different. It's been a while since I did any C stuff so I might be wrong in my assessment.

I'm going to take a crack at updating the code in jpostal and that will eventually tell me the answer one way or another. (If I'm right, this issue# gives me something to track against)

Bindings for near-duplicate detection and address deduping

Reading over openvenues/libpostal#294 we are very interested in making use of some of these new features. The question is which methods would be best to expose in the jpostal bindings?

I saw that you mentioned in that libostal PR that you have pypostal bindings already to use the new API from lieu, but I can't seem to find this. If you could point me towards these python bindings, I'd be happy to port them over to jpostal and open a PR.

Many many thanks!!

Is JPostal thread-safe?

Hello, I wasn't sure how to contact you, so apologies for this strange way of asking you a question via a github issue.

Can you confirm whether JPostal is thread-safe? I.e. If I write a wrapper around the parser, and that wrapper can be used by multiple threads, it will work the same as with one thread?

Many thanks

libpostal logs "invalid UTF-8" warning for a string having "\0" or "\u0000" and stays in waiting state

Using the jpostal, if I call jpostal parseaddress like:

AddressParser.getInstance().parseAddress("Rue du Médecin-Colonel Calbairac Toulouse France\u0000")

I am seeing this warning logged

WARN  invalid UTF-8
   at transliterate (transliterate.c:791) errno: No such file or directory
WARN  invalid UTF-8
   at transliterate (transliterate.c:791) errno: No such file or directory
WARN  invalid UTF-8
   at transliterate (transliterate.c:791) errno: No such file or directory
WARN  invalid UTF-8
   at transliterate (transliterate.c:791) errno: No such file or directory

And the thread remains in waiting state.. This happens only when the address have \u0000 or (simple \0) character in it. Simplest solution seems to not send \0 character or replace it before calling parseAddress...

Parser/expander not loaded

Hi are u familiar with this issue? It's happen when I try to expand an address string with and without lang options....
(I'm using scala)

ERR language_classifier not loaded, run libpostal_setup_language_classifier()
at classify_languages (language_classifier.c:63) errno: No such file or directory
ERR parser is not setup, call libpostal_setup_address_parser()
at address_parser_parse (address_parser.c:808) errno: No such file or directory
ERR Parser returned NULL
at parse_address (libpostal.c:1046) errno: No such file or directory

Need help using jpostal

I apologize in advance, as I am unfamiliar with C, make, gradle, and JNI.

I have build libpostal successfully, and I've built jpostal successfully, but I'm confused about the built artifact created.

Where are the libpostal libs?
Where are the jpostal libs?

What should my java build path include to be able to import jpostal from Java?

My eventual goal is that I can copy everything I need to use libpostal from java into a folder that I can move around and then just have that folder added to my Java path so I can use it from java. This is so I can deploy my java app that uses libpostal to a fleet of servers, without having to on each server, run all the commands needed to install libpostal and jpostal.

Any pointers?
Thanks

Can't load native library

When running test java code, got the following error (I added a "main" method to the TestAddressParser class):

$  java -classpath .:../../libs/jpostal.jar com.mapzen.jpostal.TestAddressParser 
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_parser in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at com.mapzen.jpostal.AddressParser.<clinit>(AddressParser.java:8)
	at com.mapzen.jpostal.TestAddressParser.testParse(TestAddressParser.java:17)
	at com.mapzen.jpostal.TestAddressParser.testParseUSAddress(TestAddressParser.java:54)
	at com.mapzen.jpostal.TestAddressParser.main(TestAddressParser.java:13)

Looks like that I need to set up the java.library.path (I checked this property. None of the directories that it points to have the libpostal library). What should I set to the java.library.path variable?

( I did built/installed libpostal and jpostal following the instructions on https://github.com/openvenues/jpostal)

cannot find libpostal

Whether by default in /usr/local/lib or even in /usr/lib and always ldconfig -p | grep libpostal does return the library. Figured out it was due to pkg-config. It does not find the libpostal.pc file. Doing export PKG_CONFIG_PATH=/usr/lib/pkgconfig before running ./gradlew assemble did the trick.

Build jpostal error on Mac OS

I followed instructions to build postal and jpostal on MacOS per https://github.com/openvenues/jpostal. Everything worked fine until running:

./gradlew assemble

Which resulted in the following error. How to resolve this? See below. Thank you.

.......

checking if javac works... yes
checking for javac... /usr/bin/javac
checking symlink for /usr/bin/javac... /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac
checking for /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h... no
checking for /System/Library/Frameworks/JavaVM.framework/Versions/include/jni.h... no
configure: error: cannot find JDK header files
make: *** No rule to make target `install'.  Stop.
:buildJniLib FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildJniLib'.
> Process 'command './build.sh'' finished with non-zero exit value 2

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 17.889 secs

Cannot Assemble

This the assemble command yields an error:

./gradlew assemble --stacktrace  

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '11.0.9'.

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
java.lang.IllegalArgumentException: Could not determine java version from '11.0.9'.

My OS:

$ neofetch -off
OS: macOS Big Sur 11.0.1 20B29 x86_64 
Host: MacBookPro15,1 
Kernel: 20.1.0 
Uptime: 2 days, 23 hours, 32 mins 
Packages: 171 (brew) 
Shell: zsh 5.8 
Resolution: 1680x1050@2x, 3840x1600@2x, 1050x1680@2x 
DE: Aqua 
WM: Quartz Compositor 
WM Theme: Blue (Dark) 
Terminal: vscode 
CPU: Intel i7-8850H (12) @ 2.60GHz 
GPU: Intel UHD Graphics 630, Radeon Pro 560X 
Memory: 12592MiB / 16384MiB 
$ java --version       
openjdk 11.0.9 2020-10-20
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9+11)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.23.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20201023_788 (JIT enabled, AOT enabled)
OpenJ9   - 0394ef754
OMR      - 582366ae5
JCL      - 3b09cfd7e9 based on jdk-11.0.9+11)
$ gradle --version                   

------------------------------------------------------------
Gradle 6.7.1

Tried it with IntelliJ as well for good measure:

Cannot determine classpath for resource 'java/sql/SQLException.class' from location 'jrt:/java.sql/java/sql/SQLException.class'.

The project uses Gradle 2.9 which is incompatible with IDEA running on Java 10 or newer.
See details at https://github.com/gradle/gradle/issues/8431
Possible solution:
 - Upgrade Gradle wrapper to 4.8.1 version and re-import the project

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.