[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [xen-unstable] 26319: libcacard error



I have been able to reproduce this on CentOS 5.10.

On 01/03/13 04:59, Ian Campbell wrote:
On Thu, 2013-01-03 at 05:11 +0000, yanxiaoliang@xxxxxxxxx wrote:
 
hello, everyone, I got  some problems as below when i compiled
a xen-unstable  src .
 
./configure
make xen 
It was ok until here.
But when  "make tools"
It showed
Please can you give a more complete log, specifically including the
actual gcc invocation which resulted in this error message.
libtool --mode=link --quiet --tag=CC gcc -rpath /usr/local/lib -o libcacard.la libcacard/cac.lo libcacard/event.lo libcacard/vcard.lo libcacard/vreader.lo libcacard/vcard_emul_nss.lo libcacard/vcard_emul_type.lo libcacard/card_7816.lo osdep.lo cutils.lo qemu-timer-common.lo oslib-posix.lo qemu-thread-posix.lo trace.lo trace/stderr.lo trace/control.lo stubs/arch-query-cpu-def.lo stubs/fdset-add-fd.lo stubs/fdset-find-fd.lo stubs/fdset-get-fd.lo stubs/fdset-remove-fd.lo stubs/get-fd.lo stubs/set-fd-handler.lo -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl   -pthread -L/lib64 -lgthread-2.0 -lglib-2.0 
/usr/bin/ld: libcacard/.libs/vcard.o: relocation R_X86_64_PC32 against `vcard_buffer_response_delete' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[4]: *** [libcacard.la] Error 1
make[4]: Leaving directory `/home/don/xen/tools/qemu-xen-dir-remote/libcacard'
make[3]: *** [subdir-libcacard] Error 2
make[3]: Leaving directory `/home/don/xen/tools/qemu-xen-dir-remote'
make[2]: *** [subdir-all-qemu-xen-dir] Error 2
make[2]: Leaving directory `/home/don/xen/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/home/don/xen/tools'
make: *** [install-tools] Error 2


/usr/bin/ld: libcacard/.libs/vcard.o: relocation R_X86_64_PC32 against `vcard_delete_applet' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[4]: *** [libcacard.la] Error 1
make[3]: *** [subdir-libcacard] Error 2
make[3]: Leaving directory `/root/xen-unstable.hg/tools/qemu-xen-dir-remote'
make[2]: *** [subdir-all-qemu-xen-dir] Error 2
make[2]: Leaving directory `/root/xen-unstable.hg/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/root/xen-unstable.hg/tools'
make: *** [install-tools] Error 2
 
Could anyone give me some advices ? 
This sort of error is typically specific to the version of gcc and/or
the distro -- what are you using?
CentOS 5.10
It seems likely that his is an upstream qemu issue, but it's not clear
to me why this appears to not happen anywhere else (according to
google). It's possible that this functionality is just not widely used?
It might be useful to raise this on qemu-devel.
https://bugs.launchpad.net/qemu/+bug/1257099
As a workaround in the meantime you could try adding --disable-smartcard
to the invocation of configure in tools/Makefile, or perhaps
--disable-smartcard-nss would do the trick.
Using the patch:
From 57af66ee9bb0edb7545fc84b5b6d628cebd29f95 Mon Sep 17 00:00:00 2001
From: Don Slutz <dslutz@xxxxxxxxxxx>
Date: Mon, 2 Dec 2013 21:07:16 +0000
Subject: [PATCH] Add QEMU_UPSTREAM_EXTRA_CONFIG.

this allows 'make QEMU_UPSTREAM_EXTRA_CONFIG=--disable-smartcard-nss' to work on CentOS 5.10

Signed-off-by: Don Slutz <dslutz@xxxxxxxxxxx>
---
 tools/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/Makefile b/tools/Makefile
index 00c69ee..9e1efca 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -187,7 +187,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
        fi; \
        cd qemu-xen-dir; \
        $$source/configure --enable-xen --target-list=i386-softmmu \
-               $(QEMU_XEN_ENABLE_DEBUG) \
+               $(QEMU_XEN_ENABLE_DEBUG) $(QEMU_UPSTREAM_EXTRA_CONFIG) \
                --prefix=$(PREFIX) \
                --source-path=$$source \
                --extra-cflags="-I$(XEN_ROOT)/tools/include \
--
1.8.2.1
And then "make QEMU_UPSTREAM_EXTRA_CONFIG=--disable-smartcard-nss dist" gets past this error.

This is at:

* 57af66e (HEAD, master) Add QEMU_UPSTREAM_EXTRA_CONFIG.
* e439e0b (origin/master, origin/HEAD) x86/pvh: change epte_get_entry_emt() for pvh mem types

Does it make sense to send this as a top post?

It then dies in:

[  3%] Building C object tpm/CMakeFiles/tpm.dir/tpm_daa.o
cd /home/don/xen/stubdom/tpm_emulator-x86_64/build/tpm && /usr/bin/gcc   -std=c99 -DTPM_NO_EXTERN -isystem /home/don/xen/stubdom/../extras/mini-os/include -D__MINIOS__ -DHAVE_LIBC -isystem /home/don/xen/stubdom/../extras/mini-os/include/posix -isystem /home/don/xen/stubdom/../tools/xenstore  -isystem /home/don/xen/stubdom/../extras/mini-os/include/x86 -isystem /home/don/xen/stubdom/../extras/mini-os/include/x86/x86_64 -U __linux__ -U __FreeBSD__ -U __sun__ -nostdinc -isystem /home/don/xen/stubdom/../extras/mini-os/include/posix -isystem /home/don/xen/stubdom/cross-root-x86_64/x86_64-xen-elf/include -isystem /usr/lib/gcc/x86_64-redhat-linux/4.1.2/include -isystem /home/don/xen/stubdom/lwip-x86_64/src/include -isystem /home/don/xen/stubdom/lwip-x86_64/src/include/ipv4 -I/home/don/xen/stubdom/include -I/home/don/xen/stubdom/../xen/include -mno-red-zone -O1 -fno-omit-frame-pointer  -m64 -mno-red-zone -fno-reorder-blocks -fno-asynchronous-unwind-tables -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement   -fno-stack-protector -fno-exceptions -Wno-declaration-after-statement -I/opt/local/include -I/home/don/xen/stubdom/tpm_emulator-x86_64 -I/home/don/xen/stubdom/tpm_emulator-x86_64/build   -Wall -Werror -Wno-unused-parameter -Wpointer-arith -Wcast-align -Wwrite-strings -Wextra -o CMakeFiles/tpm.dir/tpm_daa.o   -c /home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c
cc1: warnings being treated as errors
/home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c: In function 'TPM_DAA_Join':
/home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c:336: warning: unused parameter 'ordinal'
/home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c: In function 'TPM_DAA_Sign':
/home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c:2362: warning: unused parameter 'ordinal'
make[5]: *** [tpm/CMakeFiles/tpm.dir/tpm_daa.o] Error 1
make[5]: Leaving directory `/home/don/xen/stubdom/tpm_emulator-x86_64/build'
make[4]: *** [tpm/CMakeFiles/tpm.dir/all] Error 2
make[4]: Leaving directory `/home/don/xen/stubdom/tpm_emulator-x86_64/build'
make[3]: *** [tpm/CMakeFiles/tpm.dir/rule] Error 2
make[3]: Leaving directory `/home/don/xen/stubdom/tpm_emulator-x86_64/build'
make[2]: *** [tpm] Error 2
make[2]: Leaving directory `/home/don/xen/stubdom/tpm_emulator-x86_64/build'
make[1]: *** [cross-root-x86_64/x86_64-xen-elf/lib/libtpm.a] Error 2
make[1]: Leaving directory `/home/don/xen/stubdom'
make: *** [install-stubdom] Error 2

Doing "./configure --disable-stubdom" allows a clean build.

On stable-4.3:

86e80b6 (HEAD, origin/stable-4.3, stable-4.3) x86/xsave: fix nonlazy state handling
...
  lt LINK libcacard.la
/usr/bin/ld: libcacard/.libs/vcard.o: relocation R_X86_64_PC32 against `vcard_delete_applet' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[4]: *** [libcacard.la] Error 1
make[3]: *** [subdir-libcacard] Error 2
make[3]: Leaving directory `/home/don/xen/tools/qemu-xen-dir-remote'
make[2]: *** [subdir-all-qemu-xen-dir] Error 2
make[2]: Leaving directory `/home/don/xen/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/home/don/xen/tools'
make: *** [install-tools] Error 2

Almost the same error.  The attached 4.3 patch, and then "make QEMU_UPSTREAM_EXTRA_CONFIG=--disable-smartcard-nss dist"

* 5714078 (HEAD, stable-4.3) Add QEMU_UPSTREAM_EXTRA_CONFIG.
* 86e80b6 (origin/stable-4.3) x86/xsave: fix nonlazy state handling

Also dies with:
...
cd /home/don/xen/stubdom/tpm_emulator-x86_64/build/tpm && /usr/bin/gcc   -std=c99 -DTPM_NO_EXTERN -isystem /home/don/xen/stubdom/../extras/mini-os/include -D__MINIOS__ -DHAVE_LIBC -isystem /home/don/xen/stubdom/../extras/mini-os/include/posix -isystem /home/don/xen/stubdom/../tools/xenstore  -isystem /home/don/xen/stubdom/../extras/mini-os/include/x86 -isystem /home/don/xen/stubdom/../extras/mini-os/include/x86/x86_64 -U __linux__ -U __FreeBSD__ -U __sun__ -nostdinc -isystem /home/don/xen/stubdom/../extras/mini-os/include/posix -isystem /home/don/xen/stubdom/cross-root-x86_64/x86_64-xen-elf/include -isystem /usr/lib/gcc/x86_64-redhat-linux/4.1.2/include -isystem /home/don/xen/stubdom/lwip-x86_64/src/include -isystem /home/don/xen/stubdom/lwip-x86_64/src/include/ipv4 -I/home/don/xen/stubdom/include -I/home/don/xen/stubdom/../xen/include -mno-red-zone -O1 -fno-omit-frame-pointer  -m64 -mno-red-zone -fno-reorder-blocks -fno-asynchronous-unwind-tables -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement   -fno-stack-protector -fno-exceptions -Wno-declaration-after-statement -I/opt/local/include -I/home/don/xen/stubdom/tpm_emulator-x86_64 -I/home/don/xen/stubdom/tpm_emulator-x86_64/build   -Wall -Werror -Wno-unused-parameter -Wpointer-arith -Wcast-align -Wwrite-strings -Wextra -o CMakeFiles/tpm.dir/tpm_daa.o   -c /home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c
cc1: warnings being treated as errors
/home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c: In function 'TPM_DAA_Join':
/home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c:336: warning: unused parameter 'ordinal'
/home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c: In function 'TPM_DAA_Sign':
/home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c:2362: warning: unused parameter 'ordinal'
make[5]: *** [tpm/CMakeFiles/tpm.dir/tpm_daa.o] Error 1
make[5]: Leaving directory `/home/don/xen/stubdom/tpm_emulator-x86_64/build'
make[4]: *** [tpm/CMakeFiles/tpm.dir/all] Error 2
make[4]: Leaving directory `/home/don/xen/stubdom/tpm_emulator-x86_64/build'
make[3]: *** [tpm/CMakeFiles/tpm.dir/rule] Error 2
make[3]: Leaving directory `/home/don/xen/stubdom/tpm_emulator-x86_64/build'
make[2]: *** [tpm] Error 2
make[2]: Leaving directory `/home/don/xen/stubdom/tpm_emulator-x86_64/build'
make[1]: *** [cross-root-x86_64/x86_64-xen-elf/lib/libtpm.a] Error 2
make[1]: Leaving directory `/home/don/xen/stubdom'
make: *** [install-stubdom] Error 2

And not building the stubdom works.


* 094900d x86/crash: disable the watchdog NMIs on the crashing cpu
...
  lt LINK libcacard.la
/usr/bin/ld: libcacard/.libs/vcard.o: relocation R_X86_64_PC32 against `vcard_delete_applet' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[4]: *** [libcacard.la] Error 1
make[3]: *** [subdir-libcacard] Error 2
make[3]: Leaving directory `/home/don/xen/tools/qemu-xen-dir-remote'
make[2]: *** [subdir-all-qemu-xen-dir] Error 2
make[2]: Leaving directory `/home/don/xen/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/home/don/xen/tools'
make: *** [install-tools] Error 2

* 84e1ba0 (HEAD, staging-4.3) Add QEMU_UPSTREAM_EXTRA_CONFIG.
* 86e80b6 (origin/staging-4.3, origin/stable-4.3) x86/xsave: fix nonlazy state handling

Also gets the error:
...
cd /home/don/xen/stubdom/tpm_emulator-x86_64/build/tpm && /usr/bin/gcc   -std=c99 -DTPM_NO_EXTERN -isystem /home/don/xen/stubdom/../extras/mini-os/include -D__MINIOS__ -DHAVE_LIBC -isystem /home/don/xen/stubdom/../extras/mini-os/include/posix -isystem /home/don/xen/stubdom/../tools/xenstore  -isystem /home/don/xen/stubdom/../extras/mini-os/include/x86 -isystem /home/don/xen/stubdom/../extras/mini-os/include/x86/x86_64 -U __linux__ -U __FreeBSD__ -U __sun__ -nostdinc -isystem /home/don/xen/stubdom/../extras/mini-os/include/posix -isystem /home/don/xen/stubdom/cross-root-x86_64/x86_64-xen-elf/include -isystem /usr/lib/gcc/x86_64-redhat-linux/4.1.2/include -isystem /home/don/xen/stubdom/lwip-x86_64/src/include -isystem /home/don/xen/stubdom/lwip-x86_64/src/include/ipv4 -I/home/don/xen/stubdom/include -I/home/don/xen/stubdom/../xen/include -mno-red-zone -O1 -fno-omit-frame-pointer  -m64 -mno-red-zone -fno-reorder-blocks -fno-asynchronous-unwind-tables -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement   -fno-stack-protector -fno-exceptions -Wno-declaration-after-statement -I/opt/local/include -I/home/don/xen/stubdom/tpm_emulator-x86_64 -I/home/don/xen/stubdom/tpm_emulator-x86_64/build   -Wall -Werror -Wno-unused-parameter -Wpointer-arith -Wcast-align -Wwrite-strings -Wextra -o CMakeFiles/tpm.dir/tpm_daa.o   -c /home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c
cc1: warnings being treated as errors
/home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c: In function 'TPM_DAA_Join':
/home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c:336: warning: unused parameter 'ordinal'
/home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c: In function 'TPM_DAA_Sign':
/home/don/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_daa.c:2362: warning: unused parameter 'ordinal'
make[5]: *** [tpm/CMakeFiles/tpm.dir/tpm_daa.o] Error 1
make[5]: Leaving directory `/home/don/xen/stubdom/tpm_emulator-x86_64/build'
make[4]: *** [tpm/CMakeFiles/tpm.dir/all] Error 2
make[4]: Leaving directory `/home/don/xen/stubdom/tpm_emulator-x86_64/build'
make[3]: *** [tpm/CMakeFiles/tpm.dir/rule] Error 2
make[3]: Leaving directory `/home/don/xen/stubdom/tpm_emulator-x86_64/build'
make[2]: *** [tpm] Error 2
make[2]: Leaving directory `/home/don/xen/stubdom/tpm_emulator-x86_64/build'
make[1]: *** [cross-root-x86_64/x86_64-xen-elf/lib/libtpm.a] Error 2
make[1]: Leaving directory `/home/don/xen/stubdom'
make: *** [install-stubdom] Error 2


420ff58 (HEAD, origin/stable-4.2, stable-4.2) x86/HVM: only allow ring 0 guest code to make hypercalls
...

Is a clean build.

All of these build cleanly on a Fedora 17 system.

  -Don Slutz
Removing the libnss library (the smart card one) package from your
system would also work around the issue, if that is possible.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

Attachment: 4.4-0001-Add-QEMU_UPSTREAM_EXTRA_CONFIG.patch
Description: Text Data

Attachment: 4.3-0001-Add-QEMU_UPSTREAM_EXTRA_CONFIG.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.