Skip to content

manylinux2010: Install libxcrypt#325

Merged
lkollar merged 1 commit intopypa:masterfrom
lkollar:manylinux2010-libxcrypt
Jul 22, 2019
Merged

manylinux2010: Install libxcrypt#325
lkollar merged 1 commit intopypa:masterfrom
lkollar:manylinux2010-libxcrypt

Conversation

@lkollar
Copy link
Copy Markdown
Contributor

@lkollar lkollar commented Jul 19, 2019

This will make libcrypt.so.2 available in the image. The GLIBC variants of the header and libraries are deleted in order to force applications to pick up the libxcrypt version.

See #305.

@lkollar
Copy link
Copy Markdown
Contributor Author

lkollar commented Jul 19, 2019

When I tested the libxcrypt build locally in the manylinux2010 image it failed with this error:

lib/crypt-md5.c: In function ‘_crypt_crypt_md5crypt_rn’:
lib/crypt-md5.c:86:15: error: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversion]
   salt_size = strspn (salt, b64t);
               ^~~~~~
cc1: all warnings being treated as errors
make[1]: *** [lib/libcrypt_la-crypt-md5.lo] Error 1
make: *** [all] Error 2
lib/crypt-md5.c: In function ‘_crypt_crypt_md5crypt_rn’:
lib/crypt-md5.c:86:15: error: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversion]
   salt_size = strspn (salt, b64t);
               ^~~~~~
cc1: all warnings being treated as errors
make: *** [lib/libcrypt_la-crypt-md5.lo] Error 1

GCC:

[root@40d2f86f100f build_scripts]# gcc --version
gcc (GCC) 8.2.1 20180905 (Red Hat 8.2.1-3)

It is supposed to compile with GCC 9 so not sure if it's this particular GCC version or something else.

@zackw
Copy link
Copy Markdown

zackw commented Jul 19, 2019

Upstream libxcrypt uses extremely paranoid warnings settings for development, but unfortunately that means it's sensitive to the exact compiler version in use. For installation into manylinux I recommend configuring with --disable-werror.

@lkollar lkollar force-pushed the manylinux2010-libxcrypt branch 2 times, most recently from 201440b to c4b5e23 Compare July 19, 2019 15:44
@lkollar lkollar changed the title WIP: Install libxcrypt Install libxcrypt Jul 19, 2019
@lkollar lkollar changed the title Install libxcrypt manylinux2010: Install libxcrypt Jul 19, 2019
@lkollar
Copy link
Copy Markdown
Contributor Author

lkollar commented Jul 22, 2019

Successfully tested this with pyphash:

[root@9f14cc2348da ~]# /opt/python/cp37-cp37m/bin/python -c "import pyphash"
[root@9f14cc2348da ~]# ldd /opt/python/cp37-cp37m/lib/python3.7/site-packages/pyphash.cpython-37m-x86_64-linux-gnu.so
	linux-vdso.so.1 =>  (0x00007ffec37ef000)
	libcrypt.so.2 => /usr/local/lib/libcrypt.so.2 (0x00007f4a33f14000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4a33cf7000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f4a33963000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f4a3434f000)
[root@9f14cc2348da ~]#

@takluyver
Copy link
Copy Markdown
Member

Don't forget to remove the tarball from this PR too.

This will make `libcrypt.so.2` available in the image. The GLIBC
variants of the header and libraries are deleted in order to force
applications to pick up the `libxcrypt` version.
@lkollar lkollar force-pushed the manylinux2010-libxcrypt branch from c4b5e23 to 28f7ee4 Compare July 22, 2019 11:56
@lkollar
Copy link
Copy Markdown
Contributor Author

lkollar commented Jul 22, 2019

Looks like I forgot to push the change to remove the tarball. Updated the PR.

@lkollar lkollar merged commit d8ef5d4 into pypa:master Jul 22, 2019
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.

4 participants