* [Qemu-devel] [PATCH 0/3 v2] bsd-user: Fix linking/dependency issues @ 2014-06-15 20:47 Sean Bruno 2014-06-15 20:47 ` [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk Sean Bruno ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Sean Bruno @ 2014-06-15 20:47 UTC (permalink / raw) To: qemu-devel v2 Correct email address for Ed Maste Recent changes to master caused complete failures to build bsd-user. Sean Bruno (3): bsd-user: Revert part of c5cb1afc4675bf5ff66e7a149d2a8cffba2eaa9e bsd-user: Add patches to fix AES_* link errors bsd-user: Implement strace support for getcwd syscall bsd-user/freebsd/strace.list | 1 + include/qemu/aes.h | 9 +++++++++ rules.mak | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) -- 1.9.3 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk 2014-06-15 20:47 [Qemu-devel] [PATCH 0/3 v2] bsd-user: Fix linking/dependency issues Sean Bruno @ 2014-06-15 20:47 ` Sean Bruno 2014-06-16 7:36 ` Peter Maydell 2014-06-15 20:47 ` [Qemu-devel] [PATCH 2/3 v2] bsd-user: Add patches to fix AES_* link errors Sean Bruno 2014-06-15 20:47 ` [Qemu-devel] [PATCH 3/3 v2] bsd-user: Implement strace support for getcwd syscall Sean Bruno 2 siblings, 1 reply; 12+ messages in thread From: Sean Bruno @ 2014-06-15 20:47 UTC (permalink / raw) To: qemu-devel; +Cc: Sean Bruno In c5cb1afc4675bf5ff66e7a149d2a8cffba2eaa9e rules.mk change was causing complete failure on bsd-user when not using --disable-curl Signed-off-by: Sean Bruno <sbruno@freebsd.org> --- rules.mak | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules.mak b/rules.mak index dde8e00..4a33c27 100644 --- a/rules.mak +++ b/rules.mak @@ -22,7 +22,8 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d # Same as -I$(SRC_PATH) -I., but for the nested source/object directories QEMU_INCLUDES += -I$(<D) -I$(@D) -extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs)))) +extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs))) \ + $(foreach o,$(call expand-objs,$1),$($o-libs))) expand-objs = $(strip $(sort $(filter %.o,$1)) \ $(foreach o,$(filter %.mo,$1),$($o-objs)) \ $(filter-out %.o %.mo,$1)) -- 1.9.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk 2014-06-15 20:47 ` [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk Sean Bruno @ 2014-06-16 7:36 ` Peter Maydell 2014-06-16 9:12 ` Fam Zheng 0 siblings, 1 reply; 12+ messages in thread From: Peter Maydell @ 2014-06-16 7:36 UTC (permalink / raw) To: Sean Bruno; +Cc: Paolo Bonzini, Fam Zheng, QEMU Developers On 15 June 2014 21:47, Sean Bruno <sbruno@freebsd.org> wrote: > In c5cb1afc4675bf5ff66e7a149d2a8cffba2eaa9e rules.mk change was causing > complete failure on bsd-user when not using --disable-curl > > Signed-off-by: Sean Bruno <sbruno@freebsd.org> > --- > rules.mak | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/rules.mak b/rules.mak > index dde8e00..4a33c27 100644 > --- a/rules.mak > +++ b/rules.mak > @@ -22,7 +22,8 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d > # Same as -I$(SRC_PATH) -I., but for the nested source/object directories > QEMU_INCLUDES += -I$(<D) -I$(@D) > > -extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs)))) > +extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs))) \ > + $(foreach o,$(call expand-objs,$1),$($o-libs))) > expand-objs = $(strip $(sort $(filter %.o,$1)) \ > $(foreach o,$(filter %.mo,$1),$($o-objs)) \ > $(filter-out %.o %.mo,$1)) Fam, Paolo: looks like this extract-libs rune is stil causing problems :-( thanks -- PMM ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk 2014-06-16 7:36 ` Peter Maydell @ 2014-06-16 9:12 ` Fam Zheng 2014-06-16 10:08 ` Paolo Bonzini 0 siblings, 1 reply; 12+ messages in thread From: Fam Zheng @ 2014-06-16 9:12 UTC (permalink / raw) To: Sean Bruno, Peter Maydell; +Cc: Paolo Bonzini, QEMU Developers On Mon, 06/16 08:36, Peter Maydell wrote: > On 15 June 2014 21:47, Sean Bruno <sbruno@freebsd.org> wrote: > > In c5cb1afc4675bf5ff66e7a149d2a8cffba2eaa9e rules.mk change was causing > > complete failure on bsd-user when not using --disable-curl > > > > Signed-off-by: Sean Bruno <sbruno@freebsd.org> > > --- > > rules.mak | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/rules.mak b/rules.mak > > index dde8e00..4a33c27 100644 > > --- a/rules.mak > > +++ b/rules.mak > > @@ -22,7 +22,8 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d > > # Same as -I$(SRC_PATH) -I., but for the nested source/object directories > > QEMU_INCLUDES += -I$(<D) -I$(@D) > > > > -extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs)))) > > +extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs))) \ > > + $(foreach o,$(call expand-objs,$1),$($o-libs))) > > expand-objs = $(strip $(sort $(filter %.o,$1)) \ > > $(foreach o,$(filter %.mo,$1),$($o-objs)) \ > > $(filter-out %.o %.mo,$1)) > > Fam, Paolo: looks like this extract-libs rune is stil causing > problems :-( Sean, could you show the configure command line? Thanks, Fam ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk 2014-06-16 9:12 ` Fam Zheng @ 2014-06-16 10:08 ` Paolo Bonzini 2014-06-16 13:55 ` Sean Bruno 0 siblings, 1 reply; 12+ messages in thread From: Paolo Bonzini @ 2014-06-16 10:08 UTC (permalink / raw) To: Fam Zheng, Sean Bruno, Peter Maydell; +Cc: QEMU Developers Il 16/06/2014 11:12, Fam Zheng ha scritto: > On Mon, 06/16 08:36, Peter Maydell wrote: >> On 15 June 2014 21:47, Sean Bruno <sbruno@freebsd.org> wrote: >>> In c5cb1afc4675bf5ff66e7a149d2a8cffba2eaa9e rules.mk change was causing >>> complete failure on bsd-user when not using --disable-curl >>> >>> Signed-off-by: Sean Bruno <sbruno@freebsd.org> >>> --- >>> rules.mak | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/rules.mak b/rules.mak >>> index dde8e00..4a33c27 100644 >>> --- a/rules.mak >>> +++ b/rules.mak >>> @@ -22,7 +22,8 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d >>> # Same as -I$(SRC_PATH) -I., but for the nested source/object directories >>> QEMU_INCLUDES += -I$(<D) -I$(@D) >>> >>> -extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs)))) >>> +extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs))) \ >>> + $(foreach o,$(call expand-objs,$1),$($o-libs))) >>> expand-objs = $(strip $(sort $(filter %.o,$1)) \ >>> $(foreach o,$(filter %.mo,$1),$($o-objs)) \ >>> $(filter-out %.o %.mo,$1)) >> >> Fam, Paolo: looks like this extract-libs rune is stil causing >> problems :-( > > Sean, could you show the configure command line? Also please attach the "make V=1" output and config-host.mak file. Paolo ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk 2014-06-16 10:08 ` Paolo Bonzini @ 2014-06-16 13:55 ` Sean Bruno 2014-06-16 13:58 ` Sean Bruno 0 siblings, 1 reply; 12+ messages in thread From: Sean Bruno @ 2014-06-16 13:55 UTC (permalink / raw) To: Paolo Bonzini; +Cc: Fam Zheng, QEMU Developers > > Sean, could you show the configure command line? > > Also please attach the "make V=1" output and config-host.mak file. > > Paolo > > I'm using: ./configure --static --target-list="i386-bsd-user sparc-bsd-user sparc64-bsd-user x86_64-bsd-user" Log: http://people.freebsd.org/~sbruno/qemu_build_fail.txt sean ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk 2014-06-16 13:55 ` Sean Bruno @ 2014-06-16 13:58 ` Sean Bruno 2014-06-16 14:15 ` Paolo Bonzini 0 siblings, 1 reply; 12+ messages in thread From: Sean Bruno @ 2014-06-16 13:58 UTC (permalink / raw) To: sbruno; +Cc: Paolo Bonzini, Fam Zheng, QEMU Developers On Mon, 2014-06-16 at 06:55 -0700, Sean Bruno wrote: > > > Sean, could you show the configure command line? > > > > Also please attach the "make V=1" output and config-host.mak file. > > > > Paolo > > > > > > I'm using: > > ./configure --static --target-list="i386-bsd-user sparc-bsd-user > sparc64-bsd-user x86_64-bsd-user" > > Log: > http://people.freebsd.org/~sbruno/qemu_build_fail.txt > > sean > > Also, configure output http://people.freebsd.org/~sbruno/qemu_user_configure.txt sean ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk 2014-06-16 13:58 ` Sean Bruno @ 2014-06-16 14:15 ` Paolo Bonzini 2014-06-16 14:20 ` Sean Bruno 2014-06-16 14:57 ` Peter Maydell 0 siblings, 2 replies; 12+ messages in thread From: Paolo Bonzini @ 2014-06-16 14:15 UTC (permalink / raw) To: sbruno; +Cc: Fam Zheng, QEMU Developers Il 16/06/2014 15:58, Sean Bruno ha scritto: > On Mon, 2014-06-16 at 06:55 -0700, Sean Bruno wrote: >>>> Sean, could you show the configure command line? >>> >>> Also please attach the "make V=1" output and config-host.mak file. >>> >>> Paolo >>> >>> >> >> I'm using: >> >> ./configure --static --target-list="i386-bsd-user sparc-bsd-user >> sparc64-bsd-user x86_64-bsd-user" >> >> Log: >> http://people.freebsd.org/~sbruno/qemu_build_fail.txt >> >> sean >> >> > > Also, configure output > > http://people.freebsd.org/~sbruno/qemu_user_configure.txt So this is happening because the $(sort) removes the ordering between libraries and breaks static linking. Your patch likely does nothing except adding more copies of the libraries, which lets the linker work. The executable that breaks is qemu-nbd, which I suspect you couldn't care less about. The bug remains, and ought to be fixed, probably like this: diff --git a/rules.mak b/rules.mak index dde8e00..50b305e 100644 --- a/rules.mak +++ b/rules.mak @@ -22,7 +22,7 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d # Same as -I$(SRC_PATH) -I., but for the nested source/object directories QEMU_INCLUDES += -I$(<D) -I$(@D) -extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs)))) +extract-libs = $(foreach o,$1,$($o-libs)) expand-objs = $(strip $(sort $(filter %.o,$1)) \ $(foreach o,$(filter %.mo,$1),$($o-objs)) \ $(filter-out %.o %.mo,$1)) but the other question is: do we care about static linking of anything except the user-mode emulators? Should --static automatically imply --disable-tools --disable-system? Paolo ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk 2014-06-16 14:15 ` Paolo Bonzini @ 2014-06-16 14:20 ` Sean Bruno 2014-06-16 14:57 ` Peter Maydell 1 sibling, 0 replies; 12+ messages in thread From: Sean Bruno @ 2014-06-16 14:20 UTC (permalink / raw) To: Paolo Bonzini; +Cc: Fam Zheng, QEMU Developers On Mon, 2014-06-16 at 16:15 +0200, Paolo Bonzini wrote: > Il 16/06/2014 15:58, Sean Bruno ha scritto: > > On Mon, 2014-06-16 at 06:55 -0700, Sean Bruno wrote: > >>>> Sean, could you show the configure command line? > >>> > >>> Also please attach the "make V=1" output and config-host.mak file. > >>> > >>> Paolo > >>> > >>> > >> > >> I'm using: > >> > >> ./configure --static --target-list="i386-bsd-user sparc-bsd-user > >> sparc64-bsd-user x86_64-bsd-user" > >> > >> Log: > >> http://people.freebsd.org/~sbruno/qemu_build_fail.txt > >> > >> sean > >> > >> > > > > Also, configure output > > > > http://people.freebsd.org/~sbruno/qemu_user_configure.txt > > So this is happening because the $(sort) removes the ordering between > libraries and breaks static linking. Your patch likely does nothing > except adding more copies of the libraries, which lets the linker work. > > The executable that breaks is qemu-nbd, which I suspect you couldn't > care less about. > > The bug remains, and ought to be fixed, probably like this: > > diff --git a/rules.mak b/rules.mak > index dde8e00..50b305e 100644 > --- a/rules.mak > +++ b/rules.mak > @@ -22,7 +22,7 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d > # Same as -I$(SRC_PATH) -I., but for the nested source/object directories > QEMU_INCLUDES += -I$(<D) -I$(@D) > > -extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs)))) > +extract-libs = $(foreach o,$1,$($o-libs)) > expand-objs = $(strip $(sort $(filter %.o,$1)) \ > $(foreach o,$(filter %.mo,$1),$($o-objs)) \ > $(filter-out %.o %.mo,$1)) > > but the other question is: do we care about static linking of anything > except the user-mode emulators? Should --static automatically imply > --disable-tools --disable-system? > > Paolo Seems like this works for me on FreeBSD with my test case. sean ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk 2014-06-16 14:15 ` Paolo Bonzini 2014-06-16 14:20 ` Sean Bruno @ 2014-06-16 14:57 ` Peter Maydell 1 sibling, 0 replies; 12+ messages in thread From: Peter Maydell @ 2014-06-16 14:57 UTC (permalink / raw) To: Paolo Bonzini; +Cc: Sean Bruno, Fam Zheng, QEMU Developers On 16 June 2014 15:15, Paolo Bonzini <pbonzini@redhat.com> wrote: > but the other question is: do we care about static linking of anything > except the user-mode emulators? Should --static automatically imply > --disable-tools --disable-system? It's certainly tempting. No doubt somebody somewhere is using the statically linked config, of course... thanks -- PMM ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 2/3 v2] bsd-user: Add patches to fix AES_* link errors 2014-06-15 20:47 [Qemu-devel] [PATCH 0/3 v2] bsd-user: Fix linking/dependency issues Sean Bruno 2014-06-15 20:47 ` [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk Sean Bruno @ 2014-06-15 20:47 ` Sean Bruno 2014-06-15 20:47 ` [Qemu-devel] [PATCH 3/3 v2] bsd-user: Implement strace support for getcwd syscall Sean Bruno 2 siblings, 0 replies; 12+ messages in thread From: Sean Bruno @ 2014-06-15 20:47 UTC (permalink / raw) To: qemu-devel; +Cc: Sean Bruno Redefine functions as QEMU_AES_* to avoid conflicts with AES_* in -lcrypto needed (at least) by -lcurl. Take from emulators/qemu-devel/files/patch-include-qemu-aes.h Signed-off-by: Sean Bruno <sbruno@freebsd.org> Signed-off-by: Ed Maste <emaste@freebsd.org> --- include/qemu/aes.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/qemu/aes.h b/include/qemu/aes.h index e79c707..d310411 100644 --- a/include/qemu/aes.h +++ b/include/qemu/aes.h @@ -10,6 +10,15 @@ struct aes_key_st { }; typedef struct aes_key_st AES_KEY; +/* FreeBSD has it's own AES_set_decrypt_key in -lcrypto, avoid conflicts */ +#ifdef __FreeBSD__ +#define AES_set_encrypt_key QEMU_AES_set_encrypt_key +#define AES_set_decrypt_key QEMU_AES_set_decrypt_key +#define AES_encrypt QEMU_AES_encrypt +#define AES_decrypt QEMU_AES_decrypt +#define AES_cbc_encrypt QEMU_AES_cbc_encrypt +#endif + int AES_set_encrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key); int AES_set_decrypt_key(const unsigned char *userKey, const int bits, -- 1.9.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 3/3 v2] bsd-user: Implement strace support for getcwd syscall 2014-06-15 20:47 [Qemu-devel] [PATCH 0/3 v2] bsd-user: Fix linking/dependency issues Sean Bruno 2014-06-15 20:47 ` [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk Sean Bruno 2014-06-15 20:47 ` [Qemu-devel] [PATCH 2/3 v2] bsd-user: Add patches to fix AES_* link errors Sean Bruno @ 2014-06-15 20:47 ` Sean Bruno 2 siblings, 0 replies; 12+ messages in thread From: Sean Bruno @ 2014-06-15 20:47 UTC (permalink / raw) To: qemu-devel; +Cc: Sean Bruno Signed-off-by: Sean Bruno <sbruno@freebsd.org> --- bsd-user/freebsd/strace.list | 1 + 1 file changed, 1 insertion(+) diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list index 2800a2d..f10caaa 100644 --- a/bsd-user/freebsd/strace.list +++ b/bsd-user/freebsd/strace.list @@ -28,6 +28,7 @@ { TARGET_FREEBSD_NR___acl_set_fd, "__acl_set_fd", "%s(%d, %d, %#x)", NULL, NULL }, { TARGET_FREEBSD_NR___acl_set_file, "__acl_set_file", "%s(\"%s\", %d, %#x)", NULL, NULL }, { TARGET_FREEBSD_NR___acl_set_link, "__acl_set_link", "%s(\"%s\", %d, %#x)", NULL, NULL }, +{ TARGET_FREEBSD_NR___getcwd, "__getcwd", NULL, NULL, NULL }, { TARGET_FREEBSD_NR___semctl, "__semctl", NULL, NULL, NULL }, { TARGET_FREEBSD_NR___syscall, "__syscall", NULL, NULL, NULL }, { TARGET_FREEBSD_NR___sysctl, "__sysctl", NULL, print_sysctl, NULL }, -- 1.9.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-06-16 14:57 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-06-15 20:47 [Qemu-devel] [PATCH 0/3 v2] bsd-user: Fix linking/dependency issues Sean Bruno 2014-06-15 20:47 ` [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk Sean Bruno 2014-06-16 7:36 ` Peter Maydell 2014-06-16 9:12 ` Fam Zheng 2014-06-16 10:08 ` Paolo Bonzini 2014-06-16 13:55 ` Sean Bruno 2014-06-16 13:58 ` Sean Bruno 2014-06-16 14:15 ` Paolo Bonzini 2014-06-16 14:20 ` Sean Bruno 2014-06-16 14:57 ` Peter Maydell 2014-06-15 20:47 ` [Qemu-devel] [PATCH 2/3 v2] bsd-user: Add patches to fix AES_* link errors Sean Bruno 2014-06-15 20:47 ` [Qemu-devel] [PATCH 3/3 v2] bsd-user: Implement strace support for getcwd syscall Sean Bruno
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.