sqld icon indicating copy to clipboard operation
sqld copied to clipboard

Fedora 38:/usr/include/sqlite3.h:35:10: fatal error: 'stdarg.h' file not found

Open tjyang opened this issue 3 years ago • 7 comments

Hi

  • cargo run failed on fedora 35
[me@fedora01d sqld]$ sudo ./scripts/install-deps.sh
[me@fedora01d sqld]$ cargo run
<snipped>

  cargo:rerun-if-env-changed=LIBSQLITE3_SYS_BUNDLING

  --- stderr
  /usr/include/sqlite3.h:35:10: fatal error: 'stdarg.h' file not found
  thread 'main' panicked at 'could not run bindgen on header /usr/include/sqlite3.h', /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/libsqlite3-sys-0.                               25.2/build.rs:611:33
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
[me@fedora01d sqld]$ cat /etc/redhat-release
Fedora release 35 (Thirty Five)
[me@fedora01d sqld]$
  • Where is stdarg.h ?
[me@fedora01d sqld]$ grep stdarg.h /usr/include/sqlite3.h
#include <stdarg.h>     /* Needed for the definition of va_list */
[me@fedora01d sqld]$
[me@fedora01d sqld]$ locate stdarg.h
/usr/include/c++/11/tr1/stdarg.h
/usr/lib/gcc/x86_64-redhat-linux/11/include/cross-stdarg.h
/usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h
/usr/lib64/clang/13.0.1/include/stdarg.h
/usr/src/kernels/6.0.12-100.fc35.x86_64/include/linux/stdarg.h
[me@fedora01d sqld]$

  • end

tjyang avatar Jan 07 '23 13:01 tjyang

@tjyang Did you run git submodule update --init --force --recursive --depth 1 before building? I assume not because looks like I forgot to add that in the README build steps.

penberg avatar Jan 07 '23 13:01 penberg

Thanks for quick reponse with https://github.com/libsql/sqld/commit/c3d3dd5b547a034c38f63b6ccb52504c70d19edf

tjyang avatar Jan 07 '23 14:01 tjyang

@penberg , sorry to bug you on same issue after I migrated my f35 test box to f38.

  • sqld

[me@ipa01 sqld]$ git clone https://github.com/libsql/sqld.git;cd sqld
[me@ipa01 sqld]$ git  submodule update --init --force --recursive --depth 1
[me@ipa01 sqld]$ git log -1
commit 952ae759d3bc1a8eb99540b81cd25c1f1623a420 (HEAD -> main, origin/main, origin/HEAD)
Author: Bartosz Sypytkowski <[email protected]>
Date:   Wed Jun 21 14:29:47 2023 +0200

    bottomless: stop waiting for S3 put object on every transaction commit (#480)

    * bottomless: stop waiting for S3 put object on every transaction commit

    * bottomless: cleanup
[me@ipa01 sqld]$ git remote -v
origin  https://github.com/libsql/sqld.git (fetch)
origin  https://github.com/libsql/sqld.git (push)
[me@ipa01 sqld]$

  • error msg
[me@ipa01 sqld]$ make
<snipped>
   Compiling brotli-decompressor v2.3.4
   Compiling aws-sigv4 v0.55.3
   Compiling webpki-roots v0.22.6
   Compiling sharded-slab v0.1.4
error: failed to run custom build command for `libsqlite3-sys v0.26.0 (https://github.com/psarna/rusqlite?rev=d9a97c0f25#d9a97c0f)`

Caused by:
  process didn't exit successfully: `/home/me/sqld/target/debug/build/libsqlite3-sys-326c02a7f42958bc/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBSQLITE3_SYS_USE_PKG_CONFIG
  cargo:rerun-if-env-changed=LIBSQLITE3_SYS_BUNDLING

  --- stderr
  libsql/sqlite3.h:35:10: fatal error: 'stdarg.h' file not found
  thread 'main' panicked at 'could not run bindgen on header libsql/sqlite3.h', /home/me/.cargo/git/checkouts/rusqlite-3c7d4a5cd4390611/d9a97c0/libsqlite3-sys/build.rs:652:33
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
make: *** [Makefile:5: libsql-test] Error 101
[me@ipa01 sqld]$

``

tjyang avatar Jun 25 '23 11:06 tjyang

@penberg FYI, same procedure in building from github source works on RockyLinux 9.2, but still not on Fedora 38.

[me@rocky9t01 sqld]$ git log -1;cat /etc/redhat-release ;date
commit 6b327b509aadcb11077aef8413fe4a3996fb3992 (HEAD -> main, origin/main, origin/HEAD)
Author: Bartosz Sypytkowski <[email protected]>
Date:   Tue Jul 4 12:19:26 2023 +0200

    bottomless transaction disk cache (#496)

    * bottomless: fail if env var parsing fails

    * bottomless: replaced AWS S3 last modified with locally generated timestamp

    * since ofc rebase did not work

    * bottomless: swap restored transaction pages onto disk after threshold is reached

    * bottomless: make transaction recovery page cache file path configurable

    * mend

    bottomless: make transaction recovery page cache file path configurable

    * bottomless: on restore transaction cache file create failure, fallback to memory

    * bottomless: restore transaction page cache swap fallback to memory of disk write failure
Rocky Linux release 9.2 (Blue Onyx)
Tue Jul  4 06:37:56 PM CDT 2023
[me@rocky9t01 sqld]$ make rpm
<snipped>
   Compiling rusqlite v0.29.0 (https://github.com/psarna/rusqlite?rev=d9a97c0f25#d9a97c0f)
   Compiling sqld-libsql-bindings v0.1.0 (/home/me/sqld/sqld-libsql-bindings)
   Compiling bottomless v0.1.18 (/home/me/sqld/bottomless)
   Compiling bottomless-cli v0.1.14 (/home/me/sqld/bottomless-cli)
    Finished dev [unoptimized + debuginfo] target(s) in 3m 09s
make: ./testing/run: No such file or directory
make: *** [Makefile:6: libsql-test] Error 127
[me@rocky9t01 sqld]$ ls -lrt target/debug/bottomless-cli  target/debug/sqld
-rwxr-xr-x. 2 me me 407971840 Jul  4 18:34 target/debug/bottomless-cli
-rwxr-xr-x. 2 me me 538596784 Jul  4 18:34 target/debug/sqld
[me@rocky9t01 sqld]$


tjyang avatar Jul 04 '23 23:07 tjyang

Hey @tjyang, sorry for the late reply, is this still an issue?

MarinPostma avatar Aug 28 '23 14:08 MarinPostma

@MarinPostma I will confirm and report back later.

tjyang avatar Aug 28 '23 15:08 tjyang

Hi @MarinPostma

[me@rocky9t01 sqld]$ date;cat /etc/redhat-release;git remote -v ;git log -1
Mon Aug 28 07:29:37 PM CDT 2023
Rocky Linux release 9.2 (Blue Onyx)
origin  https://github.com/libsql/sqld.git (fetch)
origin  https://github.com/libsql/sqld.git (push)
commit 0b2b516fbc25813560104e0ce33bd31cb6d23957 (HEAD -> main, origin/main, origin/HEAD)
Author: ad hoc <[email protected]>
Date:   Mon Aug 28 16:39:57 2023 +0200

    bump sqlite3-parser to 0.11 (#631)
[me@rocky9t01 sqld]$ make
    Finished dev [unoptimized + debuginfo] target(s) in 0.33s
make: ./testing/run: No such file or directory
make: *** [Makefile:6: libsql-test] Error 127
[me@rocky9t01 sqld]$

Same error message on Fedora 38, See logs below.

  • Rust info
[me@ipa01 sqld]$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/me/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
1.70.0-x86_64-unknown-linux-gnu

active toolchain
----------------

1.70.0-x86_64-unknown-linux-gnu (overridden by '/home/me/sqld/rust-toolchain.toml')
rustc 1.70.0 (90c541806 2023-05-31)

[me@ipa01 sqld]$

  • Fedora 38 OS info.
[me@ipa01 sqld]$ cat /etc/redhat-release ;date;git log -1
Fedora release 38 (Thirty Eight)
Mon Aug 28 02:43:15 PM CDT 2023
commit 0b2b516fbc25813560104e0ce33bd31cb6d23957 (HEAD -> main, origin/main, origin/HEAD)
Author: ad hoc <[email protected]>
Date:   Mon Aug 28 16:39:57 2023 +0200

    bump sqlite3-parser to 0.11 (#631)
[me@ipa01 sqld]$ git remote -v
origin  https://github.com/libsql/sqld.git (fetch)
origin  https://github.com/libsql/sqld.git (push)
[me@ipa01 sqld]$

  • same error message on F38 by "cargo build"
[me@ipa01 sqld]$ make
<snipped>
   Compiling sharded-slab v0.1.4
   Compiling tracing-log v0.1.3
error: failed to run custom build command for `libsqlite3-sys v0.26.0 (https://github.com/psarna/rusqlite?rev=477264453b#47726445)`

Caused by:
  process didn't exit successfully: `/home/me/sqld/target/debug/build/libsqlite3-sys-a33e38a469daf52c/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBSQLITE3_SYS_USE_PKG_CONFIG
  cargo:rerun-if-env-changed=LIBSQLITE3_SYS_BUNDLING

  --- stderr
  libsql/sqlite3.h:35:10: fatal error: 'stdarg.h' file not found
  thread 'main' panicked at 'could not run bindgen on header libsql/sqlite3.h', /home/me/.cargo/git/checkouts/rusqlite-3c7d4a5cd4390611/4772644/libsqlite3-sys/build.rs:652:33
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
make: *** [Makefile:5: libsql-test] Error 101
[me@ipa01 sqld]$

  • Need to read and understand https://github.com/psarna/rusqlite#notes-on-building-rusqlite-and-libsqlite3-sys

tjyang avatar Aug 28 '23 19:08 tjyang