duckdb-wasm icon indicating copy to clipboard operation
duckdb-wasm copied to clipboard

Failed to build for duckdb_wasm sub-project test (tester)

Open ritalin opened this issue 1 year ago • 5 comments

What happens?

I've challenged to run duckdb_wasm sub-project test (tester).

Following README, I've tried to build but failed.

$ cmake --build .
...
Undefined symbols for architecture x86_64:
  "duckdb_skiplistlib::skip_list::_throw_exceeds_size(unsigned long)", referenced from:

This is because of not specifying libduckdb_skiplistlib.a to a cmake configuration (lib/cmake/duckdb.cmake).

To Reproduce

mkdir -p build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../lib
cmake --build .

Expect behavior: Build process is Succes.

Actual behavior: Build failed.

Browser/Environment:

MacOS Ventura 13.6.9 / Apple clang version 14.0.3

Device:

Macbook Air 2020 (Intel Core i7 1.2GHz)

DuckDB-Wasm Version:

1.29.0 (currently main stream)

DuckDB-Wasm Deployment:

None (because of unittest problem)

Full Name:

Kazuhiko TAMURA

Affiliation:

have no job

ritalin avatar Oct 09 '24 09:10 ritalin

Putting libduckdb_skiplistlib.a dependency to target_link_libraries of lib/cmake/duckdb.cmake led to resolve this build probjem.

target_link_libraries(
  duckdb
  INTERFACE ${install_dir}/lib/libduckdb_re2.a
  ...
  INTERFACE ${install_dir}/lib/libduckdb_skiplistlib.a  # <- put this line
  ...)

But many test cases has failed... And in DEBUG build, Address sanitizer has reported error.

ritalin avatar Oct 09 '24 09:10 ritalin

But many test cases has failed...

14/102 test cases have failed.

Following test has not contained some types.

  • AllTypesTest.FullRangeTypes

Types is:

    "uhugeint",
    "fixed_int_array",
    "fixed_varchar_array",
    "fixed_nested_int_array",
    "fixed_nested_varchar_array",
    "fixed_struct_array",
    "struct_of_fixed_array",
    "fixed_array_of_int_list",
    "list_of_fixed_int_array",

Following tests have failed at

file->Release();
ASSERT_FALSE(buffer->BuffersFile(file_path.c_str())); // <- There
  • FilePageBufferTest.FixSingle
  • FilePageBufferTest.FIFOEviction
  • FilePageBufferTest.LRUEviction
  • FilePageBufferTest.ParallelFix
  • FilePageBufferTest.ParallelExclusiveAccess
  • FilePageBufferTest.ParallelScans
  • FilePageBufferTest.ParallelReaderWriter

Fllowing tests is because of DuckDB extensions support enabled by default.

  • ParquetLoadTest.LoadParquet
  • ParquetLoadTest.LoadParquetTwice
  • FileSystemBufferTest.FlushFrameMemoryBugRegression
  • WebFileSystemTest.LoadParquet

it calls duckdb_web_parquet_init(&db->database()). C++ exception with description "{"exception_type":"Catalog","exception_message":"Table Function with name \"read_parquet\" already exists!","name":"read_parquet","type":"Table Function","error_subtype":"ENTRY_ALREADY_EXISTS"}" thrown in the test body. reported.


Following test has no make sense for reason.

  • CSVExportTest.TestExport

{"exception_type":"Not implemented","exception_message":"Unsupported compression type for default file system"} reported.

EDIT: This test case is created WebDB with NATIVE mode. A NATIVE uses duckdb::LocalFileSystem as the filesystem. It seems that duckdb::LocalFileSystem does not support duckdb::FileCompressionType::AUTO_DETECT. It may need to create with WEB mode.

ritalin avatar Oct 09 '24 09:10 ritalin

I'm ready for PR for this issue.

ritalin avatar Oct 09 '24 10:10 ritalin

A PR is very welcome

carlopi avatar Oct 09 '24 10:10 carlopi

@carlopi

I've submitted PR (https://github.com/duckdb/duckdb-wasm/pull/1890) that all tests is green. Please review this PR.

ritalin avatar Oct 25 '24 05:10 ritalin