cinder / Cinder

Cinder is a community-developed, free and open source library for professional-quality creative coding in C++.
http://libcinder.org
Other
5.32k stars 939 forks source link

Cairo block, missing _inflateReset2 from libpng16.a #1616

Open dimitre opened 8 years ago

dimitre commented 8 years ago

I'm having this issue now with XCode 8.0 for new projects created with Tinderbox. Strangely enough the Cairo example is running, so maybe it is related to settings?

Undefined symbols for architecture x86_64:
  "_inflateReset2", referenced from:
      _png_inflate_claim in libpng16.a(pngrutil.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any workaround is welcome. Thank you

ryanbartley commented 8 years ago

What branch are you building from?

dimitre commented 8 years ago

@ryanbartley 0.9.0 from the zip file. I'm using homebrew too, already tried to remove / update libraries there too.

ryanbartley commented 8 years ago

I'm not exactly sure why this problem is happening to you. I can check master later today. The problem is basically that libpng is missing zlib symbols, but it really shouldn't be.

ryanbartley commented 7 years ago

Sorry it took me a sec to get back to this. I've just pulled master, both from github and from zip, and created a tinderbox project, adding the cairo block "relative", and it builds fine for me. Note: I'm on xcode 7.* still so that very well may be the difference. If this issue is still persisting, can you try adding -lz to Other Linker Flags - Debug in the Build Settings tab of the xcode project and let me know if that addresses the problem? Also, can you look in that same setting in the cinder.xcodeproj and tell me if one of the linker flags is ../lib/macosx/libz.a (which is the library the above symbols are missing from).

mstllc commented 7 years ago

@ryanbartley I am having this same issue on my MacBook Pro running Mac OS 10.12.1. I don't have libz installed via Homebrew, and I'm using Cinder 0.9.1 from GitHub, updated and rebuilt yesterday.

In response to your last message to @dimitre, the Other Linker Flags - Debug setting was identical between the project I created and the Cairo Basics example bundled with Cinder. I added -lz to the project I created, and now it's building ok.

What does that flag do? Does it help in diagnosing the issue as to why the error would be occurring otherwise?

Thanks