Bug 4553 - cracklib: do_compile failed on RHEL5.8 in which glibc version less than 2.9
Summary: cracklib: do_compile failed on RHEL5.8 in which glibc version less than 2.9
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Hongxu Jia
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-05-24 09:51 UTC by Hongxu Jia
Modified: 2013-05-30 03:23 UTC (History)
11 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hongxu Jia 2013-05-24 09:51:16 UTC
*env
Build Configuration:
BB_VERSION        = "1.19.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "RedHatEnterpriseClient-5.8"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.4+snapshot-20130524"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "hongxu-0524:e8197722de1f6006ceae0d4266de91c1db7278e3"

Update python to 2.6
glibc's version: glibc-2.5-81

*problem
do_compile cracklib failed
...
| ../lib/.libs/libcrack.so: undefined reference to `be64toh'
| ../lib/.libs/libcrack.so: undefined reference to `htobe16'
| ../lib/.libs/libcrack.so: undefined reference to `htobe32'
| ../lib/.libs/libcrack.so: undefined reference to `htobe64'
| ../lib/.libs/libcrack.so: undefined reference to `be32toh'
| ../lib/.libs/libcrack.so: undefined reference to `be16toh'
| collect2: ld returned 1 exit status
...

*analysis
cracklib invokes C functions `be16toh/be32toh/be64toh/htobe16/htobe32/htobe64'
to fix endian issue on multi platform, but these functions are nonstandard
which were added to glibc in version 2.9. So do_compile failed while host's
glibc version < 2.9

*solution
Use standard `htons/htonl/ntohs/ntohl' instead. For the `be64toh/htobe64',
there is not similar functions, we define `ntohll/htonll' on local to replace.
Comment 1 Hongxu Jia 2013-05-30 03:23:49 UTC
There are two solution to fix this issue, and Mark Hatle's is better.

Merged into master:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5a607c1e48c6921ceaf393cd71a36cf5ace2f3fa