Skip to content

Commit 24f1b00

Browse files
committed
Fix an error
Fix building issue Fix building issue fix test
1 parent 8c3d5be commit 24f1b00

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

c/sedona-libgpuspatial/build.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ fn main() {
145145
println!("cargo:rustc-link-search=native={}", cuda_lib_path); // CUDA runtime
146146

147147
if let Some(driver_lib_path) = find_cuda_driver_path() {
148-
println!("cargo:rustc-link-search=native={}", cuda_lib_path); // CUDA driver
148+
println!(
149+
"cargo:rustc-link-search=native={}",
150+
driver_lib_path.display()
151+
); // CUDA driver
149152
} else {
150153
panic!("CUDA libcuda.so is not found. Please ensure NVIDIA drivers are installed and in a standard location, or set LD_LIBRARY_PATH or CUDA_HOME.");
151154
}
@@ -154,7 +157,6 @@ fn main() {
154157
println!("cargo:rustc-link-lib=static=gpuspatial");
155158
println!("cargo:rustc-link-lib=static=rmm");
156159
println!("cargo:rustc-link-lib=static=rapids_logger");
157-
println!("cargo:rustc-link-lib=static=spdlog");
158160
println!("cargo:rustc-link-lib=static=geoarrow");
159161
println!("cargo:rustc-link-lib=static=nanoarrow");
160162
println!("cargo:rustc-link-lib=stdc++");

c/sedona-libgpuspatial/libgpuspatial/test/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
# under the License.
1717
if(GPUSPATIAL_BUILD_TESTS)
1818
add_library(geoarrow_geos geoarrow_geos/geoarrow_geos.c)
19-
target_link_libraries(geoarrow_geos
20-
PUBLIC GEOS::geos_c
21-
PRIVATE geoarrow)
19+
target_link_libraries(geoarrow_geos PUBLIC GEOS::geos_c geoarrow)
2220
endif()
2321

2422
if(GPUSPATIAL_BUILD_TESTS)

c/sedona-libgpuspatial/libgpuspatial/test/geoarrow_geos/geoarrow_geos.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
#include <string.h>
66

77
#define GEOS_USE_ONLY_R_API
8-
#include <geoarrow.h>
98
#include <geos_c.h>
9+
#include "geoarrow/geoarrow.h"
1010

1111
#include "geoarrow_geos.h"
12+
#include <assert.h>
13+
#include <math.h>
1214

1315
const char* GeoArrowGEOSVersionGEOS(void) { return GEOSversion(); }
1416

@@ -50,10 +52,7 @@ GeoArrowGEOSErrorCode GeoArrowGEOSArrayBuilderCreate(
5052
GeoArrowWKBWriterInitVisitor(&builder->wkb_writer, &builder->v);
5153
break;
5254
default:
53-
GEOARROW_RETURN_NOT_OK(
54-
GeoArrowBuilderInitFromSchema(&builder->builder, schema, &builder->error));
55-
GEOARROW_RETURN_NOT_OK(GeoArrowBuilderInitVisitor(&builder->builder, &builder->v));
56-
break;
55+
assert(0);
5756
}
5857

5958
builder->handle = handle;
@@ -469,8 +468,8 @@ static GeoArrowErrorCode MakeGeomFromWKB(struct GeoArrowGEOSArrayReader* reader,
469468
continue;
470469
}
471470

472-
int64_t data_offset = reader->array_view.offsets[0][i];
473-
int64_t data_size = reader->array_view.offsets[0][i + 1] - data_offset;
471+
int64_t data_offset = reader->array_view.offsets[0][i + offset];
472+
int64_t data_size = reader->array_view.offsets[0][i + offset + 1] - data_offset;
474473

475474
out[i] = GEOSWKBReader_read_r(reader->handle, reader->wkb_reader,
476475
reader->array_view.data + data_offset, data_size);

0 commit comments

Comments
 (0)