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

Compile Error: assertion left == right failed: Unexpected output from mysql_config: -L/usr/local/mysql/lib -lmysqlclient -lssl -lcrypto -lresolv #4069

Closed
3 tasks
prodbyola opened this issue Jun 12, 2024 · 1 comment · Fixed by #4070
Labels

Comments

@prodbyola
Copy link

prodbyola commented Jun 12, 2024

Setup

Versions

  • **Rust:1.72
  • **Diesel:2.2.0
  • **Database:MySQL
  • **Operating SystemMacOS 12

Feature Flags

  • diesel: ["mysql", "chrono", "r2d2"]

Problem Description

I've been using diesel for awhile with no issue. Recently I started getting this compilation error and all efforts to troubleshoot have failed, including downgrading to previous versions. This is the error:

--- stderr
  thread 'main' panicked at /Users/prodbyola/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mysqlclient-sys-0.3.1/build.rs:59:9:
  assertion `left == right` failed: Unexpected output from mysql_config: `-L/usr/local/mysql/lib -lmysqlclient -lssl -lcrypto -lresolv`
    left: 5
   right: 2
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I also tried moving my project to Windows (WSL) to be sure it's not platform-specific issue. But I got very similar error. I'm not sure how to fix this please.

What are you trying to accomplish?

What is the expected output?

What is the actual output?

Are you seeing any additional errors?

Steps to reproduce

Checklist

  • This issue can be reproduced on Rust's stable channel. (Your issue will be
    closed if this is not the case)
  • This issue can be reproduced without requiring a third party crate
@prodbyola prodbyola added the bug label Jun 12, 2024
@weiznich
Copy link
Member

Thanks for reporting.
This is an issue in the mysqlclient-sys crate, not a diesel issue. The build script logic there expects a different output from the mysql_config tool.

You likely can workaround this by setting the MYSQLCLIENT_LIB_DIR environment variable to point to the right folder.

weiznich added a commit to weiznich/diesel that referenced this issue Jun 13, 2024
weiznich added a commit to weiznich/diesel that referenced this issue Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants