https://pantsbuild.org/ logo
#general
Title
# general
n

nice-florist-55958

12/02/2022, 1:40 PM
What does an error like this mean?
Copy code
stderr:
Could not find the installation RECORD for kerberos 1.3.0+krb1.16 under /d/d1/user/taymarti/.cache/pants/named_caches/pex_root/installed_wheels/c51db2b09b8517e2fdbbc7422eedacdd46162b6f2dd15ea8df4b2e99c9c9227c/kerberos-1.3.0+krb1.16-0-cp37-cp37m-manylinux2014_x86_64.whl.ad9a0577715b49b28e33fdaa8407ebcd
Is Pants doing some package metadata validation and this particular wheel doesn't ship correctly? Background: I recently found out our firm builds special wheels for the various kerberos packages (kerberos, pykerberos, gssapi, etc.) that bind specifically to
krb1.16
(so on our index, we have
kerberos==1.3.0+krb1.16
for instance). Previously we were just resolving the latest version and building the wheels locally, but that has started to have consequences as we've deployed applications to different hosts/environments, resulting in obscure errors like
ImportError: /lib64/libk5crypto.so.3 undefined symbol: EVP_KDF_ctrl, version OPENSSL_1_1_1b
when importing
kerberos
. So we added pinned dependencies on the special wheels our firm builds. Resolve works fine, and running apps locally (without Pants) works after exporting the virtual environment. But Pants can't run/package anything depending on this, throwing the above error.
This is what the dist info is in the virtual environment, and I don't see anything obviously wrong (certainly RECORD is there).
Digging into the pex logs, I also don't see anything amiss: Tail-end of the exception traceback from the pex-verbosity=9 log point of failure:
Copy code
File "/d/d1/user/taymarti/.cache/pants/named_caches/pex_root/installed_wheels/dd24a2333561b849fbebe03fe7319585ddb9a8ad512920b6bb2d9249a810cb71/pex-2.1.104-py2.py3-none-any.whl/pex/jobs.py", line 139, in _finalize_job
   self._finalizer(self._process.returncode)
 File "/d/d1/user/taymarti/.cache/pants/named_caches/pex_root/installed_wheels/dd24a2333561b849fbebe03fe7319585ddb9a8ad512920b6bb2d9249a810cb71/pex-2.1.104-py2.py3-none-any.whl/pex/pip/tool.py", line 670, in fixup_install
   version=project_name_and_version.version,
 File "/d/d1/user/taymarti/.cache/pants/named_caches/pex_root/installed_wheels/dd24a2333561b849fbebe03fe7319585ddb9a8ad512920b6bb2d9249a810cb71/pex-2.1.104-py2.py3-none-any.whl/pex/pep_376.py", line 461, in from_prefix_install
   project_name=project_name, version=version, prefix_dir=prefix_dir
pex.pep_376.RecordNotFoundError: Could not find the installation RECORD for kerberos 1.3.0+krb1.16 under /d/d1/user/taymarti/.cache/pants/named_caches/pex_root/installed_wheels/c51db2b09b8517e2fdbbc7422eedacdd46162b6f2dd15ea8df4b2e99c9c9227c/kerberos-1.3.0+krb1.16-0-cp37-cp37m-manylinux2014_x86_64.whl.3fd17ae5c38a474dbfde4a79727fc437
Could not find the installation RECORD for kerberos 1.3.0+krb1.16 under /d/d1/user/taymarti/.cache/pants/named_caches/pex_root/installed_wheels/c51db2b09b8517e2fdbbc7422eedacdd46162b6f2dd15ea8df4b2e99c9c9227c/kerberos-1.3.0+krb1.16-0-cp37-cp37m-manylinux2014_x86_64.whl.3fd17ae5c38a474dbfde4a79727fc437
Listing the path pex says is missing the RECORD:
Copy code
$ ls /d/d1/user/taymarti/.cache/pants/named_caches/pex_root/installed_wheels/c51db2b09b8517e2fdbbc7422eedacdd46162b6f2dd15ea8df4b2e99c9c9227c/kerberos-1.3.0+krb1.16-0-cp37-cp37m-manylinux2014_x86_64.whl.3fd17ae5c38a474dbfde4a79727fc437/lib/python3.7/site-packages                                                                                                                            
kerberos-1.3.0.dist-info kerberos.cpython-37m-x86_64-linux-gnu.so
And listing the dist info, it matches what's in the exported virtual environment:
Copy code
$ ls /d/d1/user/taymarti/.cache/pants/named_caches/pex_root/installed_wheels/c51db2b09b8517e2fdbbc7422eedacdd46162b6f2dd15ea8df4b2e99c9c9227c/kerberos-1.3.0+krb1.16-0-cp37-cp37m-manylinux2014_x86_64.whl.3fd17ae5c38a474dbfde4a79727fc437/lib/python3.7/site-packages/kerberos-1.3.0.dist-info
INSTALLER METADATA RECORD REQUESTED WHEEL direct_url.json top_level.txt
Ah, the issue must be that
+krb1.16
is getting stripped off the .dist-info folder. In the path of the installed wheel
kerberos-1.3.0+krb1.16-0-cp37-cp37m-manylinux2014_x86_64.whl.3fd17ae5c38a474dbfde4a79727fc437
it's
kerberos-1.3.0.dist-info
, when it should be
kerberos-1.3.0+krb1.16.dist-info
(as it is in a virtual environment from pip install). Does pex do this because the
+krb1.16
suffix isn't a valid systematic version string?
e

enough-analyst-54434

12/02/2022, 5:49 PM
That sounds like a straight up Pex bug @nice-florist-55958. I'll try to whip up a self-contained repro here shortly and file an issue.
@nice-florist-55958 what version of Pants are you using? I really need to know the version of Pex, so if you've customized that (you'd know, its non-trivial to do). A quick repro attempt with latest - Pex 2.1.117 does not repro.
Just piling on things you might provide to help investigation: + As said above, what are the Pants and Pex versions involved? If you don't know Pex version Pants version is enough. + Can you hand over the kerberos wheel itself? If not, can you hand over a
zipinfo
of its contents and the contents of its METADATA, WHEEL and RECORD files?
n

nice-florist-55958

12/03/2022, 12:30 AM
Just ack’ this will get back to you this weekend.
4 Views