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

add support for building zlib and libpng libraries in setup-build-freetype.py #133

Closed
wants to merge 3 commits into from

Conversation

mammo0
Copy link
Contributor

@mammo0 mammo0 commented Dec 22, 2020

Hello,

this PR is for solving #123.

Building with zlib or libpng support is disabled by default. So there's no new default behavior of this script.
But if you want to build with

  • zlib support, set the environment variable FREETYPEPY_WITH_ZLIB to some value, e.g. 1
  • libpng support, set the environment variable FREETYPEPY_WITH_LIBPNG to some value, e.g. 1

-> build zlib with 'FREETYPEPY_WITH_ZLIB=1'
-> build libpng with 'FREETYPEPY_WITH_LIBPNG=1'
@HinTak
Copy link
Collaborator

HinTak commented Dec 23, 2020

If you bundle very common libraries like zlib and libpng you might need to look into the symbol export systems (not sure about it under cmake etc, but it is part of autoconf'ed build) not to re-export 3rd-party symbols, to avoid the Linux version of dll hell - where software using freetype and libpng get confused by the bundled libpng symbols within your build of freetype.

@mammo0 mammo0 mentioned this pull request Dec 23, 2020
@mammo0
Copy link
Contributor Author

mammo0 commented Dec 23, 2020

Well, honestly I've got not the knowledge of how the re-export of the symbols can be prevented.

I have oriented myself on how harfbuzz was built into the freetype library. After it worked for me, I just opened the PR here...

@HinTak
Copy link
Collaborator

HinTak commented Dec 24, 2020

The autoconf build of freetype sets symbols to be by default hidden, and passes a linker script to the linker to explicitly declare which symbols are exported.

@mammo0
Copy link
Contributor Author

mammo0 commented Dec 24, 2020

Ok, can you show me an example?

@HinTak
Copy link
Collaborator

HinTak commented Dec 24, 2020

@mammo0
Copy link
Contributor Author

mammo0 commented Dec 24, 2020

So the variable EXPORTS_LIST should be set?

I'm sorry, but I don't have much experience in C/C++ and library programming... So maybe you can make the necessary changes? Because it seems you know what you're talking about...

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

Successfully merging this pull request may close these issues.

2 participants