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

Building libpng with new zlib #58

Closed
wants to merge 2 commits into from

Conversation

radarhere
Copy link
Collaborator

This PR adds a function that is intended to be build_libpng, but using the zlib generated by build_new_zlib. I imagine you'll have a better idea, but hopefully this is enough to start things going.

If you're interested, the reason that I'm creating this PR is because this version of pillow-wheels config.sh fails in Travis, but this version of pillow-wheels config.sh passes in Travis.

@matthew-brett
Copy link
Collaborator

I don't understand the error - can you say more about why it's happening? It appears that freetype2 and jpg_2000 aren't getting linked, but I can't see any indication why not, apart from this cryptic message : https://travis-ci.org/radarhere/pillow-wheels/jobs/289411067#L754 . I guess it's something to do with the difference between system zlib and compiled zlib on Mac, given that your fix works, but I'd like to understand it better.

@radarhere
Copy link
Collaborator Author

In my investigating, I looked at https://travis-ci.org/radarhere/pillow-wheels/jobs/289411067#L336 -

Undefined symbols for architecture i386:
  "_inflateValidate", referenced from:
      _png_inflate_claim in pngrutil.o
ld: symbol(s) not found for architecture i386

inflateValidate was added in zlib 1.2.9 - https://github.com/madler/zlib/blob/master/contrib/vstudio/vc10/zlibvc.def#L145

OS X 10.10 is the version being tested in Travis. Without knowing exactly which zlib version is on OS X by default, 10.10.5 was released on 13 August 2015. zlib 1.2.9 was released on 31 Dec 2016 - https://zlib.net/ChangeLog.txt

Copy link
Collaborator

@matthew-brett matthew-brett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to be a bit slow to get back to this one - do you mean that, the libpng build is not picking up the new libz? Should /usr/local/lib then be $BUILD_PREFIX ? Maybe that should be there by default? Can you add a test in tests/test_library_builders.sh ?

@radarhere radarhere force-pushed the libpng_zlib branch 2 times, most recently from d4394ce to 32ddbc6 Compare November 5, 2017 05:29
@radarhere
Copy link
Collaborator Author

In these comments, you'll have to ignore failures from 'MB_PYTHON_VERSION=2.7 PLAT=i686' - they are failing due to an unrelated issue.

Changing it from LDFLAGS="-L/usr/local/lib"

I've updated the commit for this PR. See what you think.

@radarhere radarhere changed the title Added build_libpng_with_local function Building libpng with new zlib Nov 5, 2017
@ghost ghost closed this Nov 5, 2017
@ghost ghost reopened this Nov 5, 2017
@ghost
Copy link

ghost commented Nov 5, 2017

This commit is somewhat helpful: MacPython/matplotlib-wheels@0c76cd8. Perhaps this should be fixed for OSX globally?

@ghost ghost mentioned this pull request Nov 6, 2017
@ghost ghost closed this in #67 Nov 7, 2017
@radarhere radarhere deleted the libpng_zlib branch November 7, 2017 20:36
This was referenced Nov 8, 2017
This pull request was closed.
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.

None yet

3 participants