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

chore: use freetype to replace freetype-sys #70

Closed
wants to merge 1 commit into from

Conversation

@Brooooooklyn
Copy link

Brooooooklyn commented Feb 24, 2018

I'm trying to build a node canvas with rust: context_2d, and borrowed tones of codes from servo.

When I was trying to built it on linux, it crashed with:

error: multiple packages link to native library `freetype`, but a native library can be linked only once

package `servo-freetype-sys v4.0.3`
    ... which is depended on by `azure v0.25.0`
    ... which is depended on by `rustcanvas v0.1.0 (file:///Users/longyinan/workspace/Github/rust-canvas)`
links to native library `freetype`

package `freetype-sys v0.6.0`
    ... which is depended on by `pathfinder_font_renderer v0.1.0 (https://github.com/rust-canvas/pathfinder?branch=rust-canvas#5f082aa4)`
    ... which is depended on by `rustcanvas v0.1.0 (file:///Users/longyinan/workspace/Github/rust-canvas)`
also links to native library `freetype`

So I change the dependencies in pathfinder to pass the compile, and I have no idea about the differences between the freetype-sys & freetype.

Please tell me if you think this Pull Request is unreasonable, and feel free to close it.

@Brooooooklyn Brooooooklyn force-pushed the rust-canvas:feature/use-freetype branch from c288333 to 76d9f7a Feb 24, 2018
@Brooooooklyn Brooooooklyn force-pushed the rust-canvas:feature/use-freetype branch from 76d9f7a to 9d8a9f9 Feb 24, 2018
@messense
Copy link

messense commented Feb 28, 2018

It fails to compile because freetype-sys specified links key in its Cargo.toml which is sensible IMO.

@Brooooooklyn
Copy link
Author

Brooooooklyn commented Feb 28, 2018

Yes, I know what caused built failed, what I don't understand is, what's the differences between the freetype-sys & freetype.

@messense
Copy link

messense commented Feb 28, 2018

I think the differences is that freetype-sys only dynamically links to libfreetype2 installed on your system, while freetype by default depends on servo-freetype-sys which bundles libfreetype2 source code and links to it statically.

@pcwalton
Copy link
Collaborator

pcwalton commented Mar 4, 2018

I'm a bit confused as to what's going on with this PR.

@Brooooooklyn
Copy link
Author

Brooooooklyn commented Mar 5, 2018

ehh.. it's just make pathfinder work with rust-azure

@pcwalton
Copy link
Collaborator

pcwalton commented Mar 6, 2018

I'm going to go ahead and close this in favor of the current dynamic linking behavior, but feel free to reopen if a better solution is found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.