Skip to content

linking failure for rust 1.83 & onwards on iOS #337

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

Open
Parth opened this issue Apr 18, 2025 · 0 comments
Open

linking failure for rust 1.83 & onwards on iOS #337

Parth opened this issue Apr 18, 2025 · 0 comments

Comments

@Parth
Copy link

Parth commented Apr 18, 2025

I'm working on lockbook, a cross platform note taking app.

We recently upgraded to rust 1.86 and found our iOS build broken:

          Undefined symbols for architecture arm64:
            "___chkstk_darwin", referenced from:
                _HUF_compress1X_usingCTable_internal in libzstd_sys-4271429fa83727a6.rlib[13](1ddd1489cc625d97-huf_compress.o)
                _ZSTD_RowFindBestMatch_noDict_4_4 in libzstd_sys-4271429fa83727a6.rlib[20](1ddd1489cc625d97-zstd_lazy.o)
                _ZSTD_RowFindBestMatch_noDict_4_5 in libzstd_sys-4271429fa83727a6.rlib[20](1ddd1489cc625d97-zstd_lazy.o)
                _ZSTD_RowFindBestMatch_noDict_4_6 in libzstd_sys-4271429fa83727a6.rlib[20](1ddd1489cc625d97-zstd_lazy.o)
                _ZSTD_RowFindBestMatch_noDict_5_4 in libzstd_sys-4271429fa83727a6.rlib[20](1ddd1489cc625d97-zstd_lazy.o)
                _ZSTD_RowFindBestMatch_noDict_5_5 in libzstd_sys-4271429fa83727a6.rlib[20](1ddd1489cc625d97-zstd_lazy.o)
                _ZSTD_RowFindBestMatch_noDict_5_6 in libzstd_sys-4271429fa83727a6.rlib[20](1ddd1489cc625d97-zstd_lazy.o)
                ...
          ld: symbol(s) not found for architecture arm64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

I was able to create a minimal reproducible example here in your repo:

 # for your reference
rustup target add aarch64-apple-ios

# last working version
rustup default 1.82

# will begin to execute successfully, but will fail because macOS, this is fine
cargo run --example basic --target=aarch64-apple-ios

# first non-working version, all subsequent versions fail similarly
rustup default 1.83

# for your reference
rustup target add aarch64-apple-ios

# fails to link with the above message
cargo run --example basic --target=aarch64-apple-ios

We're not using zstd directly but rather tantivy for our search experience, just for reference our dependency tree looks like this:

zstd v0.13.3
└── tantivy-sstable v0.3.0
    └── tantivy-columnar v0.3.0
        └── tantivy v0.22.0
            └── lb-rs v0.9.22 (/Users/parth/Documents/lockbook/lockbook/libs/lb/lb-rs)
                ├── lb-c v0.9.22 (/Users/parth/Documents/lockbook/lockbook/libs/lb/lb-c)
                │   └── workspace-ffi v0.9.22 (/Users/parth/Documents/lockbook/lockbook/libs/content/workspace-ffi)
                └── workspace v0.9.22 (/Users/parth/Documents/lockbook/lockbook/libs/content/workspace)
                    └── workspace-ffi v0.9.22 (/Users/parth/Documents/lockbook/lockbook/libs/content/workspace-ffi)
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