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

Windows build broken? error: could not find native static library ggml-base, perhaps an -L flag is missing? #631

Closed
vlovich opened this issue Jan 31, 2025 · 3 comments · Fixed by #632
Labels
🐛 bug something is broken 🪟 windows windows os issues

Comments

@vlovich
Copy link
Contributor

vlovich commented Jan 31, 2025

Not sure what's going on but for some reason getting this error on both windows native & linux->windows cross-compile builds. Is this something you're seeing too? Can't think what changed.

@babichjacob
Copy link
Contributor

I'm on Windows x86_64 (AMD Ryzen 5 5600) and not getting any errors compiling this repository after a fresh git clone https://github.com/utilityai/llama-cpp-rs --recursive nor getting any at runtime, nor when adding llama-cpp-2's most recent published version (0.1.91) as a dependency to another crate and building there.

Is there something I missed trying to reproduce?

@vlovich
Copy link
Contributor Author

vlovich commented Jan 31, 2025

Coworker reported the same issue on Windows natively but I can't speak to their setup as I haven't had this issue. For me it happened trying to cross-compile to Windows from Linux:

rustup target add x86_64-pc-windows-gnu
RUSTC_WRAPPER= cargo build --target "x86_64-pc-windows-gnu" --verbose

@vlovich
Copy link
Contributor Author

vlovich commented Feb 1, 2025

I have a hunch that this has something to do with mingw builds. I believe my coworker was getting the mingw compiler as their C++ compiler for whatever reason. That would track that under mingw builds libraries would need a "lib" prefix although I couldn't quite figure out what the issue on the Windows side was. In any case, the PR strictly improves compat for Linux & should be safe (can't think of any environment it would pose a problem).

@MarcusDunn MarcusDunn linked a pull request Feb 3, 2025 that will close this issue
@MarcusDunn MarcusDunn added 🐛 bug something is broken 🪟 windows windows os issues labels Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug something is broken 🪟 windows windows os issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants