Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions build-jmeos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,26 @@ LIBMEOS_SO="$(find "${MDB_DIR}/build" -name 'libmeos.so' -print -quit)"
[ -n "${LIBMEOS_SO}" ] || { echo "error: libmeos.so not produced by the MEOS build" >&2; exit 1; }
log "Built ${LIBMEOS_SO}"

# ---------------------------------------------------------------------------
# 1b. Provision MEOS's SRID/network reference data at its default runtime path.
# ---------------------------------------------------------------------------
# libmeos resolves SRIDs by reading spatial_ref_sys.csv from a fixed default
# path (meos/src/geo/tspatial_transform_meos.c: SPATIAL_REF_SYS_CSV =
# "/usr/local/share/spatial_ref_sys.csv"). A full `cmake --install` would place
# it there (meos/CMakeLists.txt), but this script only builds the `meos` target,
# so the data files are staged explicitly. Without them, any SRID-touching call
# (npoint, tgeompoint) makes libmeos print "Cannot open the spatial_ref_sys.csv
# file" to stdout, which corrupts the surefire fork channel and terminates the
# JVM under test ("The forked VM terminated without properly saying goodbye").
MEOS_DATA_DIR="${MEOS_DATA_DIR:-/usr/local/share}"
log "Provisioning MEOS reference data into ${MEOS_DATA_DIR}"
provision_data() {
local src="$1" dst="$2"
install -Dm644 "${src}" "${dst}" 2>/dev/null || sudo install -Dm644 "${src}" "${dst}"
}
provision_data "${MDB_DIR}/meos/src/geo/spatial_ref_sys.csv" "${MEOS_DATA_DIR}/spatial_ref_sys.csv"
provision_data "${MDB_DIR}/meos/examples/data/ways1000.csv" "${MEOS_DATA_DIR}/ways1000.csv"

# ---------------------------------------------------------------------------
# 2. Build JMEOS.jar against that libmeos.so.
# ---------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static int cbuffer_hash(Pointer arg0) {
* <p>Pure per-event; safe in any scalar position.</p>
* <p>Classification: scalar comparison/hash</p>
*/
public static int cbuffer_hash_extended(Pointer arg0, int arg1) {
public static long cbuffer_hash_extended(Pointer arg0, long arg1) {
if (!MEOS_AVAILABLE) {
throw new UnsupportedOperationException(
"cbuffer_hash_extended requires libmeos — set -Dmobilitykafka.meos.enabled=true");
Expand Down Expand Up @@ -1868,12 +1868,12 @@ public static String cbuffer_as_ewkt(Pointer arg0, int arg1) {
* <p>I/O / catalog / lifecycle helper.</p>
* <p>Classification: IO/serialization</p>
*/
public static String cbuffer_as_hexwkb(Pointer arg0, byte arg1, Pointer arg2) {
public static String cbuffer_as_hexwkb(Pointer arg0, byte arg1) {
if (!MEOS_AVAILABLE) {
throw new UnsupportedOperationException(
"cbuffer_as_hexwkb requires libmeos — set -Dmobilitykafka.meos.enabled=true");
}
return GeneratedFunctions.cbuffer_as_hexwkb(arg0, arg1, arg2);
return GeneratedFunctions.cbuffer_as_hexwkb(arg0, arg1);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static int npoint_hash(Pointer arg0) {
* <p>Pure per-event; safe in any scalar position.</p>
* <p>Classification: scalar comparison/hash</p>
*/
public static int npoint_hash_extended(Pointer arg0, int arg1) {
public static long npoint_hash_extended(Pointer arg0, long arg1) {
if (!MEOS_AVAILABLE) {
throw new UnsupportedOperationException(
"npoint_hash_extended requires libmeos — set -Dmobilitykafka.meos.enabled=true");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public static int pose_hash(Pointer arg0) {
* <p>Pure per-event; safe in any scalar position.</p>
* <p>Classification: scalar comparison/hash</p>
*/
public static int pose_hash_extended(Pointer arg0, int arg1) {
public static long pose_hash_extended(Pointer arg0, long arg1) {
if (!MEOS_AVAILABLE) {
throw new UnsupportedOperationException(
"pose_hash_extended requires libmeos — set -Dmobilitykafka.meos.enabled=true");
Expand Down Expand Up @@ -906,12 +906,12 @@ public static String pose_as_ewkt(Pointer arg0, int arg1) {
* <p>I/O / catalog / lifecycle helper.</p>
* <p>Classification: IO/serialization</p>
*/
public static String pose_as_hexwkb(Pointer arg0, byte arg1, Pointer arg2) {
public static String pose_as_hexwkb(Pointer arg0, byte arg1) {
if (!MEOS_AVAILABLE) {
throw new UnsupportedOperationException(
"pose_as_hexwkb requires libmeos — set -Dmobilitykafka.meos.enabled=true");
}
return GeneratedFunctions.pose_as_hexwkb(arg0, arg1, arg2);
return GeneratedFunctions.pose_as_hexwkb(arg0, arg1);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public static int stbox_hash(Pointer arg0) {
* <p>Object-model role: {@code accessor}.</p>
* <p>Classification: role=accessor</p>
*/
public static int stbox_hash_extended(Pointer arg0, int arg1) {
public static long stbox_hash_extended(Pointer arg0, long arg1) {
if (!MEOS_AVAILABLE) {
throw new UnsupportedOperationException(
"stbox_hash_extended requires libmeos — set -Dmobilitykafka.meos.enabled=true");
Expand Down Expand Up @@ -695,12 +695,12 @@ public static Pointer stbox_zmin(Pointer arg0) {
* <p>Object-model role: {@code output}.</p>
* <p>Classification: IO/serialization</p>
*/
public static String stbox_as_hexwkb(Pointer arg0, byte arg1, Pointer arg2) {
public static String stbox_as_hexwkb(Pointer arg0, byte arg1) {
if (!MEOS_AVAILABLE) {
throw new UnsupportedOperationException(
"stbox_as_hexwkb requires libmeos — set -Dmobilitykafka.meos.enabled=true");
}
return GeneratedFunctions.stbox_as_hexwkb(arg0, arg1, arg2);
return GeneratedFunctions.stbox_as_hexwkb(arg0, arg1);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public static int set_hash(Pointer arg0) {
* <p>Object-model role: {@code accessor}.</p>
* <p>Classification: role=accessor</p>
*/
public static int set_hash_extended(Pointer arg0, int arg1) {
public static long set_hash_extended(Pointer arg0, long arg1) {
if (!MEOS_AVAILABLE) {
throw new UnsupportedOperationException(
"set_hash_extended requires libmeos — set -Dmobilitykafka.meos.enabled=true");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public static int span_hash(Pointer arg0) {
* <p>Object-model role: {@code accessor}.</p>
* <p>Classification: role=accessor</p>
*/
public static int span_hash_extended(Pointer arg0, int arg1) {
public static long span_hash_extended(Pointer arg0, long arg1) {
if (!MEOS_AVAILABLE) {
throw new UnsupportedOperationException(
"span_hash_extended requires libmeos — set -Dmobilitykafka.meos.enabled=true");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static int spanset_hash(Pointer arg0) {
* <p>Object-model role: {@code accessor}.</p>
* <p>Classification: role=accessor</p>
*/
public static int spanset_hash_extended(Pointer arg0, int arg1) {
public static long spanset_hash_extended(Pointer arg0, long arg1) {
if (!MEOS_AVAILABLE) {
throw new UnsupportedOperationException(
"spanset_hash_extended requires libmeos — set -Dmobilitykafka.meos.enabled=true");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public static int tbox_hash(Pointer arg0) {
* <p>Object-model role: {@code accessor}.</p>
* <p>Classification: role=accessor</p>
*/
public static int tbox_hash_extended(Pointer arg0, int arg1) {
public static long tbox_hash_extended(Pointer arg0, long arg1) {
if (!MEOS_AVAILABLE) {
throw new UnsupportedOperationException(
"tbox_hash_extended requires libmeos — set -Dmobilitykafka.meos.enabled=true");
Expand Down Expand Up @@ -400,12 +400,12 @@ public static Pointer tbox_xmin_inc(Pointer arg0) {
* <p>Object-model role: {@code output}.</p>
* <p>Classification: IO/serialization</p>
*/
public static String tbox_as_hexwkb(Pointer arg0, byte arg1, Pointer arg2) {
public static String tbox_as_hexwkb(Pointer arg0, byte arg1) {
if (!MEOS_AVAILABLE) {
throw new UnsupportedOperationException(
"tbox_as_hexwkb requires libmeos — set -Dmobilitykafka.meos.enabled=true");
}
return GeneratedFunctions.tbox_as_hexwkb(arg0, arg1, arg2);
return GeneratedFunctions.tbox_as_hexwkb(arg0, arg1);
}

/**
Expand Down
Loading