skade / leveldb-sys

MIT License
7 stars 15 forks source link

Build fails on system with recent libtool installed #16

Closed Keruspe closed 3 years ago

Keruspe commented 4 years ago

When configuring snappy, autotools are not ran before the configure script, so an outdated aclocal.m4 is used, resulting in

libtool: Version mismatch error.  This is libtool 2.4.2 Debian-2.4.2-1ubuntu1, but the
libtool: definition of this LT_INIT comes from libtool 2.4.6.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1ubuntu1
libtool: and run autoconf again.
make[1]: *** [Makefile:454: snappy.lo] Error 63
M5oul commented 3 years ago

Same here when installing on Fedora 32:

error: failed to run custom build command for `leveldb-sys v2.0.6`

Caused by:
  process didn't exit successfully: `/home/moul/duniter/target/release/build/leveldb-sys-c73fa0c2495ce811/build-script-build` (exit code: 101)
--- stdout
[build] Started
[snappy] Building
running: "cmake" "/home/moul/.cargo/registry/src/github.com-1ecc6299db9ec823/leveldb-sys-2.0.6/deps/snappy-1.1.7" "-DBUILD_SHARED_LIBS=OFF" "-DSNAPPY_BUILD_TESTS=OFF" "-DHAVE_LIBZ=OFF" "-DCMAKE_INSTALL_PREFIX=/home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Searching 16 bit integer - Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for byteswap.h
-- Looking for byteswap.h - found
-- Looking for sys/endian.h
-- Looking for sys/endian.h - not found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for windows.h
-- Looking for windows.h - not found
-- Looking for lzo1x_1_15_compress in lzo2
-- Looking for lzo1x_1_15_compress in lzo2 - not found
-- Performing Test HAVE_BUILTIN_EXPECT
-- Performing Test HAVE_BUILTIN_EXPECT - Success
-- Performing Test HAVE_BUILTIN_CTZ
-- Performing Test HAVE_BUILTIN_CTZ - Success
-- Looking for mmap
-- Looking for mmap - found
-- Looking for sysconf
-- Looking for sysconf - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/build
running: "cmake" "--build" "." "--target" "install" "--config" "Release" "--"
Scanning dependencies of target snappy
[ 20%] Building CXX object CMakeFiles/snappy.dir/snappy-c.cc.o
[ 40%] Building CXX object CMakeFiles/snappy.dir/snappy-sinksource.cc.o
[ 60%] Building CXX object CMakeFiles/snappy.dir/snappy-stubs-internal.cc.o
[ 80%] Building CXX object CMakeFiles/snappy.dir/snappy.cc.o
[100%] Linking CXX static library libsnappy.a
[100%] Built target snappy
Install the project...
-- Install configuration: "Release"
-- Installing: /home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/lib64/libsnappy.a
-- Installing: /home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/include/snappy-c.h
-- Installing: /home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/include/snappy-sinksource.h
-- Installing: /home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/include/snappy.h
-- Installing: /home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/include/snappy-stubs-public.h
-- Installing: /home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/lib64/cmake/Snappy/SnappyTargets.cmake
-- Installing: /home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/lib64/cmake/Snappy/SnappyTargets-release.cmake
-- Installing: /home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/lib64/cmake/Snappy/SnappyConfig.cmake
-- Installing: /home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/lib64/cmake/Snappy/SnappyConfigVersion.cmake
cargo:root=/home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out
cargo:rustc-link-search=native=/home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/lib
cargo:rustc-link-lib=static=snappy
[leveldb] Building
detected home dir change, cleaning out entire build directory
running: "cmake" "/home/moul/.cargo/registry/src/github.com-1ecc6299db9ec823/leveldb-sys-2.0.6/deps/leveldb-1.22" "-DLEVELDB_BUILD_TESTS=OFF" "-DLEVELDB_BUILD_BENCHMARKS=OFF" "-DHAVE_SNAPPY=ON" "-DCMAKE_INSTALL_PREFIX=/home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out" "-DCMAKE_C_FLAGS= -I/home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/include -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -I/home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/include -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Searching 16 bit integer - Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for crc32c_value in crc32c
-- Looking for crc32c_value in crc32c - not found
-- Looking for malloc in tcmalloc
-- Looking for malloc in tcmalloc - not found
-- Looking for fdatasync
-- Looking for fdatasync - found
-- Looking for F_FULLFSYNC
-- Looking for F_FULLFSYNC - not found
-- Performing Test HAVE_CLANG_THREAD_SAFETY
-- Performing Test HAVE_CLANG_THREAD_SAFETY - Failed
-- Performing Test HAVE_CXX17_HAS_INCLUDE
-- Performing Test HAVE_CXX17_HAS_INCLUDE - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/moul/duniter/target/release/build/leveldb-sys-27559eef961b03e6/out/build
running: "cmake" "--build" "." "--target" "install" "--config" "Release" "--"
Scanning dependencies of target leveldb
[  2%] Building CXX object CMakeFiles/leveldb.dir/db/builder.cc.o
[  4%] Building CXX object CMakeFiles/leveldb.dir/db/c.cc.o
[  7%] Building CXX object CMakeFiles/leveldb.dir/db/db_impl.cc.o
[  9%] Building CXX object CMakeFiles/leveldb.dir/db/db_iter.cc.o
[ 12%] Building CXX object CMakeFiles/leveldb.dir/db/dbformat.cc.o
[ 14%] Building CXX object CMakeFiles/leveldb.dir/db/dumpfile.cc.o
[ 17%] Building CXX object CMakeFiles/leveldb.dir/db/filename.cc.o
[ 19%] Building CXX object CMakeFiles/leveldb.dir/db/log_reader.cc.o
[ 21%] Building CXX object CMakeFiles/leveldb.dir/db/log_writer.cc.o
[ 24%] Building CXX object CMakeFiles/leveldb.dir/db/memtable.cc.o
[ 26%] Building CXX object CMakeFiles/leveldb.dir/db/repair.cc.o
[ 29%] Building CXX object CMakeFiles/leveldb.dir/db/table_cache.cc.o
[ 31%] Building CXX object CMakeFiles/leveldb.dir/db/version_edit.cc.o
[ 34%] Building CXX object CMakeFiles/leveldb.dir/db/version_set.cc.o
[ 36%] Building CXX object CMakeFiles/leveldb.dir/db/write_batch.cc.o
[ 39%] Building CXX object CMakeFiles/leveldb.dir/table/block_builder.cc.o
[ 41%] Building CXX object CMakeFiles/leveldb.dir/table/block.cc.o
[ 43%] Building CXX object CMakeFiles/leveldb.dir/table/filter_block.cc.o
[ 46%] Building CXX object CMakeFiles/leveldb.dir/table/format.cc.o
[ 48%] Building CXX object CMakeFiles/leveldb.dir/table/iterator.cc.o
[ 51%] Building CXX object CMakeFiles/leveldb.dir/table/merger.cc.o
[ 53%] Building CXX object CMakeFiles/leveldb.dir/table/table_builder.cc.o
[ 56%] Building CXX object CMakeFiles/leveldb.dir/table/table.cc.o
[ 58%] Building CXX object CMakeFiles/leveldb.dir/table/two_level_iterator.cc.o
[ 60%] Building CXX object CMakeFiles/leveldb.dir/util/arena.cc.o
[ 63%] Building CXX object CMakeFiles/leveldb.dir/util/bloom.cc.o
[ 65%] Building CXX object CMakeFiles/leveldb.dir/util/cache.cc.o
[ 68%] Building CXX object CMakeFiles/leveldb.dir/util/coding.cc.o
[ 70%] Building CXX object CMakeFiles/leveldb.dir/util/comparator.cc.o
[ 73%] Building CXX object CMakeFiles/leveldb.dir/util/crc32c.cc.o
[ 75%] Building CXX object CMakeFiles/leveldb.dir/util/env.cc.o
[ 78%] Building CXX object CMakeFiles/leveldb.dir/util/filter_policy.cc.o
[ 80%] Building CXX object CMakeFiles/leveldb.dir/util/hash.cc.o
[ 82%] Building CXX object CMakeFiles/leveldb.dir/util/logging.cc.o
[ 85%] Building CXX object CMakeFiles/leveldb.dir/util/options.cc.o
[ 87%] Building CXX object CMakeFiles/leveldb.dir/util/status.cc.o
[ 90%] Building CXX object CMakeFiles/leveldb.dir/util/env_posix.cc.o
[ 92%] Building CXX object CMakeFiles/leveldb.dir/helpers/memenv/memenv.cc.o
[ 95%] Linking CXX static library libleveldb.a
[ 95%] Built target leveldb
Scanning dependencies of target leveldbutil
[ 97%] Building CXX object CMakeFiles/leveldbutil.dir/db/leveldbutil.cc.o
[100%] Linking CXX executable leveldbutil

--- stderr
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_ASM_COMPILER
    CMAKE_ASM_FLAGS

CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_ASM_COMPILER
    CMAKE_ASM_FLAGS

/usr/bin/ld: cannot find -lsnappy
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/leveldbutil.dir/build.make:105: leveldbutil] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:98: CMakeFiles/leveldbutil.dir/all] Error 2
gmake: *** [Makefile:150: all] Error 2
thread 'main' panicked at '
command did not execute successfully, got: exit code: 2

build script failed, must exit now', /home/moul/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.44/src/lib.rs:885:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish...
error: build failed
skade commented 3 years ago

Can you check with 2.0.7?

Keruspe commented 3 years ago

Thanks!

keruspe@Lou /tmp/foobar (git)-[master] % cargo build                                  
   Compiling leveldb-sys v2.0.6
error: could not find native static library `leveldb`, perhaps an -L flag is missing?

error: aborting due to previous error

error: could not compile `leveldb-sys`.

To learn more, run the command again with --verbose.
keruspe@Lou /tmp/foobar (git)-[master] % cargo update -p leveldb-sys --precise=2.0.7  
    Updating crates.io index
    Updating leveldb-sys v2.0.6 -> v2.0.7
keruspe@Lou /tmp/foobar (git)-[master] % cargo build                                  
  Downloaded leveldb-sys v2.0.7
  Downloaded 1 crate (1.3 MB) in 1.91s
   Compiling leveldb-sys v2.0.7
   Compiling foobar v0.1.0 (/tmp/foobar)
    Finished dev [unoptimized + debuginfo] target(s) in 12.55s