tursodatabase / tursodatabase/libsql

Unable to build bottomless extension, unknown type name 'LIBSQL_EXTENSION_INIT1'

Open
#1,485 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
17.2k
Forks
531
Avg merge
1h 12m
Merged PRs (30d)
1

Description

Detailed log

bottomless $ LIBSQL_DIR=~/Workspace/database/libsql make release
cargo build -p bottomless -j1	--quiet --release && \
		clang -fPIC -shared -DLIBSQL_ENABLE_BOTTOMLESS_WAL bottomless.c -I/Users/bytedance/Workspace/database/libsql ../target/release/libbottomless.a \
		-o ../target/release/bottomless.so
bottomless.c:5:1: error: unknown type name 'LIBSQL_EXTENSION_INIT1'
LIBSQL_EXTENSION_INIT1
^
bottomless.c:17:9: error: unknown type name 'libsql_api_routines'; did you mean 'sqlite3_api_routines'?
  const libsql_api_routines *pLibsqlApi
        ^~~~~~~~~~~~~~~~~~~
        sqlite3_api_routines
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sqlite3.h:1267:37: note: 'sqlite3_api_routines' declared here
typedef struct sqlite3_api_routines sqlite3_api_routines;
                                    ^
bottomless.c:28:3: error: call to undeclared function 'LIBSQL_EXTENSION_INIT2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  LIBSQL_EXTENSION_INIT2(pLibsqlApi);
  ^
bottomless.c:32:37: error: call to undeclared function 'libsql_wal_methods_find'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  struct libsql_wal_methods *orig = libsql_wal_methods_find(0);
                                    ^
bottomless.c:32:30: warning: incompatible integer to pointer conversion initializing 'struct libsql_wal_methods *' with an expression of type 'int' [-Wint-conversion]
  struct libsql_wal_methods *orig = libsql_wal_methods_find(0);
                             ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~
bottomless.c:39:14: error: call to undeclared function 'libsql_wal_methods_register'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    int rc = libsql_wal_methods_register(methods);
             ^
1 warning and 5 errors generated.
make: *** [release] Error 1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing LIBSQL_DIR=~/Workspace/database/libsql make release for the bottomless extension and inspect bottomless.c, where the missing macros, type, and WAL functions are referenced. Trace where those declarations are expected to come from, then verify that the release build produces bottomless.so without the reported compiler errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, rust
Domain
build-system, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.