Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS 14.7 on Apple Silicon - EteBase wheel fails to compile with Rust 1.82 (dependency issue) #328

Open
odkr opened this issue Oct 30, 2024 · 0 comments

Comments

@odkr
Copy link
Contributor

odkr commented Oct 30, 2024

First of all, thanks a lot for the work you put into EteSync!

Since there are no binaries for Apple Silicon-based Macs, I though I just try to install the DAV bridge manually, however, the EteBase wheel fails to compile:

% brew install rust
[...]
==> Installing rust
==> Pouring rust--1.82.0.arm64_sonoma.bottle.tar.gz
[...]
% python3.13 -mvenv ~/.local/opt/etesync-dav
% . ~/.local/opt/etesync-dav/bin/activate
% pip install --upgrade pip
[...]
% cd repos
% git clone https://github.com/etesync/etesync-dav.git
[...]
% cd etesync-dav
% pip install .
[...]
Building wheels for collected packages: etesync-dav, etebase
  Building wheel for etesync-dav (pyproject.toml): started
  Building wheel for etesync-dav (pyproject.toml): finished with status 'done'
  Created wheel for etesync-dav: filename=etesync_dav-0.32.1-py3-none-any.whl size=56491 sha256=b542d38b77c04e2f24759d658e2adde15981970542a69536c28e6c538518356e
  Stored in directory: /Users/odin/Library/Caches/pip/wheels/57/12/26/ac25ec2b5c01303396abf21c0d4a2a8fe47fea0bb6c53252d2
  Building wheel for etebase (pyproject.toml): started
  Building wheel for etebase (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building wheel for etebase (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [210 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build/lib.macosx-14.0-arm64-cpython-313/etebase
      copying etebase/__init__.py -> build/lib.macosx-14.0-arm64-cpython-313/etebase
      running build_ext
      running build_rust
      cargo rustc --lib --message-format=json-render-diagnostics --manifest-path Cargo.toml --release -v --features cpython/extension-module cpython/python3-sys --crate-type cdylib -- -C link-args=-undefined dynamic_lookup -Wl,-install_name,@rpath/etebase_python.cpython-313-darwin.so
         Compiling libc v0.2.73
[...]
         Compiling socket2 v0.3.12
           Running `rustc --crate-name socket2 --edition=2018 /Users/odin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/socket2-0.3.12/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("pair", "reuseport", "unix"))' -C metadata=6ffd2f5cdd8b19ae -C extra-filename=-6ffd2f5cdd8b19ae --out-dir /private/var/folders/2p/_c1f87s146sfdg0pkl379jsw0000gp/T/pip-install-apc3k0e8/etebase_14f832af419542b790933ad9213dfffd/target/release/deps -C strip=debuginfo -L dependency=/private/var/folders/2p/_c1f87s146sfdg0pkl379jsw0000gp/T/pip-install-apc3k0e8/etebase_14f832af419542b790933ad9213dfffd/target/release/deps --extern cfg_if=/private/var/folders/2p/_c1f87s146sfdg0pkl379jsw0000gp/T/pip-install-apc3k0e8/etebase_14f832af419542b790933ad9213dfffd/target/release/deps/libcfg_if-7704ecb5ce617162.rmeta --extern libc=/private/var/folders/2p/_c1f87s146sfdg0pkl379jsw0000gp/T/pip-install-apc3k0e8/etebase_14f832af419542b790933ad9213dfffd/target/release/deps/liblibc-c6d18d87643d19ef.rmeta --cap-lints allow`
         Compiling time v0.1.43
           Running `rustc --crate-name time --edition=2015 /Users/odin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.1.43/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("rustc-serialize"))' -C metadata=680630134ed1b793 -C extra-filename=-680630134ed1b793 --out-dir /private/var/folders/2p/_c1f87s146sfdg0pkl379jsw0000gp/T/pip-install-apc3k0e8/etebase_14f832af419542b790933ad9213dfffd/target/release/deps -C strip=debuginfo -L dependency=/private/var/folders/2p/_c1f87s146sfdg0pkl379jsw0000gp/T/pip-install-apc3k0e8/etebase_14f832af419542b790933ad9213dfffd/target/release/deps --extern libc=/private/var/folders/2p/_c1f87s146sfdg0pkl379jsw0000gp/T/pip-install-apc3k0e8/etebase_14f832af419542b790933ad9213dfffd/target/release/deps/liblibc-c6d18d87643d19ef.rmeta --cap-lints allow`
      error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
         --> /Users/odin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/socket2-0.3.12/src/sockaddr.rs:176:9
          |
      176 |         mem::transmute::<SocketAddrV4, sockaddr_in>(v4);
          |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          |
          = note: source type: `SocketAddrV4` (48 bits)
          = note: target type: `sockaddr_in` (128 bits)
      
           Running `/private/var/folders/2p/_c1f87s146sfdg0pkl379jsw0000gp/T/pip-install-apc3k0e8/etebase_14f832af419542b790933ad9213dfffd/target/release/build/unicase-74aecae5c85480d2/build-script-build`
      For more information about this error, try `rustc --explain E0512`.
      error: could not compile `socket2` (lib) due to 1 previous error
      
      Caused by:
        process didn't exit successfully: `rustc --crate-name socket2 --edition=2018 /Users/odin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/socket2-0.3.12/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("pair", "reuseport", "unix"))' -C metadata=6ffd2f5cdd8b19ae -C extra-filename=-6ffd2f5cdd8b19ae --out-dir /private/var/folders/2p/_c1f87s146sfdg0pkl379jsw0000gp/T/pip-install-apc3k0e8/etebase_14f832af419542b790933ad9213dfffd/target/release/deps -C strip=debuginfo -L dependency=/private/var/folders/2p/_c1f87s146sfdg0pkl379jsw0000gp/T/pip-install-apc3k0e8/etebase_14f832af419542b790933ad9213dfffd/target/release/deps --extern cfg_if=/private/var/folders/2p/_c1f87s146sfdg0pkl379jsw0000gp/T/pip-install-apc3k0e8/etebase_14f832af419542b790933ad9213dfffd/target/release/deps/libcfg_if-7704ecb5ce617162.rmeta --extern libc=/private/var/folders/2p/_c1f87s146sfdg0pkl379jsw0000gp/T/pip-install-apc3k0e8/etebase_14f832af419542b790933ad9213dfffd/target/release/deps/liblibc-c6d18d87643d19ef.rmeta --cap-lints allow` (exit status: 1)
      warning: build failed, waiting for other jobs to finish...
      error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path Cargo.toml --release -v --features 'cpython/extension-module cpython/python3-sys' --crate-type cdylib -- -C 'link-args=-undefined dynamic_lookup -Wl,-install_name,@rpath/etebase_python.cpython-313-darwin.so'` failed with code 101
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for etebase
Successfully built etesync-dav
Failed to build etebase
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (etebase)

I am running macOS 14.7 on a MacBook Pro M1.

I'd be grateful if you could look into this, I haven’t picked up Rust yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant