develooper Front page | perl.perl5.porters | Postings from May 2018

[perl #133236] Perl fails to build with libxcrypt

From:
Petr Pisar
Date:
May 31, 2018 21:39
Subject:
[perl #133236] Perl fails to build with libxcrypt
Message ID:
rt-4.0.24-15154-1527799403-931.133236-75-0@perl.org
# New Ticket Created by  Petr Pisar 
# Please include the string:  [perl #133236]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=133236 >


Hello,

Fedora Linux distribution decided
<https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt>.
to replace GNU libc's libcrypt with libxcrypt implementation
<https://github.com/besser82/libxcrypt>. This caused perl to fail to build
like this:

cc -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -I/usr/src/kernels/4.15.0-0.rc8.git0.1.fc28.x86_64/arch/x86/include -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -std=c89 -O2 -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings pp.c
pp.c: In function ‘Perl_pp_crypt’:
pp.c:3654:47: error: ‘struct crypt_data’ has no member named ‘current_saltbits’
      PL_reentrant_buffer->_crypt_struct_buffer->current_saltbits = 0;
                                               ^~
This is caused by a workaround for a broken glibc perl implements.

Attached patch fixes the failure by constraining the workaround only to broken
glibc versions.

Original patch author is Björn Esser.

-- Petr



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About