Bug 11331 - Internal application no longer builds with latest GIT master
Summary: Internal application no longer builds with latest GIT master
Status: RESOLVED WONTFIX
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-11 09:30 UTC by Timothy Pearson
Modified: 2018-09-11 09:53 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Pearson 2018-09-11 09:30:30 UTC
Up until the recent updates (after 2018.08) an internal application using the old setkey()/encrypt() functions was able to compile.  With latest master, compilation fails:

/home/buildroot/project/output/host/bin/powerpc64le-buildroot-linux-gnu-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -fstack-protector-all -Wl,-z,relro -D_FORTIFY_SOURCE=2 -fPIC proprietary.o -o proprietary -lcrypt -lcurl
/home/buildroot/project/output/host/lib/gcc/powerpc64le-buildroot-linux-gnu/8.2.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: proprietary.o: in function `legacy_handler':
proprietary.c:(.text+0x1cc30): undefined reference to `setkey'
/home/buildroot/project/output/host/lib/gcc/powerpc64le-buildroot-linux-gnu/8.2.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: proprietary.c:(.text+0x1cce4): undefined reference to `encrypt'
collect2: error: ld returned 1 exit status
Makefile:62: recipe for target 'proprietary' failed
make[1]: *** [proprietary] Error 1
make[1]: Leaving directory '/home/buildroot/project/output/build/proprietary-origin_master/proprietary'
package/pkg-generic.mk:229: recipe for target '/home/buildroot/project/output/build/proprietary-origin_master/.stamp_built' failed
make: *** [/home/buildroot/project/output/build/proprietary-origin_master/.stamp_built] Error 2
Comment 1 Thomas Petazzoni 2018-09-11 09:39:20 UTC
This is a decision from glibc upstream, which removed those functions from glibc 2.28. See https://lists.gnu.org/archive/html/info-gnu/2018-08/msg00000.html, which says:

"""
* The obsolete functions encrypt, encrypt_r, setkey, setkey_r, cbc_crypt,
  ecb_crypt, and des_setparity are no longer available to newly linked
  binaries, and the headers <rpc/des_crypt.h> and <rpc/rpc_des.h> are no
  longer installed.  These functions encrypted and decrypted data with the
  DES block cipher, which is no longer considered secure.  Software that
  still uses these functions should switch to a modern cryptography library,
  such as libgcrypt.
"""

So, you should fix your application it seems. Buildroot is not going to revert this change, unless you can convince glibc upstream developers to also revert it, which I guess will be challenging.
Comment 2 Timothy Pearson 2018-09-11 09:53:06 UTC
Good to know, thanks!  Wasn't able to find documentation supporting that even after some extensive searching.