* [Qemu-devel] [PATCH] Buildfix: fix libcacard build with -m32 on 64bit machine
@ 2011-05-26 17:56 Stefan Berger
2011-05-26 18:26 ` Alon Levy
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Berger @ 2011-05-26 17:56 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori
When configuring with --extra-cflags="-m32" on a 64bit machine the
following error appears during compilation:
make -C libhw64 V="1" TARGET_DIR="libhw64/" all
make[1]: Entering directory `/root/tmp/qemu-git/libhw64'
make[1]: Leaving directory `/root/tmp/qemu-git/libhw64'
make -C libcacard V="1" TARGET_DIR="libcacard/" all
make[1]: Entering directory `/root/tmp/qemu-git/libcacard'
gcc -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread
-ldl -lrt -o vscclient cac.o event.o vcard.o vreader.o
vcard_emul_nss.o vcard_emul_type.o card_7816.o ../osdep.o
../oslib-posix.o ../qemu-thread-posix.o ../trace.o ../qemu-malloc.o
../qemu-timer-common.o vscclient.o
cac.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [vscclient] Error 1
make[1]: Leaving directory `/root/tmp/qemu-git/libcacard'
make: *** [subdir-libcacard] Error 2
The LDFLAGS are not passed to the compiled. The below patch fixes it.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
---
libcacard/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: qemu-git/libcacard/Makefile
===================================================================
--- qemu-git.orig/libcacard/Makefile
+++ qemu-git/libcacard/Makefile
@@ -9,7 +9,7 @@ QEMU_OBJS=$(addprefix ../, $(oslib-obj-y
QEMU_CFLAGS+=-I../
vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o
- $(call quiet-command,$(CC) $(libcacard_libs) -lrt -o $@ $^," LINK
$(TARGET_DIR)$@")
+ $(call quiet-command,$(CC) $(LDFLAGS) $(libcacard_libs) -lrt -o $@
$^," LINK $(TARGET_DIR)$@")
all: vscclient
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] Buildfix: fix libcacard build with -m32 on 64bit machine
2011-05-26 17:56 [Qemu-devel] [PATCH] Buildfix: fix libcacard build with -m32 on 64bit machine Stefan Berger
@ 2011-05-26 18:26 ` Alon Levy
2011-06-07 14:06 ` Stefan Berger
0 siblings, 1 reply; 5+ messages in thread
From: Alon Levy @ 2011-05-26 18:26 UTC (permalink / raw)
To: Stefan Berger; +Cc: Anthony Liguori, qemu-devel
On Thu, May 26, 2011 at 01:56:54PM -0400, Stefan Berger wrote:
> When configuring with --extra-cflags="-m32" on a 64bit machine the
> following error appears during compilation:
Thanks for the fix.
Reviewed-by: Alon Levy <alevy@redhat.com>
>
> make -C libhw64 V="1" TARGET_DIR="libhw64/" all
> make[1]: Entering directory `/root/tmp/qemu-git/libhw64'
> make[1]: Leaving directory `/root/tmp/qemu-git/libhw64'
> make -C libcacard V="1" TARGET_DIR="libcacard/" all
> make[1]: Entering directory `/root/tmp/qemu-git/libcacard'
> gcc -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4
> -lpthread -ldl -lrt -o vscclient cac.o event.o vcard.o vreader.o
> vcard_emul_nss.o vcard_emul_type.o card_7816.o ../osdep.o
> ../oslib-posix.o ../qemu-thread-posix.o ../trace.o ../qemu-malloc.o
> ../qemu-timer-common.o vscclient.o
> cac.o: could not read symbols: File in wrong format
> collect2: ld returned 1 exit status
> make[1]: *** [vscclient] Error 1
> make[1]: Leaving directory `/root/tmp/qemu-git/libcacard'
> make: *** [subdir-libcacard] Error 2
>
> The LDFLAGS are not passed to the compiled. The below patch fixes it.
>
> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
>
> ---
> libcacard/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: qemu-git/libcacard/Makefile
> ===================================================================
> --- qemu-git.orig/libcacard/Makefile
> +++ qemu-git/libcacard/Makefile
> @@ -9,7 +9,7 @@ QEMU_OBJS=$(addprefix ../, $(oslib-obj-y
> QEMU_CFLAGS+=-I../
>
> vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o
> - $(call quiet-command,$(CC) $(libcacard_libs) -lrt -o $@ $^,"
> LINK $(TARGET_DIR)$@")
> + $(call quiet-command,$(CC) $(LDFLAGS) $(libcacard_libs) -lrt -o
> $@ $^," LINK $(TARGET_DIR)$@")
>
> all: vscclient
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] Buildfix: fix libcacard build with -m32 on 64bit machine
2011-05-26 18:26 ` Alon Levy
@ 2011-06-07 14:06 ` Stefan Berger
2011-06-07 14:20 ` Andreas Färber
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Berger @ 2011-06-07 14:06 UTC (permalink / raw)
To: qemu-devel, Anthony Liguori, Andreas Färber
On 05/26/2011 02:26 PM, Alon Levy wrote:
> On Thu, May 26, 2011 at 01:56:54PM -0400, Stefan Berger wrote:
>> When configuring with --extra-cflags="-m32" on a 64bit machine the
>> following error appears during compilation:
> Thanks for the fix.
Anybody else who thinks that this patch below is necessary?
Stefan
> Reviewed-by: Alon Levy<alevy@redhat.com>
>
>> make -C libhw64 V="1" TARGET_DIR="libhw64/" all
>> make[1]: Entering directory `/root/tmp/qemu-git/libhw64'
>> make[1]: Leaving directory `/root/tmp/qemu-git/libhw64'
>> make -C libcacard V="1" TARGET_DIR="libcacard/" all
>> make[1]: Entering directory `/root/tmp/qemu-git/libcacard'
>> gcc -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4
>> -lpthread -ldl -lrt -o vscclient cac.o event.o vcard.o vreader.o
>> vcard_emul_nss.o vcard_emul_type.o card_7816.o ../osdep.o
>> ../oslib-posix.o ../qemu-thread-posix.o ../trace.o ../qemu-malloc.o
>> ../qemu-timer-common.o vscclient.o
>> cac.o: could not read symbols: File in wrong format
>> collect2: ld returned 1 exit status
>> make[1]: *** [vscclient] Error 1
>> make[1]: Leaving directory `/root/tmp/qemu-git/libcacard'
>> make: *** [subdir-libcacard] Error 2
>>
>> The LDFLAGS are not passed to the compiled. The below patch fixes it.
>>
>> Signed-off-by: Stefan Berger<stefanb@linux.vnet.ibm.com>
>>
>> ---
>> libcacard/Makefile | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Index: qemu-git/libcacard/Makefile
>> ===================================================================
>> --- qemu-git.orig/libcacard/Makefile
>> +++ qemu-git/libcacard/Makefile
>> @@ -9,7 +9,7 @@ QEMU_OBJS=$(addprefix ../, $(oslib-obj-y
>> QEMU_CFLAGS+=-I../
>>
>> vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o
>> - $(call quiet-command,$(CC) $(libcacard_libs) -lrt -o $@ $^,"
>> LINK $(TARGET_DIR)$@")
>> + $(call quiet-command,$(CC) $(LDFLAGS) $(libcacard_libs) -lrt -o
>> $@ $^," LINK $(TARGET_DIR)$@")
>>
>> all: vscclient
>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] Buildfix: fix libcacard build with -m32 on 64bit machine
2011-06-07 14:06 ` Stefan Berger
@ 2011-06-07 14:20 ` Andreas Färber
2011-06-07 17:24 ` Stefan Berger
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Färber @ 2011-06-07 14:20 UTC (permalink / raw)
To: Stefan Berger
Cc: Anthony Liguori, Alon Levy, qemu-devel@nongnu.org Developers
Am 07.06.2011 um 16:06 schrieb Stefan Berger:
> On 05/26/2011 02:26 PM, Alon Levy wrote:
>> On Thu, May 26, 2011 at 01:56:54PM -0400, Stefan Berger wrote:
>>> When configuring with --extra-cflags="-m32" on a 64bit machine the
>>> following error appears during compilation:
>> Thanks for the fix.
> Anybody else who thinks that this patch below is necessary?
Yes, this or a similar patch. Not sure if there's a QEMU_LDFLAGS and,
if yes, whether that or LDFLAGS is more correct.
The only issue I see is that we may be passing unnecessary cruft in,
but that seems negligible.
Fixing up $libcacard_libs to contain the relevant LDFLAGS is probably
more complicated.
Andreas
>> Reviewed-by: Alon Levy<alevy@redhat.com>
>>
>>> make -C libhw64 V="1" TARGET_DIR="libhw64/" all
>>> make[1]: Entering directory `/root/tmp/qemu-git/libhw64'
>>> make[1]: Leaving directory `/root/tmp/qemu-git/libhw64'
>>> make -C libcacard V="1" TARGET_DIR="libcacard/" all
>>> make[1]: Entering directory `/root/tmp/qemu-git/libcacard'
>>> gcc -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4
>>> -lpthread -ldl -lrt -o vscclient cac.o event.o vcard.o vreader.o
>>> vcard_emul_nss.o vcard_emul_type.o card_7816.o ../osdep.o
>>> ../oslib-posix.o ../qemu-thread-posix.o ../trace.o ../qemu-malloc.o
>>> ../qemu-timer-common.o vscclient.o
>>> cac.o: could not read symbols: File in wrong format
>>> collect2: ld returned 1 exit status
>>> make[1]: *** [vscclient] Error 1
>>> make[1]: Leaving directory `/root/tmp/qemu-git/libcacard'
>>> make: *** [subdir-libcacard] Error 2
>>>
>>> The LDFLAGS are not passed to the compiled. The below patch fixes
>>> it.
>>>
>>> Signed-off-by: Stefan Berger<stefanb@linux.vnet.ibm.com>
>>>
>>> ---
>>> libcacard/Makefile | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> Index: qemu-git/libcacard/Makefile
>>> ===================================================================
>>> --- qemu-git.orig/libcacard/Makefile
>>> +++ qemu-git/libcacard/Makefile
>>> @@ -9,7 +9,7 @@ QEMU_OBJS=$(addprefix ../, $(oslib-obj-y
>>> QEMU_CFLAGS+=-I../
>>>
>>> vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o
>>> - $(call quiet-command,$(CC) $(libcacard_libs) -lrt -o $@ $^,"
>>> LINK $(TARGET_DIR)$@")
>>> + $(call quiet-command,$(CC) $(LDFLAGS) $(libcacard_libs) -lrt -o
>>> $@ $^," LINK $(TARGET_DIR)$@")
>>>
>>> all: vscclient
>>>
>>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] Buildfix: fix libcacard build with -m32 on 64bit machine
2011-06-07 14:20 ` Andreas Färber
@ 2011-06-07 17:24 ` Stefan Berger
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Berger @ 2011-06-07 17:24 UTC (permalink / raw)
To: Andreas Färber
Cc: Anthony Liguori, Alon Levy, qemu-devel@nongnu.org Developers
On 06/07/2011 10:20 AM, Andreas Färber wrote:
> Am 07.06.2011 um 16:06 schrieb Stefan Berger:
>
>> On 05/26/2011 02:26 PM, Alon Levy wrote:
>>> On Thu, May 26, 2011 at 01:56:54PM -0400, Stefan Berger wrote:
>>>> When configuring with --extra-cflags="-m32" on a 64bit machine the
>>>> following error appears during compilation:
>>> Thanks for the fix.
>> Anybody else who thinks that this patch below is necessary?
>
> Yes, this or a similar patch. Not sure if there's a QEMU_LDFLAGS and,
> if yes, whether that or LDFLAGS is more correct.
>
There is no QEMU_LDFLAGS from what I can see.
> The only issue I see is that we may be passing unnecessary cruft in,
> but that seems negligible.
> Fixing up $libcacard_libs to contain the relevant LDFLAGS is probably
> more complicated.
>
For the below linking step the LDFLAGS presumably contain the right
command line parameters.
Stefan
> Andreas
>
>>> Reviewed-by: Alon Levy<alevy@redhat.com>
>>>
>>>> make -C libhw64 V="1" TARGET_DIR="libhw64/" all
>>>> make[1]: Entering directory `/root/tmp/qemu-git/libhw64'
>>>> make[1]: Leaving directory `/root/tmp/qemu-git/libhw64'
>>>> make -C libcacard V="1" TARGET_DIR="libcacard/" all
>>>> make[1]: Entering directory `/root/tmp/qemu-git/libcacard'
>>>> gcc -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4
>>>> -lpthread -ldl -lrt -o vscclient cac.o event.o vcard.o vreader.o
>>>> vcard_emul_nss.o vcard_emul_type.o card_7816.o ../osdep.o
>>>> ../oslib-posix.o ../qemu-thread-posix.o ../trace.o ../qemu-malloc.o
>>>> ../qemu-timer-common.o vscclient.o
>>>> cac.o: could not read symbols: File in wrong format
>>>> collect2: ld returned 1 exit status
>>>> make[1]: *** [vscclient] Error 1
>>>> make[1]: Leaving directory `/root/tmp/qemu-git/libcacard'
>>>> make: *** [subdir-libcacard] Error 2
>>>>
>>>> The LDFLAGS are not passed to the compiled. The below patch fixes it.
>>>>
>>>> Signed-off-by: Stefan Berger<stefanb@linux.vnet.ibm.com>
>>>>
>>>> ---
>>>> libcacard/Makefile | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> Index: qemu-git/libcacard/Makefile
>>>> ===================================================================
>>>> --- qemu-git.orig/libcacard/Makefile
>>>> +++ qemu-git/libcacard/Makefile
>>>> @@ -9,7 +9,7 @@ QEMU_OBJS=$(addprefix ../, $(oslib-obj-y
>>>> QEMU_CFLAGS+=-I../
>>>>
>>>> vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o
>>>> - $(call quiet-command,$(CC) $(libcacard_libs) -lrt -o $@ $^,"
>>>> LINK $(TARGET_DIR)$@")
>>>> + $(call quiet-command,$(CC) $(LDFLAGS) $(libcacard_libs) -lrt -o
>>>> $@ $^," LINK $(TARGET_DIR)$@")
>>>>
>>>> all: vscclient
>>>>
>>>>
>>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-07 17:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26 17:56 [Qemu-devel] [PATCH] Buildfix: fix libcacard build with -m32 on 64bit machine Stefan Berger
2011-05-26 18:26 ` Alon Levy
2011-06-07 14:06 ` Stefan Berger
2011-06-07 14:20 ` Andreas Färber
2011-06-07 17:24 ` Stefan Berger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).