Bug 1536752 - libxcrypt-4.0.0-0.200.20171109git15447aa not compatible with glibc's libcrypt
Summary: libxcrypt-4.0.0-0.200.20171109git15447aa not compatible with glibc's libcrypt
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libxcrypt
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Björn 'besser82' Esser
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-20 17:18 UTC by Petr Pisar
Modified: 2018-06-12 15:02 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2018-06-12 15:02:25 UTC


Attachments (Terms of Use)

Description Petr Pisar 2018-01-20 17:18:36 UTC
Since Fedora's glibc replaced libcrypt with libxcrypt, I can see two classes of failure:

(1) All C++ programs fail to build. Example from perl-Algorithm-SVM-0.13-19.fc28 <https://apps.fedoraproject.org/koschei/build/4029939>:

g++ -c   -Wall -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fstack-clash-protection   -DVERSION=\"0.13\" -DXS_VERSION=\"0.13\" -fPIC "-I/usr/lib64/perl5/CORE"   SVM.c
In file included from /usr/lib64/perl5/CORE/reentr.h:104:0,
                 from /usr/lib64/perl5/CORE/op.h:654,
                 from /usr/lib64/perl5/CORE/perl.h:3921,
                 from SVM.xs:9:
/usr/include/crypt.h:117:51: error: expected ',' or '...' before '__data'
                       struct crypt_data *restrict __data)
                                                   ^~~~~~
(2) perl-5.26.1-403.fc28 fails to build <https://apps.fedoraproject.org/koschei/build/4031090>:

gcc -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fstack-clash-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings -fPIC pp.c
pp.c: In function 'Perl_pp_crypt':
pp.c:3749:47: error: 'struct crypt_data' has no member named 'current_saltbits'
      PL_reentrant_buffer->_crypt_struct_buffer->current_saltbits = 0;
                                               ^~

It looks like libxcrypt-devel-4.0.0-0.200.20171109git15447aa.fc28 needs some fixes.

Comment 1 Björn 'besser82' Esser 2018-01-20 20:17:59 UTC
Thank you for the quick report, so I can sort that out! =)


(In reply to Petr Pisar from comment #0)
> Since Fedora's glibc replaced libcrypt with libxcrypt, I can see two classes
> of failure:
> 
> (1) All C++ programs fail to build. Example from
> perl-Algorithm-SVM-0.13-19.fc28
> <https://apps.fedoraproject.org/koschei/build/4029939>:
> 
> g++ -c   -Wall -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall
> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
> -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fwrapv -fno-strict-aliasing
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe
> -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
> -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong
> --param=ssp-buffer-size=4 -grecord-gcc-switches
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fstack-clash-protection  
> -DVERSION=\"0.13\" -DXS_VERSION=\"0.13\" -fPIC "-I/usr/lib64/perl5/CORE"  
> SVM.c
> In file included from /usr/lib64/perl5/CORE/reentr.h:104:0,
>                  from /usr/lib64/perl5/CORE/op.h:654,
>                  from /usr/lib64/perl5/CORE/perl.h:3921,
>                  from SVM.xs:9:
> /usr/include/crypt.h:117:51: error: expected ',' or '...' before '__data'
>                        struct crypt_data *restrict __data)
>                                                    ^~~~~~

This is fixed in [1].  I will build the new snapshot of libxcrypt soon.


> (2) perl-5.26.1-403.fc28 fails to build
> <https://apps.fedoraproject.org/koschei/build/4031090>:
> 
> gcc -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall
> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
> -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
> -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fstack-clash-protection
> -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -g -Werror=declaration-after-statement -Wextra
> -Wc++-compat -Wwrite-strings -fPIC pp.c
> pp.c: In function 'Perl_pp_crypt':
> pp.c:3749:47: error: 'struct crypt_data' has no member named
> 'current_saltbits'
>       PL_reentrant_buffer->_crypt_struct_buffer->current_saltbits = 0;
>                                                ^~

From looking the source code of this file [1] this seems to be an old crufty fix for some bug in glibc libcrypt v2.25, which is 15 years old…  I've added a patch for that to the Perl package, which can be upstreamed by you.  The build is fine now [2].


> It looks like libxcrypt-devel-4.0.0-0.200.20171109git15447aa.fc28 needs some
> fixes.

Done! ;) Please feel free to report any new problems about libxcrypt to me. =)


[1]  https://github.com/besser82/libxcrypt/commit/de99d27
[2]  https://src.fedoraproject.org/rpms/perl/c/6ce0d0b
[3]  https://koji.fedoraproject.org/koji/taskinfo?taskID=24327052

Comment 2 Björn 'besser82' Esser 2018-01-20 21:07:10 UTC
The build for perl-Algorithm-SVM [1] was successful with the new snapshot of libxcrypt.  Looks like this bug has been resolved.

Please feel free to communicate any problems about libxcrypt in a new bug report to me.  =)


[1]  https://koji.fedoraproject.org/koji/taskinfo?taskID=24328166

Comment 3 Fedora Update System 2018-02-09 12:50:07 UTC
perl-5.24.3-396.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-9ef65cf422

Comment 4 Fedora Update System 2018-02-12 19:09:47 UTC
perl-5.24.3-396.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-9ef65cf422

Comment 5 Fedora End Of Life 2018-02-20 15:37:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 6 Fedora Update System 2018-03-06 17:27:16 UTC
perl-5.24.3-396.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Florian Weimer 2018-06-12 15:02:25 UTC
Closing per comment 2.


Note You need to log in before you can comment on or make changes to this bug.