Need help to understand error log

I’m using: SWI-Prolog version 8.1.1 in Ubuntu 18.04

I develop in Java a WebApplication in Spring-Boot and I use JPL to communicate to Prolog from a service

As I stated in a previous thread,
An error occured at libswipl.so at

JRE version: OpenJDK Runtime Environment (8.0_191-b12) (build 1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12)
# Java VM: OpenJDK 64-Bit Server VM (25.191-b12 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libswipl.so+0xb34b2]  PL_thread_attach_engine+0xe2

The error occurs when I try to call the Prolog query again in an API call in Spring Boot. The first time everything work as expected.

In the other question the answers didnt help, so if it’s possible I would like someone to help me understand where to focus in the error log to find what it’s happening.

The stackOverflow question: link

The error log pastebin

A good start would be a program and instructions that allows others to reproduce your problem. Possibly you are using JPL wrongly, probably you installed it wrongly and possibly there is a bug. With this description it is hard to tell and if there is a bug it will be hard to fix.

You are right.
I tried building from sources, and while i was running the java examples, I figured that running the FamilyMT example, same error occurs.

My steps for compiling and installing Prolog from sources are:
1: mkdir build
2: cd build
3: sudo cmake …
4 output of cmake

-- Configuring SWI-Prolog-8.1.1
-- Could NOT find LibUUID (missing: LIBUUID_INCLUDE_DIR UUID_LIBRARY) 
-- Could NOT find ODBC (missing: ODBC_LIBRARY ODBC_INCLUDE_DIR) 
-- Optional package Berkeley DB was not found
-- Could NOT find PCRE (missing: PCRE_LIBRARY PCRE_INCLUDE_DIR) 
-- Could NOT find LibYAML (missing: LIBYAML_INCLUDE_DIR YAML_LIBRARY) 
-- Could NOT find Qt5Widgets (missing: Qt5Widgets_DIR)
-- Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) 
-- Could NOT find FontConfig (missing: FONTCONFIG_LIBRARY FONTCONFIG_INCLUDE_DIR) 
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kech/Documents/prolog_sources/swipl-devel/build

5: sudo make
6: sudo make install

Am I doing something wrong?? Also these libs that are missing, are important?