This is the workaround for the ldd problem. We use ldd to automatically determine the complete set of .so files that should be included. Because ldd is not running, that determination isn’t being made, so some .so files are being incorrectly omitted. That’s the nature of the problem. The workaround is to determine by hand the set of needed .so files, and include them explicitly.
There is no new ppackage. There cannot be, until we update the official release. This is because ppackage is tied to the version of the Panda3D runtime that is provided for download. So you can’t have an updated ppackage without also having an updated Panda3D runtime, and vice-versa.
In this case, the file you need to include is libxml.so.2, since that’s the filename that is trying to load at runtime. But I was assuming you need a different one than the one in /usr/lib, since that’s where the error is coming from. Do you have more than one on your system? It might be that the error is coming from a different .so than libxml, for instance libz. Try running your Python program with strace interactively, to see precisely which so’s are being loaded when it runs normally.
Edit: or, another idea, use your /bin/sh hack to build a p3d file correctly, then look at the build log to see which .so files it selected.
Ah, hmm. So, is it possible that’s it’s pulling in some incorrect version of libz.so, one that lacks the gzopen64 definition? I know you tried explicitly including one that does, but maybe it’s somehow finding a different one anyway? Is there another libz.so on your system that lacks this definition? Do you see an error message on output that indicates it is selecting a particular libz.so arbitrarily?
So the libz.so that’s getting picked up by default lacks this symbol. I wonder where it’s coming from?
When you included /lib/libz.so explicitly, did it not replace the libz.so that was being picked up automatically? Or did they both get included somehow? Check out the contents of the resulting p3d file (or the install directory) to see how many libz.so’s you end up with in different directories, and to see which of them are correct.
Oh, I see. Right, that’s the libz.so that’s being provided as part of morepy. So it appears we have a fundamental incompatibility between cmu’s version of morepy, and your libxml.so.
Though I’m a little surprised that your libz.so didn’t get put first on the path. Try adding extract = True, executable = True to the parameter list to the file() call.
If that doesn’t do it, you might need to remove morepy from the package list.
So, there’s no way forcing a so file to load. BTW, if I remove the newDir=".", the file doesn’t even get included. And after removing morepy, it still loads the libz:
Hmm, well, as rdb pointed out, the most straightforward fix is for us to include the more recent version of libz in the future releases of the Panda3D runtime.
But for your short-term needs, it does appear troubling.
I’m not trying to dissemble. I just mean that it won’t be fixed quickly.
There appear to be two different problems. (1) the libz version provided by the Panda3D runtime is the wrong version. (2) the PATH variable set up by the runtime isn’t allowing the files on your p3d file to shadow the ones in the Panda3D runtime.
We could solve your problem by fixing either one of these problems. But either fix will require a new update of the Panda3D runtime, which won’t be possible in the short term. So, yes, “we can’t do anything”, at least not immediately. But we will solve it eventually.