All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Slutz <dslutz@verizon.com>
To: Ian Campbell <Ian.Campbell@citrix.com>,
	yanxiaoliang <yanxiaoliang@gmail.com>
Cc: Anthony Perard <anthony.perard@citrix.com>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Re: [xen-unstable] 26319:  libcacard error
Date: Mon, 2 Dec 2013 19:11:30 -0500	[thread overview]
Message-ID: <529D21B2.4080206@terremark.com> (raw)
In-Reply-To: <1357207140.10985.76.camel@zakaz.uk.xensource.com>


[-- Attachment #1.1: Type: text/plain, Size: 14689 bytes --]

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@gmail.com 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@verizon.com>
    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@verizon.com>
    ---
      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@lists.xen.org
> http://lists.xen.org/xen-devel


[-- Attachment #1.2: Type: text/html, Size: 19046 bytes --]

[-- Attachment #2: 4.4-0001-Add-QEMU_UPSTREAM_EXTRA_CONFIG.patch --]
[-- Type: text/x-patch, Size: 887 bytes --]

>From 57af66ee9bb0edb7545fc84b5b6d628cebd29f95 Mon Sep 17 00:00:00 2001
From: Don Slutz <dslutz@verizon.com>
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@verizon.com>
---
 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


[-- Attachment #3: 4.3-0001-Add-QEMU_UPSTREAM_EXTRA_CONFIG.patch --]
[-- Type: text/x-patch, Size: 816 bytes --]

>From 3938aa86f4490effb562961fe6012e811ebb3646 Mon Sep 17 00:00:00 2001
From: Don Slutz <dslutz@verizon.com>
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@verizon.com>
---
 tools/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/Makefile b/tools/Makefile
index e44a3e9..415c1e2 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -188,6 +188,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	fi; \
 	cd qemu-xen-dir; \
 	$$source/configure --enable-xen --target-list=i386-softmmu \
+		$(QEMU_UPSTREAM_EXTRA_CONFIG) \
 		--prefix=$(PREFIX) \
 		--source-path=$$source \
 		--extra-cflags="-I$(XEN_ROOT)/tools/include \
-- 
1.8.2.1


[-- Attachment #4: Type: text/plain, Size: 126 bytes --]

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

  reply	other threads:[~2013-12-03  0:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-03  5:11 [xen-unstable] 26319: libcacard error yanxiaoliang
2013-01-03  9:59 ` Ian Campbell
2013-12-03  0:11   ` Don Slutz [this message]
2013-12-03 10:16     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=529D21B2.4080206@terremark.com \
    --to=dslutz@verizon.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yanxiaoliang@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.