zlib dependencies

I’m trying to get some of the third party libraries made and it appears that libpng depends on zlib… which makes sense. Maybe we should make sure the absence of zlib make sure that libpng isn’t included in makepanda

Well, it’s kind of crazy to compile Panda without png, since you can’t even view the builtin models or so.

ZLib is a very important dependency in Panda - especially since it adds support for .pz models, and .egg.pz files are shipped by default with panda. Also, you’ll find a lot of functionality missing.
I would really recommend to compile with zlib support enabled.

zlib aside, if you provide libpng, it’s up to you to also provide all of libpng’s dependencies. That’s really not part of Panda’s responsibility. If you say “I want to use libpng, here it is”, you can’t get mad if Panda’s build system didn’t detect that you have provided a broken version of libpng.

It is certainly possible to build Panda with libpng and not with zlib, but whether this makes sense is another question, because as you have observed you will still have a dependency on zlib through libpng. I don’t think I want to get in the business of determining which of the various possible combinations of third-party libraries is sensible.


Also, I bet it’s possible to compile libpng without zlib support (you’ll probably not be able to load compressed PNG files) - makepanda can’t smell that, so if you provide a copy of libpng that requires zlib, you shouldn’t freak out if makepanda doesn’t auto-disable libpng.

Yeah that makes sense. This is probably a philosophical debate with no right answer.

I’m just coming from the side of I think most people who compile panda with makepanda are probably going to use the thirdparty libs provided on the site. And those have libpng with a dependency on zlib. Assuming this, having makepanda generate a warning while removing libpng seems like a pretty good way to ensure a successful build.

I guess to me having an easy build system right out of the box is more important than having the flexibility of providing your own third party libs. I think that assuming anyone is going to have libpng compiled without zlib is kind of a stretch where as wanting a minimal compile of panda without zlib is not. If a user comes wants to include png and not zlib then I think a warning should suffice.

Anyways… that’s simply the arguments for it. Either way makes sense to me.