phiresky / ripgrep-all

rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.
Other
8.15k stars 177 forks source link

build failed in ubuntu 18.04 docker #22

Closed JeunghunKim closed 5 years ago

JeunghunKim commented 5 years ago

I want to build ripgrep-all from source and get errors. I reproduce the same error on docker environment.

install requirements

apt install build-essential pandoc poppler-utils ffmpeg cargo curl

install rust

curl https://sh.rustup.rs -sSf | sh -s -- -y export PATH="$HOME/.cargo/bin:$PATH"


- rust version check

root@7927ed67baf9:/# rustc --version rustc 1.36.0 (a53f9df32 2019-07-03)


- Install ripgrep & ripgrep-all

install ripgrep

cargo install ripgrep

install repgrep_all

cargo install ripgrep_all


- Error messages
error[E0277]: *const libsqlite3_sys::sqlite3_module cannot be sent between threads safely --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rusqlite-0.18.0/src/vtab/series.rs:21:1 21 / lazy_static! { 22 static ref SERIES_MODULE: Module = eponymous_only_module::(1); 23 } _^ *const libsqlite3_sys::sqlite3_module cannot be sent between threads safely

= help: within vtab::Module<vtab::series::SeriesTab>, the trait std::marker::Send is not implemented for *const libsqlite3_sys::sqlite3_module = note: required because it appears within the type libsqlite3_sys::sqlite3_vtab = note: required because it appears within the type vtab::series::SeriesTab = note: required because it appears within the type std::marker::PhantomData<vtab::series::SeriesTab> = note: required because it appears within the type vtab::Module<vtab::series::SeriesTab> = note: required because of the requirements on the impl of std::marker::Sync for spin::once::Once<vtab::Module<vtab::series::SeriesTab>> = note: required because it appears within the type lazy_static::lazy::Lazy<vtab::Module<vtab::series::SeriesTab>> = note: shared static variables must have a type that implements Sync = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0277]: *mut i8 cannot be sent between threads safely --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rusqlite-0.18.0/src/vtab/series.rs:21:1 21 / lazy_static! { 22 static ref SERIES_MODULE: Module = eponymous_only_module::(1); 23 } _^ *mut i8 cannot be sent between threads safely

= help: within vtab::Module<vtab::series::SeriesTab>, the trait std::marker::Send is not implemented for *mut i8 = note: required because it appears within the type libsqlite3_sys::sqlite3_vtab = note: required because it appears within the type vtab::series::SeriesTab = note: required because it appears within the type std::marker::PhantomData<vtab::series::SeriesTab> = note: required because it appears within the type vtab::Module<vtab::series::SeriesTab> = note: required because of the requirements on the impl of std::marker::Sync for spin::once::Once<vtab::Module<vtab::series::SeriesTab>> = note: required because it appears within the type lazy_static::lazy::Lazy<vtab::Module<vtab::series::SeriesTab>> = note: shared static variables must have a type that implements Sync = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to 2 previous errors

For more information about this error, try rustc --explain E0277. error: failed to compile ripgrep_all v0.9.2, intermediate artifacts can be found at /tmp/cargo-installOqSn2W

Caused by: Could not compile rusqlite.

To learn more, run the command again with --verbose.


- With --verbose option

cargo install ripgrep_all --verbose


- Error messages
Compiling rusqlite v0.18.0 Running rustc --edition=2018 --crate-name rusqlite /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rusqlite-0.18.0/src/lib.rs --color always --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 --cfg 'feature="bundled"' --cfg 'feature="lazy_static"' --cfg 'feature="libsqlite3-sys"' --cfg 'feature="vtab"' -C metadata=b5985805439e28e0 -C extra-filename=-b5985805439e28e0 --out-dir /tmp/cargo-installa2jlTk/release/deps -L dependency=/tmp/cargo-installa2jlTk/release/deps --extern bitflags=/tmp/cargo-installa2jlTk/release/deps/libbitflags-e53b4b50e5713d69.rlib --extern fallible_iterator=/tmp/cargo-installa2jlTk/release/deps/libfallible_iterator-229d1b548363649b.rlib --extern fallible_streaming_iterator=/tmp/cargo-installa2jlTk/release/deps/libfallible_streaming_iterator-3dc8799337b38106.rlib --extern lazy_static=/tmp/cargo-installa2jlTk/release/deps/liblazy_static-b92b4a1bf6babc8c.rlib --extern libsqlite3_sys=/tmp/cargo-installa2jlTk/release/deps/liblibsqlite3_sys-fec7266de6e25bdf.rlib --extern lru_cache=/tmp/cargo-installa2jlTk/release/deps/liblru_cache-b6c9918432310b68.rlib --extern memchr=/tmp/cargo-installa2jlTk/release/deps/libmemchr-292d84c02d2d5263.rlib --extern time=/tmp/cargo-installa2jlTk/release/deps/libtime-d82d709fd943c2c8.rlib --cap-lints allow -L native=/tmp/cargo-installa2jlTk/release/build/libsqlite3-sys-0f04e3e46e346ca2/out error[E0277]: *const libsqlite3_sys::sqlite3_module cannot be sent between threads safely --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rusqlite-0.18.0/src/vtab/series.rs:21:1 21 / lazy_static! { 22 static ref SERIES_MODULE: Module = eponymous_only_module::(1); 23 } _^ *const libsqlite3_sys::sqlite3_module cannot be sent between threads safely

= help: within vtab::Module<vtab::series::SeriesTab>, the trait std::marker::Send is not implemented for *const libsqlite3_sys::sqlite3_module = note: required because it appears within the type libsqlite3_sys::sqlite3_vtab = note: required because it appears within the type vtab::series::SeriesTab = note: required because it appears within the type std::marker::PhantomData<vtab::series::SeriesTab> = note: required because it appears within the type vtab::Module<vtab::series::SeriesTab> = note: required because of the requirements on the impl of std::marker::Sync for spin::once::Once<vtab::Module<vtab::series::SeriesTab>> = note: required because it appears within the type lazy_static::lazy::Lazy<vtab::Module<vtab::series::SeriesTab>> = note: shared static variables must have a type that implements Sync = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0277]: *mut i8 cannot be sent between threads safely --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rusqlite-0.18.0/src/vtab/series.rs:21:1 21 / lazy_static! { 22 static ref SERIES_MODULE: Module = eponymous_only_module::(1); 23 } _^ *mut i8 cannot be sent between threads safely

= help: within vtab::Module<vtab::series::SeriesTab>, the trait std::marker::Send is not implemented for *mut i8 = note: required because it appears within the type libsqlite3_sys::sqlite3_vtab = note: required because it appears within the type vtab::series::SeriesTab = note: required because it appears within the type std::marker::PhantomData<vtab::series::SeriesTab> = note: required because it appears within the type vtab::Module<vtab::series::SeriesTab> = note: required because of the requirements on the impl of std::marker::Sync for spin::once::Once<vtab::Module<vtab::series::SeriesTab>> = note: required because it appears within the type lazy_static::lazy::Lazy<vtab::Module<vtab::series::SeriesTab>> = note: shared static variables must have a type that implements Sync = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to 2 previous errors

For more information about this error, try rustc --explain E0277. error: failed to compile ripgrep_all v0.9.2, intermediate artifacts can be found at /tmp/cargo-installa2jlTk

Caused by: Could not compile rusqlite.

Caused by: process didn't exit successfully: rustc --edition=2018 --crate-name rusqlite /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rusqlite-0.18.0/src/lib.rs --color always --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 --cfg 'feature="bundled"' --cfg 'feature="lazy_static"' --cfg 'feature="libsqlite3-sys"' --cfg 'feature="vtab"' -C metadata=b5985805439e28e0 -C extra-filename=-b5985805439e28e0 --out-dir /tmp/cargo-installa2jlTk/release/deps -L dependency=/tmp/cargo-installa2jlTk/release/deps --extern bitflags=/tmp/cargo-installa2jlTk/release/deps/libbitflags-e53b4b50e5713d69.rlib --extern fallible_iterator=/tmp/cargo-installa2jlTk/release/deps/libfallible_iterator-229d1b548363649b.rlib --extern fallible_streaming_iterator=/tmp/cargo-installa2jlTk/release/deps/libfallible_streaming_iterator-3dc8799337b38106.rlib --extern lazy_static=/tmp/cargo-installa2jlTk/release/deps/liblazy_static-b92b4a1bf6babc8c.rlib --extern libsqlite3_sys=/tmp/cargo-installa2jlTk/release/deps/liblibsqlite3_sys-fec7266de6e25bdf.rlib --extern lru_cache=/tmp/cargo-installa2jlTk/release/deps/liblru_cache-b6c9918432310b68.rlib --extern memchr=/tmp/cargo-installa2jlTk/release/deps/libmemchr-292d84c02d2d5263.rlib --extern time=/tmp/cargo-installa2jlTk/release/deps/libtime-d82d709fd943c2c8.rlib --cap-lints allow -L native=/tmp/cargo-installa2jlTk/release/build/libsqlite3-sys-0f04e3e46e346ca2/out (exit code: 1)

phiresky commented 5 years ago

Thanks for the detailed report. I can reproduce this on 1.36.0 stable. I guess it's caused by the unsoundness fixes Rust added in 1.36. It probably needs to be fixed in rusqlite. I'll open an issue there, see what they think.