Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1356523

Summary: fails to link due "multiple definition of `__syscall_error'"
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: glibcAssignee: Carlos O'Donell <codonell>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: amit.shah, arjun.is, berrange, cfergeau, codonell, dj, dwmw2, fweimer, itamar, jakub, law, mfabian, pbonzini, pfrankli, rjones, siddhesh, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: s390x   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-14 10:19:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 467765    

Description Dan Horák 2016-07-14 10:10:23 UTC
Build fails in s390 koji with

...
cc -I/builddir/build/BUILD/qemu-2.6.0/dtc/libfdt -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common  -O2 -g -pipe -Wall -Werror=format-security  -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -march=z9-109 -mtune=z10 -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/cacard -I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libusb-1.0   -I../linux-headers -I.. -I/builddir/build/BUILD/qemu-2.6.0/target-arm -DNEED_CPU_H -I/builddir/build/BUILD/qemu-2.6.0/include -I/builddir/build/BUILD/qemu-2.6.0/linux-user/aarch64 -I/builddir/build/BUILD/qemu-2.6.0/linux-user -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -g  -Wl,--warn-common -m64 -static -g  -Wl,--build-id -Wl,-z,relro -Wl,-z,now -Wl,-Ttext-segment=0x60000000 -o qemu-aarch64 exec.o translate-all.o cpu-exec.o translate-common.o cpu-exec-common.o tcg/tcg.o tcg/tcg-op.o tcg/optimize.o tcg/tcg-common.o fpu/softfloat.o disas.o gdbstub-xml.o kvm-stub.o gdbstub.o thunk.o user-exec.o linux-user/main.o linux-user/syscall.o linux-user/strace.o linux-user/mmap.o linux-user/signal.o linux-user/elfload.o linux-user/linuxload.o linux-user/uaccess.o linux-user/uname.o linux-user/flatload.o target-arm/arm-semi.o target-arm/kvm-stub.o target-arm/translate.o target-arm/op_helper.o target-arm/helper.o target-arm/cpu.o target-arm/neon_helper.o target-arm/iwmmxt_helper.o target-arm/gdbstub.o target-arm/cpu64.o target-arm/translate-a64.o target-arm/helper-a64.o target-arm/gdbstub64.o target-arm/crypto_helper.o ../tcg-runtime.o ../disas/arm.o ../disas/s390.o ../hw/core/qdev.o ../hw/core/qdev-properties.o ../hw/core/fw-path-provider.o ../hw/core/irq.o ../hw/core/hotplug.o ../hw/core/nmi.o ../qom/cpu.o trace/generated-helpers.o ../qom/object.o ../qom/container.o ../qom/qom-qobject.o ../qom/object_interfaces.o ../crypto/aes.o  ../libqemuutil.a ../libqemustub.a   -lm -lgthread-2.0 -pthread -lglib-2.0 -pthread -lpcre  -lz -lrt
/usr/lib/gcc/s390x-redhat-linux/6.1.1/../../../../lib64/libpthread.a(libpthread.o): In function `__syscall_error':
(.text+0xe2b0): multiple definition of `__syscall_error'
/usr/lib/gcc/s390x-redhat-linux/6.1.1/../../../../lib64/librt.a(rt-sysdep.o):(.text+0x0): first defined here
/usr/lib/gcc/s390x-redhat-linux/6.1.1/../../../../lib64/libglib-2.0.a(libglib_2_0_la-gutils.o): In function `g_get_user_database_entry':
(.text+0x22a): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/s390x-redhat-linux/6.1.1/../../../../lib64/libglib-2.0.a(libglib_2_0_la-gutils.o): In function `g_get_user_database_entry':
(.text+0x100): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/s390x-redhat-linux/6.1.1/../../../../lib64/libglib-2.0.a(libglib_2_0_la-gutils.o): In function `g_get_user_database_entry':
(.text+0x138): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
Makefile:195: recipe for target 'qemu-aarch64' failed
make[1]: Leaving directory '/builddir/build/BUILD/qemu-2.6.0/build-static/aarch64-linux-user'
Makefile:186: recipe for target 'subdir-aarch64-linux-user' failed
make[1]: *** [qemu-aarch64] Error 1
make: *** [subdir-aarch64-linux-user] Error 2
...


for full logs please see http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=2287359


Version-Release number of selected component (if applicable):
qemu-2.6.0-5.fc25
glibc-2.23.90-27.fc25.s390x

Comment 1 Dan Horák 2016-07-14 10:12:13 UTC
switching to glibc which seems more appropriate (libpthread and librt involved)

Comment 2 Daniel Berrangé 2016-07-14 10:19:03 UTC

*** This bug has been marked as a duplicate of bug 1352625 ***

Comment 3 Daniel Berrangé 2016-07-14 10:20:20 UTC
I'll extend the i386 workaround in QEMU to avoid the problem on s390 too