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

Linking Error when building pathfinder_canvas with pf-text #554

Closed
DraftedDev opened this issue Feb 15, 2024 · 2 comments
Closed

Linking Error when building pathfinder_canvas with pf-text #554

DraftedDev opened this issue Feb 15, 2024 · 2 comments

Comments

@DraftedDev
Copy link

I get a very ugly Linking Error when trying to build pathfinder_canvas with the pf-text feature.

I use following dependencies:

pathfinder_color = { git = "https://github.com/servo/pathfinder.git" }
pathfinder_content = { git = "https://github.com/servo/pathfinder.git" }
pathfinder_resources = { git = "https://github.com/servo/pathfinder.git" }
pathfinder_renderer = { git = "https://github.com/servo/pathfinder.git" }
pathfinder_gpu = { git = "https://github.com/servo/pathfinder.git" }
pathfinder_canvas = { git = "https://github.com/servo/pathfinder.git", features = ["pf-text"] }
pathfinder_geometry = { git = "https://github.com/servo/pathfinder.git" }

I also use the patch described in #313 to avoid another error:

[patch.crates-io]
pathfinder_gpu = { git = "https://github.com/servo/pathfinder" }
pathfinder_content = { git = "https://github.com/servo/pathfinder" }
pathfinder_color = { git = "https://github.com/servo/pathfinder" }
pathfinder_geometry = { git = "https://github.com/servo/pathfinder" }
pathfinder_renderer = { git = "https://github.com/servo/pathfinder" }
pathfinder_resources = { git = "https://github.com/servo/pathfinder" }
pathfinder_simd = { git = "https://github.com/servo/pathfinder" }

Maybe the bundled feature in the harfbuzz crate can fix this, but I don't think I can [patch] it with cargo.

Linker Error: LINK : fatal error LNK1181: cannot open input file 'harfbuzz.lib'.

See the full error here.


Thanks for any help 😄

@nickspurry
Copy link

I had a similar problem building the native demo and stumbled across this issue.

In my case, uninstalling MSYS2, running cargo clean then rebuilding solved the problem. Not sure if that will also work in your case.

I haven't investigated in much depth, but it looks like MSYS2 and MSVC linkers are interfering with each other somehow.

@DraftedDev
Copy link
Author

I had a similar problem building the native demo and stumbled across this issue.

In my case, uninstalling MSYS2, running cargo clean then rebuilding solved the problem. Not sure if that will also work in your case.

I haven't investigated in much depth, but it looks like MSYS2 and MSVC linkers are interfering with each other somehow.

Thanks! That helped, though it's strange that this even happens at all.

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

2 participants