All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] Bugs during building 4.3.1
@ 2013-11-03 18:02 David Denny
  2013-11-03 18:24 ` Andrew Cooper
  0 siblings, 1 reply; 4+ messages in thread
From: David Denny @ 2013-11-03 18:02 UTC (permalink / raw)
  To: xen-devel


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

Hi!

 

Thanks for the great software!  I use it constantly.  Thought I'd let you
know of a few issues I ran into.  #3 might be pretty easy to fix.

 

1.       No spaces allowed in the base directory path!   I guess some quotes
are missing on variables in the makefiles.  At least this is a "known
limitation."

 

2.       Configuration process does not check for openssl and x11, which I
believe are both required.

 

3.       APPEND_LIB doesn't carry through to all the makefiles.

 

My openssl and x11 libraries are in non-standard locations (not in /usr/X11
or /usr/openssl).

I've provided three very trivial patches that I hope will be more
illustrative than my typing, but they are probably not production grade.  

I applied them prior to configuration and got a clean build.

 

Best regards,

 

David


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

[-- Attachment #2: xen-makefile.patch --]
[-- Type: application/octet-stream, Size: 804 bytes --]

--- tools/blktap/drivers/Makefile	2013-11-03 11:11:39.935857730 -0500
+++ tools/blktap/drivers/Makefile.new	2013-11-03 11:10:55.765494493 -0500
@@ -57,16 +57,16 @@
 all: $(IBIN) qcow-util
 
 blktapctrl: $(BLKTAB-OBJS-y)
-	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS_blktapctrl)
+	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS_blktapctrl) $(APPEND_LDFLAGS)
 
 tapdisk: tapdisk.o $(BLK-OBJS-y)
-	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS_img)
+	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS_img) $(APPEND_LDFLAGS)
 
 .PHONY: qcow-util
 qcow-util: img2qcow qcow2raw qcow-create
 
 img2qcow qcow2raw qcow-create: %: %.o $(BLK-OBJS-y)
-	$(CC) $(LDFLAGS) -o $* $^ $(LDLIBS_img)
+	$(CC) $(LDFLAGS) -o $* $^ $(LDLIBS_img) $(APPEND_LDFLAGS)
 
 install: all
 	$(INSTALL_PROG) $(IBIN) $(QCOW_UTIL) $(VHD_UTIL) $(DESTDIR)$(SBINDIR)

[-- Attachment #3: xen-makefile2.patch --]
[-- Type: application/octet-stream, Size: 514 bytes --]

--- tools/qemu-xen-traditional/rules.mak	2013-11-03 12:01:27.320113656 -0500
+++ tools/qemu-xen-traditional/rules.mak.new	2013-11-03 11:55:00.186984301 -0500
@@ -8,7 +8,7 @@
 %.o: %.m
 	$(call quiet-command,$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<,"  OBJC  $(TARGET_DIR)$@")
 
-LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS),"  LINK  $(TARGET_DIR)$@")
+LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(APPEND_LDFLAGS) $(LIBS),"  LINK  $(TARGET_DIR)$@")
 
 %$(EXESUF): %.o
 	$(LINK)

[-- Attachment #4: xen-makefile3.patch --]
[-- Type: application/octet-stream, Size: 733 bytes --]

--- tools/qemu-xen/rules.mak	2013-10-10 10:20:18.000000000 -0400
+++ tools/qemu-xen/rules.mak.new	2013-11-03 12:44:47.681054056 -0500
@@ -31,7 +31,8 @@
 %.o: %.m
 	$(call quiet-command,$(OBJCC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  OBJC  $(TARGET_DIR)$@")
 
-LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(sort $(filter %.o, $1)) $(filter-out %.o, $1) $(LIBS),"  LINK  $(TARGET_DIR)$@")
+APPEND_LDFLAGS += -L/opt/openssl/lib -L/usr/x11/lib
+LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(sort $(filter %.o, $1)) $(filter-out %.o, $1) $(APPEND_LDFLAGS) $(LIBS),"  LINK  $(TARGET_DIR)$@")
 
 %$(EXESUF): %.o
 	$(call LINK,$^)

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] Bugs during building 4.3.1
  2013-11-03 18:02 [BUG] Bugs during building 4.3.1 David Denny
@ 2013-11-03 18:24 ` Andrew Cooper
  2013-11-03 20:16   ` David Denny
  2013-11-04 11:15   ` Ian Campbell
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Cooper @ 2013-11-03 18:24 UTC (permalink / raw)
  To: David Denny; +Cc: xen-devel


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

On 03/11/13 18:02, David Denny wrote:
>
> Hi!
>
>  
>
> Thanks for the great software!  I use it constantly.  Thought I'd let
> you know of a few issues I ran into.  #3 might be pretty easy to fix.
>
>  
>
> 1.       No spaces allowed in the base directory path!   I guess some
> quotes are missing on variables in the makefiles.  At least this is a
> "known limitation."
>

Spaces in paths are generally frowned upon.  Having said that, it is
probably something worth fixing if you can identify what is at fault.

>  
>
> 2.       Configuration process does not check for openssl and x11,
> which I believe are both required.
>

How are you building qemu upstream?  It is certainly not expected to be
used with x11 enabled.  If you are using the defaults as present in Xen
4.3.1 then we really do have some fixing to do.

>  
>
> 3.       APPEND_LIB doesn't carry through to all the makefiles.
>

This looks plausible.  If I remember correctly, the idea was always to
fault in APPEND_LIB to new bits of the build system as and when needed. 
I suppose you have come across this because of x11 and openssl ?

To submit patches, you should follow the instructions at
http://wiki.xen.org/wiki/Submitting_Xen_Patches - particularity "Signing
off a patch"

~Andrew

>  
>
> My openssl and x11 libraries are in non-standard locations (not in
> /usr/X11 or /usr/openssl).
>
> I've provided three very trivial patches that I hope will be more
> illustrative than my typing, but they are probably not production grade. 
>
> I applied them prior to configuration and got a clean build.
>
>  
>
> Best regards,
>
>  
>
> David
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel


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

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] Bugs during building 4.3.1
  2013-11-03 18:24 ` Andrew Cooper
@ 2013-11-03 20:16   ` David Denny
  2013-11-04 11:15   ` Ian Campbell
  1 sibling, 0 replies; 4+ messages in thread
From: David Denny @ 2013-11-03 20:16 UTC (permalink / raw)
  To: 'Andrew Cooper'; +Cc: xen-devel


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

Hi Andrew,

 

Thanks for the quick response and the notes!

 

See below.

 

Best regards,

 

David

 

From: Andrew Cooper [mailto:andrew.cooper3@citrix.com] 
Sent: Sunday, November 03, 2013 1:25 PM
To: David Denny
Cc: xen-devel@lists.xen.org
Subject: Re: [Xen-devel] [BUG] Bugs during building 4.3.1

 

On 03/11/13 18:02, David Denny wrote:

Hi!

 

Thanks for the great software!  I use it constantly.  Thought I’d let you
know of a few issues I ran into.  #3 might be pretty easy to fix.

 

1.       No spaces allowed in the base directory path!   I guess some quotes
are missing on variables in the makefiles.  At least this is a “known
limitation.”


Spaces in paths are generally frowned upon.  Having said that, it is
probably something worth fixing if you can identify what is at fault.

> Agreed re: spaces, but with SAMBA continuing to come on string, it’s not
likely to go away!   I’ll look in to it and see what I can find.  I have a
suspicion that it may run throughout all the make process, and fixing it
might seriously destabilize thing!  Having said that, it might be worth a
note tucked away somewhere.  Perhaps I should follow that up with the
documentation folks.

 

2.       Configuration process does not check for openssl and x11, which I
believe are both required.


How are you building qemu upstream?  It is certainly not expected to be used
with x11 enabled.  If you are using the defaults as present in Xen 4.3.1
then we really do have some fixing to do.

> I’m have no idea how I wound up with x11 and qemu enabled.  Frankly, I’m a
bit of newbie on all the various options and such (hence the fooling around
with Xen.)  It “just happened” and I was trying to satisfy the dependencies.
I had a heck of a time with 4.3.0 but this has gone quite smoothly!

 

This is how I ran configure.  It compiled well and then hit a snag with
missing –lcrypt.  After patching that one, it later missed -lX11. 

 

./configure --prefix=/opt/xen-4.3.1 \

  APPEND_LIB='/opt/openssl/lib /usr/x11/lib' \

  APPEND_INCLUDES='/opt/openssl/include /usr/x11/include' 2>&1

 

I’ve attached a log of the “bad” configure and build (the configure ran
fine.)  I can also forward one of the “good” build.

 

3.       APPEND_LIB doesn’t carry through to all the makefiles.


This looks plausible.  If I remember correctly, the idea was always to fault
in APPEND_LIB to new bits of the build system as and when needed.  I suppose
you have come across this because of x11 and openssl ?

To submit patches, you should follow the instructions at
http://wiki.xen.org/wiki/Submitting_Xen_Patches - particularity "Signing off
a patch"



Ø    I read the notes – pretty straightforward and sensible.  

Ø    The third patch is not ready to go.  I just literally hacked in my
paths to make it work. APPEND_LDFLAGS is not getting passed down to it.  I
think a config file should 

Ø    be included from a top-level directory, but I’ve tried putting in
$(XEN_ROOT)/Config.mk and that didn’t help.  I would need to have some
guidance to figure this one 

Ø    out, hence submitting it as a “bug” not a “patch.”   Here is what it
looks like…

 

“seccomp support   no

coroutine backend ucontext

GlusterFS support no

make[3]: Entering directory
`/usr/src/3rd-Party/Xen/xen-4.3.1/tools/qemu-xen-dir'

  GEN   config-host.h

  GEN   trace.h

  GEN   trace.c

  GEN   trace.c

  GEN   config-target.h

  LINK  i386-softmmu/qemu-system-i386

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux
-gnu/bin/ld: cannot find -lX11

collect2: error: ld returned 1 exit status

make[4]: *** [qemu-system-i386] Error 1

make[3]: *** [subdir-i386-softmmu] Error 2

make[3]: Leaving directory
`/usr/src/3rd-Party/Xen/xen-4.3.1/tools/qemu-xen-dir'

make[2]: *** [subdir-all-qemu-xen-dir] Error 2

make[2]: Leaving directory `/usr/src/3rd-Party/Xen/xen-4.3.1/tools'

make[1]: *** [subdirs-install] Error 2

make[1]: Leaving directory `/usr/src/3rd-Party/Xen/xen-4.3.1/tools'

make: *** [install-tools] Error 2”

 


~Andrew




 

My openssl and x11 libraries are in non-standard locations (not in /usr/X11
or /usr/openssl).

I’ve provided three very trivial patches that I hope will be more
illustrative than my typing, but they are probably not production grade.  

I applied them prior to configuration and got a clean build.

 

Best regards,

 

David






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

 


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

[-- Attachment #2: configure.log --]
[-- Type: application/octet-stream, Size: 7097 bytes --]

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
Will build the following subsystems:
  xen
  kernels
  tools
  stubdom
  docs
configure: creating ./config.status
config.status: creating ./config/Toplevel.mk
=== configuring in tools (/usr/src/3rd-Party/Xen/xen-4.3.1/tools)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/opt/xen-4.3.1'  'APPEND_LIB=/opt/openssl/lib /usr/x11/lib' 'APPEND_INCLUDES=/opt/openssl/include /usr/x11/include2' --cache-file=/dev/null --srcdir=.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /bin/install -c
checking for bison... /usr/bin/bison
checking for flex... /usr/bin/flex
checking for perl... /usr/bin/perl
checking for ocamlc... ocamlc
OCaml version is 4.00.1
OCaml library path is /opt/ocaml-4.00.1/lib/ocaml
checking for ocamlopt... ocamlopt
checking for ocamlc.opt... ocamlc.opt
checking for ocamlopt.opt... ocamlopt.opt
checking for ocaml... ocaml
checking for ocamldep... ocamldep
checking for ocamlmktop... ocamlmktop
checking for ocamlmklib... ocamlmklib
checking for ocamldoc... ocamldoc
checking for ocamlbuild... ocamlbuild
checking for ocamlfind... no
checking for checkpolicy... no
checking for bash... /bin/sh
checking for python... /usr/bin/python
checking for python version >= 2.3 ... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for python-config... /usr/bin/python-config
checking Python.h usability... yes
checking Python.h presence... yes
checking for Python.h... yes
checking for PyArg_ParseTuple in -lpython2.7... yes
checking for xgettext... /usr/bin/xgettext
checking for as86... /usr/bin/as86
checking for ld86... /usr/bin/ld86
checking for bcc... /usr/bin/bcc
checking for iasl... /opt/acpica/bin/iasl
checking uuid/uuid.h usability... yes
checking uuid/uuid.h presence... yes
checking for uuid/uuid.h... yes
checking for uuid_clear in -luuid... yes
checking uuid.h usability... no
checking uuid.h presence... no
checking for uuid.h... no
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking for clear in -lcurses... yes
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for clear in -lncurses... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for glib... yes
checking for wget... /usr/bin/wget
checking bzlib.h usability... yes
checking bzlib.h presence... yes
checking for bzlib.h... yes
checking for BZ2_bzDecompressInit in -lbz2... yes
checking lzma.h usability... yes
checking lzma.h presence... yes
checking for lzma.h... yes
checking for lzma_stream_decoder in -llzma... yes
checking lzo/lzo1x.h usability... yes
checking lzo/lzo1x.h presence... yes
checking for lzo/lzo1x.h... yes
checking for lzo1x_decompress in -llzo2... yes
checking for io_setup in -laio... yes
checking for MD5 in -lcrypto... yes
checking ext2fs/ext2fs.h usability... yes
checking ext2fs/ext2fs.h presence... yes
checking for ext2fs/ext2fs.h... yes
checking for ext2fs_open2 in -lext2fs... yes
checking ext4fs/ext2fs.h usability... no
checking ext4fs/ext2fs.h presence... no
checking for ext4fs/ext2fs.h... no
checking for gcry_md_hash_buffer in -lgcrypt... yes
checking for pthread flag... -pthread
checking libutil.h usability... no
checking libutil.h presence... no
checking for libutil.h... no
checking for openpty et al... -lutil
checking for yajl_alloc in -lyajl... yes
checking for deflateCopy in -lz... yes
checking for libiconv_open in -liconv... no
checking yajl/yajl_version.h usability... yes
checking yajl/yajl_version.h presence... yes
checking for yajl/yajl_version.h... yes
checking sys/eventfd.h usability... yes
checking sys/eventfd.h presence... yes
checking for sys/eventfd.h... yes
configure: creating ./config.status
config.status: creating ../config/Tools.mk
config.status: creating config.h
=== configuring in stubdom (/usr/src/3rd-Party/Xen/xen-4.3.1/stubdom)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/opt/xen-4.3.1'  'APPEND_LIB=/opt/openssl/lib /usr/x11/lib' 'APPEND_INCLUDES=/opt/openssl/include /usr/x11/include2' --cache-file=/dev/null --srcdir=.
checking for wget... /usr/bin/wget
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /bin/install -c
checking for cmake... /usr/bin/cmake
Will build the following stub domains:
  ioemu-stubdom
  pv-grub
  xenstore-stubdom
  vtpm-stubdom
  vtpmmgr-stubdom
configure: creating ./config.status
config.status: creating ../config/Stubdom.mk
=== configuring in docs (/usr/src/3rd-Party/Xen/xen-4.3.1/docs)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/opt/xen-4.3.1'  'APPEND_LIB=/opt/openssl/lib /usr/x11/lib' 'APPEND_INCLUDES=/opt/openssl/include /usr/x11/include2' --cache-file=/dev/null --srcdir=.
checking for fig2dev... no
checking for pod2man... /usr/bin/pod2man
checking for pod2html... /usr/bin/pod2html
checking for pod2text... /usr/bin/pod2text
checking for markdown... no
checking for markdown_py... no
checking for perl... /usr/bin/perl
configure: creating ./config.status
config.status: creating ../config/Docs.mk

[-- Attachment #3: make.log.gz --]
[-- Type: application/x-gzip, Size: 40311 bytes --]

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] Bugs during building 4.3.1
  2013-11-03 18:24 ` Andrew Cooper
  2013-11-03 20:16   ` David Denny
@ 2013-11-04 11:15   ` Ian Campbell
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2013-11-04 11:15 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: David Denny, xen-devel

On Sun, 2013-11-03 at 18:24 +0000, Andrew Cooper wrote:


> > 2.       Configuration process does not check for openssl and x11,
> > which I believe are both required.
> > 
> > 
> 
> How are you building qemu upstream?  It is certainly not expected to
> be used with x11 enabled.

It will if you want SDL support. We check for SDL though and I've
expected that the recursively check for X11, or at least expect the
package manager to take care of it via dependencies in the -devel
packages.

>   If you are using the defaults as present in Xen 4.3.1 then we really
> do have some fixing to do.
> 
> >  
> > 
> > 3.       APPEND_LIB doesn’t carry through to all the makefiles.
> > 
> > 
> 
> This looks plausible.  If I remember correctly, the idea was always to
> fault in APPEND_LIB to new bits of the build system as and when
> needed.  I suppose you have come across this because of x11 and
> openssl ?
> 
> To submit patches, you should follow the instructions at
> http://wiki.xen.org/wiki/Submitting_Xen_Patches - particularity
> "Signing off a patch"

At least the qemu-xen patch cannot be done this way, since we cannot
upstream APPEND_LIBS. I mean they may want to accept such a patch but
they may also have their own build system specific way of achieving
this.

We probably need to involve APPENDS_LIBS in the invocation of qemu-xen's
configure.

Ian.


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-04 11:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-03 18:02 [BUG] Bugs during building 4.3.1 David Denny
2013-11-03 18:24 ` Andrew Cooper
2013-11-03 20:16   ` David Denny
2013-11-04 11:15   ` Ian Campbell

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.