libmemcached-1.0.15 build fails on RHEL5 with gcc-4.7.2

Bug #1258180 reported by Jiri Jevicky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libmemcached
New
Undecided
Unassigned

Bug Description

I'm trying to build libmemcached-1.0.15 on RHEL5 and RHEL6 (via mock installed on RHEL6 machine). Details of actual mock environments are in attachment RHELX_root.log. I'm using custom-built gcc-4.7.2.
note1: every custom-build package has 'adl-' prefix
note2: by 'custom-built I mean just getting sources of gcc-4.7.2.tar.bz2, gmp-5.1.0.tar.bz2, mpc-1.0.1.tar.gz and mpfr-3.1.1.tar.bz2 and compiling them on the right platform (RHEL5 and RHEL6). The only difference in in install path, which is in /opt/shared/. Of course, environment variables has to be set and correct -I flags provided, which I had done.

Build is set-up in Fedora-like style (sources->srpm->compilation->rpm)

In RHEL6 environment, the build passes flawlessly.
In RHEL5 environment, the build fails with following errors:
#############################################################
  CXXLD clients/libutilities.la
libmemcachedprotocol/.libs/libmemcached_libmemcachedprotocol_la-binary_handler.o: In function `recv':
/usr/include/bits/socket2.h:35: multiple definition of `recv'
libmemcachedprotocol/.libs/libmemcached_libmemcachedprotocol_la-ascii_handler.o:/usr/include/bits/socket2.h:35: first defined here
libmemcachedprotocol/.libs/libmemcached_libmemcachedprotocol_la-binary_handler.o: In function `recvfrom':
/usr/include/bits/socket2.h:55: multiple definition of `recvfrom'
libmemcachedprotocol/.libs/libmemcached_libmemcachedprotocol_la-ascii_handler.o:/usr/include/bits/socket2.h:55: first defined here
libmemcachedprotocol/.libs/libmemcached_libmemcachedprotocol_la-binary_handler.o: In function `stpncpy':
/usr/include/bits/string3.h:160: multiple definition of `stpncpy'
libmemcachedprotocol/.libs/libmemcached_libmemcachedprotocol_la-ascii_handler.o:/usr/include/bits/string3.h:160: first defined here
...
... full error build log in attachment "RHEL5_build.log" (compiled with -v -Wl,-trace flags)
##############################################################
This error suggests, the are some symbols in .o files, that should not be there - and really: I believe all those .hidden except memcached_ascii_protocol_process_data are not supposed to be there:
##############################################################
[jevickyj@voda .libs]$ objdump -t libmemcached_libmemcachedprotocol_la-ascii_handler.o

libmemcached_libmemcachedprotocol_la-ascii_handler.o: file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l df *ABS* 0000000000000000 ascii_handler.c
0000000000000000 l d .text 0000000000000000 .text
0000000000000000 l d .data 0000000000000000 .data
0000000000000000 l d .bss 0000000000000000 .bss
0000000000000000 l F .text 00000000000000a9 parse_ascii_key
0000000000000000 l d .rodata.str1.1 0000000000000000 .rodata.str1.1
00000000000000b0 l F .text 00000000000001d7 ascii_get_response_handler
0000000000000000 l d .rodata.str1.8 0000000000000000 .rodata.str1.8
0000000000000290 l F .text 00000000000000a4 raw_response_handler
0000000000000340 l F .text 00000000000000ae ascii_stat_response_handler
00000000000003f0 l F .text 000000000000005c ascii_version_response_handler
0000000000000450 l F .text 0000000000000033 send_command_usage
0000000000000000 l d .rodata 0000000000000000 .rodata
0000000000000000 l d .debug_frame 0000000000000000 .debug_frame
0000000000000000 l d .eh_frame 0000000000000000 .eh_frame
0000000000000000 l d .debug_info 0000000000000000 .debug_info
0000000000000000 l d .debug_abbrev 0000000000000000 .debug_abbrev
0000000000000000 l d .debug_loc 0000000000000000 .debug_loc
0000000000000000 l d .debug_aranges 0000000000000000 .debug_aranges
0000000000000000 l d .debug_ranges 0000000000000000 .debug_ranges
0000000000000000 l d .debug_line 0000000000000000 .debug_line
0000000000000000 l d .debug_str 0000000000000000 .debug_str
0000000000000000 l d .note.GNU-stack 0000000000000000 .note.GNU-stack
000000000000000d l .rodata.str1.1 0000000000000000 .LC36
0000000000000016 l .rodata.str1.1 0000000000000000 .LC37
0000000000000000 l .rodata.str1.1 0000000000000000 .LC35
0000000000000000 l .rodata.str1.8 0000000000000000 .LC38
0000000000000019 l .rodata.str1.1 0000000000000000 .LC39
0000000000000023 l .rodata.str1.1 0000000000000000 .LC40
0000000000000029 l .rodata.str1.1 0000000000000000 .LC41
000000000000002b l .rodata.str1.1 0000000000000000 .LC42
0000000000000031 l .rodata.str1.1 0000000000000000 .LC43
00000000000001b9 l .rodata.str1.1 0000000000000000 .LC75
000000000000014e l .rodata.str1.1 0000000000000000 .LC63
0000000000000440 l .rodata.str1.8 0000000000000000 .LC46
00000000000001b4 l .rodata.str1.1 0000000000000000 .LC73
0000000000000498 l .rodata.str1.8 0000000000000000 .LC71
00000000000001ae l .rodata.str1.1 0000000000000000 .LC72
00000000000004c0 l .rodata.str1.8 0000000000000000 .LC74
00000000000000d1 l .rodata.str1.1 0000000000000000 .LC56
00000000000000e2 l .rodata.str1.1 0000000000000000 .LC57
00000000000000f7 l .rodata.str1.1 0000000000000000 .LC58
000000000000010a l .rodata.str1.1 0000000000000000 .LC59
000000000000011a l .rodata.str1.1 0000000000000000 .LC60
000000000000012f l .rodata.str1.1 0000000000000000 .LC61
000000000000013e l .rodata.str1.1 0000000000000000 .LC62
000000000000003a l .rodata.str1.1 0000000000000000 .LC47
0000000000000049 l .rodata.str1.1 0000000000000000 .LC48
0000000000000058 l .rodata.str1.1 0000000000000000 .LC49
000000000000006b l .rodata.str1.1 0000000000000000 .LC50
000000000000007a l .rodata.str1.1 0000000000000000 .LC51
000000000000008c l .rodata.str1.1 0000000000000000 .LC52
000000000000009f l .rodata.str1.1 0000000000000000 .LC53
00000000000000b1 l .rodata.str1.1 0000000000000000 .LC54
00000000000000c1 l .rodata.str1.1 0000000000000000 .LC55
0000000000000468 l .rodata.str1.8 0000000000000000 .LC64
000000000000018b l .rodata.str1.1 0000000000000000 .LC68
00000000000001a4 l .rodata.str1.1 0000000000000000 .LC70
0000000000000161 l .rodata.str1.1 0000000000000000 .LC65
0000000000000197 l .rodata.str1.1 0000000000000000 .LC69
0000000000000179 l .rodata.str1.1 0000000000000000 .LC66
0000000000000182 l .rodata.str1.1 0000000000000000 .LC67
0000000000000000 l d .comment 0000000000000000 .comment
0000000000000000 *UND* 0000000000000000 _GLOBAL_OFFSET_TABLE_
0000000000000000 *UND* 0000000000000000 __ctype_b_loc
0000000000000000 *UND* 0000000000000000 __snprintf_chk
0000000000000000 *UND* 0000000000000000 __stack_chk_fail
0000000000000000 *UND* 0000000000000000 stderr
0000000000000000 *UND* 0000000000000000 __fprintf_chk
0000000000000000 *UND* 0000000000000000 strlen
0000000000000490 g F .text 0000000000000005 .hidden recv
00000000000004a0 g F .text 0000000000000005 .hidden recvfrom
00000000000004b0 g F .text 0000000000000005 .hidden stpncpy
00000000000004c0 g F .text 000000000000001c .hidden __pthread_cleanup_routine
00000000000004e0 g F .text 0000000000000005 .hidden read
00000000000004f0 g F .text 0000000000000005 .hidden pread
0000000000000500 g F .text 0000000000000005 .hidden pread64
0000000000000510 g F .text 0000000000000005 .hidden readlink
0000000000000520 g F .text 0000000000000005 .hidden readlinkat
0000000000000530 g F .text 0000000000000005 .hidden getcwd
0000000000000540 g F .text 0000000000000005 .hidden getwd
0000000000000550 g F .text 0000000000000005 .hidden confstr
0000000000000560 g F .text 0000000000000005 .hidden getgroups
0000000000000570 g F .text 0000000000000005 .hidden ttyname_r
0000000000000580 g F .text 0000000000000005 .hidden getlogin_r
0000000000000590 g F .text 0000000000000005 .hidden gethostname
00000000000005a0 g F .text 0000000000000005 .hidden getdomainname
00000000000005b0 g F .text 0000000000000005 .hidden gets
00000000000005c0 g F .text 0000000000000005 .hidden fgets
00000000000005d0 g F .text 0000000000000005 .hidden fgets_unlocked
00000000000005e0 g F .text 0000000000000005 .hidden realpath
00000000000005f0 g F .text 0000000000000005 .hidden ptsname_r
0000000000000600 g F .text 0000000000000005 .hidden wctomb
0000000000000610 g F .text 0000000000000005 .hidden mbstowcs
0000000000000620 g F .text 0000000000000005 .hidden wcstombs
0000000000000630 g F .text 00000000000010b6 .hidden memcached_ascii_protocol_process_data
0000000000000000 *UND* 0000000000000000 memchr
0000000000000000 *UND* 0000000000000000 strncmp
0000000000000000 *UND* 0000000000000000 abort
0000000000000000 *UND* 0000000000000000 strtoul
0000000000000000 *UND* 0000000000000000 strtoull
###################################################################
Just for comparation - the same on RHEL6:
###################################################################
[jevickyj@voda .libs]$ objdump -t libmemcached_libmemcachedprotocol_la-ascii_handler.o

libmemcached_libmemcachedprotocol_la-ascii_handler.o: file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l df *ABS* 0000000000000000 ascii_handler.c
0000000000000000 l d .text 0000000000000000 .text
0000000000000000 l d .data 0000000000000000 .data
0000000000000000 l d .bss 0000000000000000 .bss
0000000000000000 l F .text 00000000000000a9 parse_ascii_key
0000000000000000 l d .rodata.str1.1 0000000000000000 .rodata.str1.1
00000000000000b0 l F .text 00000000000001c7 ascii_get_response_handler
0000000000000000 l d .rodata.str1.8 0000000000000000 .rodata.str1.8
0000000000000280 l F .text 00000000000000a4 raw_response_handler
0000000000000330 l F .text 00000000000000ae ascii_stat_response_handler
00000000000003e0 l F .text 000000000000005c ascii_version_response_handler
0000000000000440 l F .text 0000000000000033 send_command_usage
0000000000000000 l d .rodata 0000000000000000 .rodata
0000000000000000 l d .debug_info 0000000000000000 .debug_info
0000000000000000 l d .debug_abbrev 0000000000000000 .debug_abbrev
0000000000000000 l d .debug_loc 0000000000000000 .debug_loc
0000000000000000 l d .debug_aranges 0000000000000000 .debug_aranges
0000000000000000 l d .debug_ranges 0000000000000000 .debug_ranges
0000000000000000 l d .debug_line 0000000000000000 .debug_line
0000000000000000 l d .debug_str 0000000000000000 .debug_str
0000000000000000 l d .note.GNU-stack 0000000000000000 .note.GNU-stack
0000000000000000 l d .eh_frame 0000000000000000 .eh_frame
000000000000000d l .rodata.str1.1 0000000000000000 .LC36
0000000000000016 l .rodata.str1.1 0000000000000000 .LC37
0000000000000000 l .rodata.str1.1 0000000000000000 .LC35
0000000000000000 l .rodata.str1.8 0000000000000000 .LC38
0000000000000019 l .rodata.str1.1 0000000000000000 .LC39
0000000000000023 l .rodata.str1.1 0000000000000000 .LC40
0000000000000029 l .rodata.str1.1 0000000000000000 .LC41
000000000000002b l .rodata.str1.1 0000000000000000 .LC42
0000000000000031 l .rodata.str1.1 0000000000000000 .LC43
00000000000001b9 l .rodata.str1.1 0000000000000000 .LC75
000000000000014e l .rodata.str1.1 0000000000000000 .LC63
0000000000000440 l .rodata.str1.8 0000000000000000 .LC46
00000000000001b4 l .rodata.str1.1 0000000000000000 .LC73
0000000000000498 l .rodata.str1.8 0000000000000000 .LC71
00000000000001ae l .rodata.str1.1 0000000000000000 .LC72
00000000000004c0 l .rodata.str1.8 0000000000000000 .LC74
00000000000000d1 l .rodata.str1.1 0000000000000000 .LC56
00000000000000e2 l .rodata.str1.1 0000000000000000 .LC57
00000000000000f7 l .rodata.str1.1 0000000000000000 .LC58
000000000000010a l .rodata.str1.1 0000000000000000 .LC59
000000000000011a l .rodata.str1.1 0000000000000000 .LC60
000000000000012f l .rodata.str1.1 0000000000000000 .LC61
000000000000013e l .rodata.str1.1 0000000000000000 .LC62
000000000000003a l .rodata.str1.1 0000000000000000 .LC47
0000000000000049 l .rodata.str1.1 0000000000000000 .LC48
0000000000000058 l .rodata.str1.1 0000000000000000 .LC49
000000000000006b l .rodata.str1.1 0000000000000000 .LC50
000000000000007a l .rodata.str1.1 0000000000000000 .LC51
000000000000008c l .rodata.str1.1 0000000000000000 .LC52
000000000000009f l .rodata.str1.1 0000000000000000 .LC53
00000000000000b1 l .rodata.str1.1 0000000000000000 .LC54
00000000000000c1 l .rodata.str1.1 0000000000000000 .LC55
0000000000000468 l .rodata.str1.8 0000000000000000 .LC64
000000000000018b l .rodata.str1.1 0000000000000000 .LC68
00000000000001a4 l .rodata.str1.1 0000000000000000 .LC70
0000000000000161 l .rodata.str1.1 0000000000000000 .LC65
0000000000000197 l .rodata.str1.1 0000000000000000 .LC69
0000000000000179 l .rodata.str1.1 0000000000000000 .LC66
0000000000000182 l .rodata.str1.1 0000000000000000 .LC67
0000000000000000 l d .comment 0000000000000000 .comment
0000000000000000 *UND* 0000000000000000 _GLOBAL_OFFSET_TABLE_
0000000000000000 *UND* 0000000000000000 __ctype_b_loc
0000000000000000 *UND* 0000000000000000 __snprintf_chk
0000000000000000 *UND* 0000000000000000 __stack_chk_fail
0000000000000000 *UND* 0000000000000000 stderr
0000000000000000 *UND* 0000000000000000 __fprintf_chk
0000000000000000 *UND* 0000000000000000 strlen
0000000000000480 g F .text 000000000000112b .hidden memcached_ascii_protocol_process_data
0000000000000000 *UND* 0000000000000000 memchr
0000000000000000 *UND* 0000000000000000 strncmp
0000000000000000 *UND* 0000000000000000 abort
0000000000000000 *UND* 0000000000000000 strtoul
0000000000000000 *UND* 0000000000000000 strtoull
##############################################################
I would really appreciate a help with finding a root cause and/or fix.

Last but not least: I've also notticed on RHEL6, that while the library itself is compiled by my selected compiler (gcc/g++ from adl-gcc package, version 4.7.2), the unit test suite was compiled by default RHEL6 gcc 4.4.6 - is there any $PATH re-setting before unit-test compilation or any other reason, why first half is built by one compiler and the second half by another? And if there is, is that correct? (See "RHEL6_build.log" attachment for details).

Best Regards,

Jiri Jevicky

Revision history for this message
Jiri Jevicky (jiri-jevicky) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.