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

Difficulty building on M1 mac #81

Open
rob-p opened this issue Aug 26, 2024 · 2 comments
Open

Difficulty building on M1 mac #81

rob-p opened this issue Aug 26, 2024 · 2 comments

Comments

@rob-p
Copy link

rob-p commented Aug 26, 2024

Hi @jguhlin,

I encounter the following error when attempting to include the minimap2-rs crate when building on OSX on an M1 Mac (MacOS 13.4):

  = note: ld: warning: directory not found for option '-L/Users/rob/software_src/oarfish/target/release/build/libz-sys-388cc2f2b07c10b2/out/lib64'
          Undefined symbols for architecture arm64:
            "_gzclose", referenced from:
                _mm_bseq_close in libminimap2_sys-4b0173a9259d886d.rlib(aa1d8596991defc1-bseq.o)
            "_gzdopen", referenced from:
                _mm_bseq_open in libminimap2_sys-4b0173a9259d886d.rlib(aa1d8596991defc1-bseq.o)
            "_gzopen", referenced from:
                _mm_bseq_open in libminimap2_sys-4b0173a9259d886d.rlib(aa1d8596991defc1-bseq.o)
            "_gzread", referenced from:
                _ks_getuntil2 in libminimap2_sys-4b0173a9259d886d.rlib(aa1d8596991defc1-bseq.o)
                _kseq_read in libminimap2_sys-4b0173a9259d886d.rlib(aa1d8596991defc1-bseq.o)
          ld: symbol(s) not found for architecture arm64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

Have you seen anything like this before? Any idea why the relevant libz functions might not be found?

Thanks!

@rob-p
Copy link
Author

rob-p commented Aug 26, 2024

I was able to get this to compile by manually overriding the rust flags (as below), but that shouldn’t be necessary. Any ideas why?

RUSTFLAGS=‘-C link-args=-lz’ cargo build —-release

@jguhlin
Copy link
Owner

jguhlin commented Aug 27, 2024 via email

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

3 participants
@rob-p @jguhlin and others