memgraph / rsmgclient

Memgraph database adapter for Rust programming language.
https://crates.io/crates/rsmgclient
Apache License 2.0
38 stars 6 forks source link

Cannot install on Arch under GCC 13.2.1 #45

Closed mrsafalpiya closed 1 year ago

mrsafalpiya commented 1 year ago

I get the following error on running the cargo install rsmgclient command:

$ cargo install rsmgclient
    Updating crates.io index
  Installing rsmgclient v2.0.1
    Updating crates.io index
   Compiling libc v0.2.147
   Compiling memchr v2.6.3
   Compiling glob v0.3.1
   Compiling version_check v0.9.4
   Compiling regex-syntax v0.7.5
   Compiling proc-macro2 v1.0.66
   Compiling unicode-width v0.1.10
   Compiling cfg-if v1.0.0
   Compiling unicode-ident v1.0.11
   Compiling bindgen v0.58.1
   Compiling log v0.4.20
   Compiling strsim v0.8.0
   Compiling termcolor v1.2.0
   Compiling vec_map v0.8.2
   Compiling ansi_term v0.12.1
   Compiling autocfg v1.1.0
   Compiling bitflags v1.3.2
   Compiling humantime v2.1.0
   Compiling lazy_static v1.4.0
   Compiling shlex v1.2.0
   Compiling libloading v0.7.4
   Compiling lazycell v1.3.0
   Compiling textwrap v0.11.0
   Compiling peeking_take_while v0.1.2
   Compiling rustc-hash v1.1.0
   Compiling iana-time-zone v0.1.57
   Compiling maplit v1.0.2
   Compiling num-traits v0.2.16
   Compiling nom v5.1.3
   Compiling clang-sys v1.6.1
   Compiling aho-corasick v1.0.5
   Compiling quote v1.0.33
   Compiling atty v0.2.14
   Compiling which v3.1.1
   Compiling cc v1.0.83
   Compiling clap v2.34.0
   Compiling cmake v0.1.50
   Compiling chrono v0.4.30
   Compiling regex-automata v0.3.8
   Compiling cexpr v0.4.0
   Compiling regex v1.9.5
   Compiling env_logger v0.8.4
   Compiling rsmgclient v2.0.1
error: failed to run custom build command for `rsmgclient v2.0.1`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installaAvowV/release/build/rsmgclient-fa4aaf54e1738f2b/build-script-build` (exit status: 101)
  --- stdout
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
  CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-unknown-linux-gnu = None
  CMAKE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE = None
  CMAKE = None
  running: cd "/tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/home/safal/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rsmgclient-2.0.1/mgclient" "-DCMAKE_INSTALL_PREFIX=/tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/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 13.2.1
  -- The CXX compiler identification is GNU 13.2.1
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- ON LINUX BUILD
  -- BUILD_TESTING: OFF
  -- BUILD_TESTING_INTEGRATION: OFF
  -- BUILD_CPP_BINDINGS: OFF
  -- CMake build type: Release
  -- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.1.2")
  -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
  -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
  -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
  -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
  -- Performing Test COMPILER_HAS_DEPRECATED_ATTR
  -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
  -- Configuring done (0.4s)
  -- Generating done (0.0s)
  -- Build files have been written to: /tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out/build
  running: cd "/tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out/build" && MAKEFLAGS="-j --jobserver-fds=8,9 --jobserver-auth=8,9" "cmake" "--build" "." "--target" "install" "--config" "Release"
  [  5%] Building C object src/CMakeFiles/mgclient-static.dir/mgallocator.c.o
  [ 10%] Building C object src/CMakeFiles/mgclient-static.dir/mgmessage.c.o
  [ 15%] Building C object src/CMakeFiles/mgclient-static.dir/mgclient.c.o
  [ 20%] Building C object src/CMakeFiles/mgclient-shared.dir/mgallocator.c.o
  [ 25%] Building C object src/CMakeFiles/mgclient-shared.dir/mgclient.c.o
  [ 30%] Building C object src/CMakeFiles/mgclient-static.dir/mgsession.c.o
  [ 35%] Building C object src/CMakeFiles/mgclient-shared.dir/mgmessage.c.o
  [ 40%] Building C object src/CMakeFiles/mgclient-shared.dir/mgtransport.c.o
  [ 45%] Building C object src/CMakeFiles/mgclient-static.dir/mgvalue.c.o
  [ 50%] Building C object src/CMakeFiles/mgclient-shared.dir/mgvalue.c.o
  [ 60%] Building C object src/CMakeFiles/mgclient-static.dir/mgsession-decoder.c.o
  [ 60%] Building C object src/CMakeFiles/mgclient-shared.dir/mgsession.c.o
  [ 65%] Building C object src/CMakeFiles/mgclient-static.dir/linux/mgsocket.c.o
  [ 85%] Building C object src/CMakeFiles/mgclient-static.dir/mgtransport.c.o
  [ 85%] Building C object src/CMakeFiles/mgclient-shared.dir/mgsession-encoder.c.o
  [ 85%] Building C object src/CMakeFiles/mgclient-shared.dir/mgsession-decoder.c.o
  [ 85%] Building C object src/CMakeFiles/mgclient-static.dir/mgsession-encoder.c.o
  [ 90%] Building C object src/CMakeFiles/mgclient-shared.dir/linux/mgsocket.c.o
  [ 95%] Linking C static library libmgclient.a
  [ 95%] Built target mgclient-static
  [100%] Linking C shared library libmgclient.so
  [100%] Built target mgclient-shared
  Install the project...
  -- Install configuration: "Release"
  -- Installing: /tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out/lib/libmgclient.a
  -- Installing: /tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out/lib/libmgclient.so.2
  -- Installing: /tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out/lib/libmgclient.so
  -- Installing: /tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out/include
  -- Installing: /tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out/include/mgclient.h
  -- Installing: /tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out/include/mgclient-export.h
  cargo:root=/tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out
  cargo:rerun-if-changed=/tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out/include/mgclient.h
  cargo:rerun-if-changed=/tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out/include/mgclient-export.h
  cargo:rerun-if-changed=/tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out/include/mgclient-export.h
  cargo:rerun-if-changed=/usr/lib/clang/16/include/stdint.h
  cargo:rerun-if-changed=/usr/include/stdint.h
  cargo:rerun-if-changed=/usr/include/bits/libc-header-start.h
  cargo:rerun-if-changed=/usr/include/features.h
  cargo:rerun-if-changed=/usr/include/features-time64.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/timesize.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/stdc-predef.h
  cargo:rerun-if-changed=/usr/include/sys/cdefs.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/long-double.h
  cargo:rerun-if-changed=/usr/include/gnu/stubs.h
  cargo:rerun-if-changed=/usr/include/gnu/stubs-64.h
  cargo:rerun-if-changed=/usr/include/bits/types.h
  cargo:rerun-if-changed=/usr/include/features.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/timesize.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/typesizes.h
  cargo:rerun-if-changed=/usr/include/bits/time64.h
  cargo:rerun-if-changed=/usr/include/bits/wchar.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/stdint-intn.h
  cargo:rerun-if-changed=/usr/include/bits/types.h
  cargo:rerun-if-changed=/usr/include/bits/stdint-uintn.h
  cargo:rerun-if-changed=/usr/include/bits/types.h
  cargo:rerun-if-changed=mgclient/src/mgallocator.h
  cargo:rerun-if-changed=/usr/lib/clang/16/include/stddef.h
  cargo:rerun-if-changed=/usr/lib/clang/16/include/__stddef_max_align_t.h
  cargo:rerun-if-changed=/tmp/cargo-installaAvowV/release/build/rsmgclient-757d8c5d9d4c0a33/out/include/mgclient.h

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

      CMAKE_ASM_COMPILER
      CMAKE_ASM_FLAGS

  thread 'main' panicked at '"mg_value_union_(anonymous_at_mgclient/src/mgvalue_h_127_3)" is not a valid Ident', /home/safal/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.66/src/fallback.rs:774:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: failed to compile `rsmgclient v2.0.1`, intermediate artifacts can be found at `/tmp/cargo-installaAvowV`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
gitbuda commented 1 year ago

Hi @mrsafalpiya, thanks for reporting the issue! 🙏

This seems like an error inside the underlying mgclient related to the latest GCC version (v13.2). Will try to recreate it.

What's your operating system? To make sure it's working as soon as possible.

mrsafalpiya commented 1 year ago

I'm using arch linux with gcc 13.2.1

gitbuda commented 1 year ago

Independently tried on Fedora 38 (it has GCC 13.2, dnf install gcc g++ cmake openssl-devel):

Trying on arch... 😃

gitbuda commented 1 year ago

On menci/archlinuxarm (gcc 12.1 by default, rustc 1.72.0), got different error (rust compiler issue, probably because of some improvements under latest Rust compiler)

Screenshot 2023-09-09 at 12 59 25 PM
gitbuda commented 1 year ago

I've merged an open PR that fixes the c_char (#44), which works now on my Arch version.

Could you retest by running cargo install --git https://github.com/memgraph/rsmgclient?

gitbuda commented 1 year ago

I'm not skillful on Arch, how to install the latest GCC?

mrsafalpiya commented 1 year ago

I'm not skillful on Arch, how to install the latest GCC?

Install the base-devel package using the sudo pacman -Syy base-devel command.

mrsafalpiya commented 1 year ago

I've merged an open PR that fixes the c_char (#44), which works now on my Arch version.

Could you retest by running cargo install --git https://github.com/memgraph/rsmgclient?

  • if it works, I'll publish the new rsmgclient version 🚀
  • if it doesn't work -> please post the error here 🙏

Nope doesn't work. I'm getting the same error:

$ cargo install --git https://github.com/memgraph/rsmgclient
    Updating git repository `https://github.com/memgraph/rsmgclient`
    Updating git submodule `https://github.com/memgraph/mgclient`
  Installing rsmgclient v2.0.1 (https://github.com/memgraph/rsmgclient#5dba3e20)
    Updating crates.io index
   Compiling libc v0.2.147
   Compiling memchr v2.6.3
   Compiling version_check v0.9.4
   Compiling glob v0.3.1
   Compiling proc-macro2 v1.0.66
   Compiling regex-syntax v0.7.5
   Compiling unicode-width v0.1.10
   Compiling cfg-if v1.0.0
   Compiling unicode-ident v1.0.11
   Compiling strsim v0.8.0
   Compiling termcolor v1.2.0
   Compiling autocfg v1.1.0
   Compiling humantime v2.1.0
   Compiling log v0.4.20
   Compiling bindgen v0.58.1
   Compiling bitflags v1.3.2
   Compiling vec_map v0.8.2
   Compiling ansi_term v0.12.1
   Compiling lazy_static v1.4.0
   Compiling rustc-hash v1.1.0
   Compiling textwrap v0.11.0
   Compiling libloading v0.7.4
   Compiling shlex v1.2.0
   Compiling peeking_take_while v0.1.2
   Compiling lazycell v1.3.0
   Compiling iana-time-zone v0.1.57
   Compiling maplit v1.0.2
   Compiling nom v5.1.3
   Compiling num-traits v0.2.16
   Compiling clang-sys v1.6.1
   Compiling aho-corasick v1.0.5
   Compiling quote v1.0.33
   Compiling atty v0.2.14
   Compiling which v3.1.1
   Compiling cc v1.0.83
   Compiling clap v2.34.0
   Compiling chrono v0.4.30
   Compiling cmake v0.1.50
   Compiling regex-automata v0.3.8
   Compiling cexpr v0.4.0
   Compiling regex v1.9.5
   Compiling env_logger v0.8.4
   Compiling rsmgclient v2.0.1 (/home/safal/.cargo/git/checkouts/rsmgclient-8506ab2ac74cbfdf/5dba3e2)
error: failed to run custom build command for `rsmgclient v2.0.1 (/home/safal/.cargo/git/checkouts/rsmgclient-8506ab2ac74cbfdf/5dba3e2)`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installUGIn7p/release/build/rsmgclient-74988f8ee716716d/build-script-build` (exit status: 101)
  --- stdout
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
  CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-unknown-linux-gnu = None
  CMAKE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE = None
  CMAKE = None
  running: cd "/tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/home/safal/.cargo/git/checkouts/rsmgclient-8506ab2ac74cbfdf/5dba3e2/mgclient" "-DCMAKE_INSTALL_PREFIX=/tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/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 13.2.1
  -- The CXX compiler identification is GNU 13.2.1
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- ON LINUX BUILD
  -- BUILD_TESTING: OFF
  -- BUILD_TESTING_INTEGRATION: OFF
  -- BUILD_CPP_BINDINGS: OFF
  -- CMake build type: Release
  -- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.1.2")
  -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
  -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
  -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
  -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
  -- Performing Test COMPILER_HAS_DEPRECATED_ATTR
  -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
  -- Configuring done (0.6s)
  -- Generating done (0.0s)
  -- Build files have been written to: /tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out/build
  running: cd "/tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out/build" && MAKEFLAGS="-j --jobserver-fds=11,12 --jobserver-auth=11,12" "cmake" "--build" "." "--target" "install" "--config" "Release"
  [  5%] Building C object src/CMakeFiles/mgclient-static.dir/mgallocator.c.o
  [ 15%] Building C object src/CMakeFiles/mgclient-static.dir/mgsession.c.o
  [ 15%] Building C object src/CMakeFiles/mgclient-static.dir/mgclient.c.o
  [ 20%] Building C object src/CMakeFiles/mgclient-shared.dir/mgallocator.c.o
  [ 25%] Building C object src/CMakeFiles/mgclient-static.dir/mgmessage.c.o
  [ 30%] Building C object src/CMakeFiles/mgclient-shared.dir/mgclient.c.o
  [ 35%] Building C object src/CMakeFiles/mgclient-shared.dir/mgmessage.c.o
  [ 40%] Building C object src/CMakeFiles/mgclient-shared.dir/mgtransport.c.o
  [ 50%] Building C object src/CMakeFiles/mgclient-shared.dir/mgsession.c.o
  [ 50%] Building C object src/CMakeFiles/mgclient-static.dir/mgsession-decoder.c.o
  [ 55%] Building C object src/CMakeFiles/mgclient-shared.dir/mgsession-decoder.c.o
  [ 70%] Building C object src/CMakeFiles/mgclient-static.dir/linux/mgsocket.c.o
  [ 70%] Building C object src/CMakeFiles/mgclient-static.dir/mgvalue.c.o
  [ 70%] Building C object src/CMakeFiles/mgclient-static.dir/mgsession-encoder.c.o
  [ 75%] Building C object src/CMakeFiles/mgclient-static.dir/mgtransport.c.o
  [ 80%] Building C object src/CMakeFiles/mgclient-shared.dir/mgvalue.c.o
  [ 85%] Building C object src/CMakeFiles/mgclient-shared.dir/mgsession-encoder.c.o
  [ 90%] Building C object src/CMakeFiles/mgclient-shared.dir/linux/mgsocket.c.o
  [ 95%] Linking C static library libmgclient.a
  [ 95%] Built target mgclient-static
  [100%] Linking C shared library libmgclient.so
  [100%] Built target mgclient-shared
  Install the project...
  -- Install configuration: "Release"
  -- Installing: /tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out/lib/libmgclient.a
  -- Installing: /tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out/lib/libmgclient.so.2
  -- Installing: /tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out/lib/libmgclient.so
  -- Installing: /tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out/include
  -- Installing: /tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out/include/mgclient.h
  -- Installing: /tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out/include/mgclient-export.h
  cargo:root=/tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out
  cargo:rerun-if-changed=/tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out/include/mgclient.h
  cargo:rerun-if-changed=/tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out/include/mgclient-export.h
  cargo:rerun-if-changed=/tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out/include/mgclient-export.h
  cargo:rerun-if-changed=/usr/lib/clang/16/include/stdint.h
  cargo:rerun-if-changed=/usr/include/stdint.h
  cargo:rerun-if-changed=/usr/include/bits/libc-header-start.h
  cargo:rerun-if-changed=/usr/include/features.h
  cargo:rerun-if-changed=/usr/include/features-time64.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/timesize.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/stdc-predef.h
  cargo:rerun-if-changed=/usr/include/sys/cdefs.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/long-double.h
  cargo:rerun-if-changed=/usr/include/gnu/stubs.h
  cargo:rerun-if-changed=/usr/include/gnu/stubs-64.h
  cargo:rerun-if-changed=/usr/include/bits/types.h
  cargo:rerun-if-changed=/usr/include/features.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/timesize.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/typesizes.h
  cargo:rerun-if-changed=/usr/include/bits/time64.h
  cargo:rerun-if-changed=/usr/include/bits/wchar.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/stdint-intn.h
  cargo:rerun-if-changed=/usr/include/bits/types.h
  cargo:rerun-if-changed=/usr/include/bits/stdint-uintn.h
  cargo:rerun-if-changed=/usr/include/bits/types.h
  cargo:rerun-if-changed=mgclient/src/mgallocator.h
  cargo:rerun-if-changed=/usr/lib/clang/16/include/stddef.h
  cargo:rerun-if-changed=/usr/lib/clang/16/include/__stddef_max_align_t.h
  cargo:rerun-if-changed=/tmp/cargo-installUGIn7p/release/build/rsmgclient-b6b3d5feecedf0aa/out/include/mgclient.h

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

      CMAKE_ASM_COMPILER
      CMAKE_ASM_FLAGS

  thread 'main' panicked at '"mg_value_union_(anonymous_at_mgclient/src/mgvalue_h_127_3)" is not a valid Ident', /home/safal/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.66/src/fallback.rs:774:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: failed to compile `rsmgclient v2.0.1 (https://github.com/memgraph/rsmgclient#5dba3e20)`, intermediate artifacts can be found at `/tmp/cargo-installUGIn7p`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
gitbuda commented 1 year ago

Managed to reproduce the same issue, I had to run Arch on x86 (https://hub.docker.com/_/archlinux/, seems like the ARM one does not run the same versions), had to run (pasting here just for the record):

docker run -it --rm archlinux:latest bash
pacman -Sy glibc base-devel cmake clang
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
cargo install rsmgclient

Seems like there is some issue with bindgen + Clang 16 (because mgclient compiles on GCC 13) -> https://stackoverflow.com/questions/76443280/rust-bindgen-causes-a-is-not-a-valid-ident-error-on-build

gitbuda commented 1 year ago

Seems like bumping bindgen version to the latest one will solve the issue 🎉 -> #49

@mrsafalpiya could you try it out by

git clone --recurse-submodules https://github.com/memgraph/rsmgclient.git
cd rsmgclient
git checkout fix-clang-16-compilation
cargo build

and verify that everything is working for you?

I'll try to polish and publish the new version to crates in the next day or two 💪

mrsafalpiya commented 1 year ago

Yup it seems to build successfully! 🎉

gitbuda commented 1 year ago

The fix has been released as rsmgclient = "2.0.2" on https://crates.io/crates/rsmgclient CC @mrsafalpiya