Message ID | 1390452896-20146-1-git-send-email-stewart@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
Hi Steward, Am 23.01.2014 05:54, schrieb Stewart Smith: > This just makes it a tiny bit easier for new developers to get started > by making it easy to see what package they need to install to get > the dependency. > > Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> > --- > configure | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/configure b/configure > index 3782a6a..87303f6 100755 > --- a/configure > +++ b/configure > @@ -1532,7 +1532,9 @@ EOF > : > else > error_exit "zlib check failed" \ > - "Make sure to have the zlib libs and headers installed." > + "Make sure to have the zlib libs and headers installed." \ > + "Debian/Ubuntu: zlib1g-dev" \ > + "Fedora/RHEL: zlib-devel" > fi > fi Removing that zlib check is on my private todo list since QEMU uses glib2, because glib2 already depends on zlib. > libs_softmmu="$libs_softmmu -lz" > @@ -2348,7 +2350,9 @@ if $pkg_config --atleast-version=$glib_req_ver gthread-2.0; then > LIBS="$glib_libs $LIBS" > libs_qga="$glib_libs $libs_qga" > else > - error_exit "glib-$glib_req_ver required to compile QEMU" > + error_exit "glib-$glib_req_ver required to compile QEMU."\ > + "Debian/Ubuntu: libglib2.0-dev" \ > + "Fedora/RHEL: glib2-devel" > fi > > ########################################## > @@ -2380,6 +2384,8 @@ else > error_exit "pixman not present. Your options:" \ > " (1) Preferred: Install the pixman devel package (any recent" \ > " distro should have packages as Xorg needs pixman too)." \ > + " Ubuntu/Debian: libpixman-1-dev" \ > + " Fedora/RHEL: pixman-devel"\ > " (2) Fetch the pixman submodule, using:" \ > " git submodule update --init pixman" > fi > @@ -2656,6 +2662,8 @@ EOF > # have neither and want - prompt for system/submodule install > error_exit "DTC not present. Your options:" \ > " (1) Preferred: Install the DTC devel package" \ > + " Ubuntu/Debian: libfdt-dev" \ The previous line uses a tab character. Replace it by blanks. Here a small hint might by useful because searching for 'DTC' packages will usually fail. What about writing "DTC (libfdt) devel package"? > + " Fedora/RHEL: libfdt-devel" \ > " (2) Fetch the DTC submodule, using:" \ > " git submodule update --init dtc" > else > I'm not sure whether the file 'configure' is the right place for the precise package information. Here are some thoughts: * Those help messages are only useful for Debian / Fedore based Linux distributions, but not for OpenSuSE and definitely not for other hosts (Mac OS X, Windows, BSD). * They only cover a very limited set of packages. For a really useful QEMU, lots of more packages are needed. * Package names are not really good interfaces because they tend to change over time. My personal impression is that the current hints in configure are sufficient (with the one exception DTC) and that the QEMU wiki is a better place to document build dependencies for the different platforms. Cheers Stefan
On 23 January 2014 06:21, Stefan Weil <sw@weilnetz.de> wrote: > My personal impression is that the current hints in configure are > sufficient (with the one exception DTC) and that the QEMU wiki is a > better place to document build dependencies for the different platforms. I tend to agree, with the exception that our "feature_not_found()" errors are excessively cryptic, because we just pass a single word to that function, and so we end up saying "User requested feature docs, configure was not able to find it" when what we actually mean is "You need to install makeinfo and pod2man to build the documentation". thanks -- PMM
Stefan Weil <sw@weilnetz.de> writes: > Am 23.01.2014 05:54, schrieb Stewart Smith: >> diff --git a/configure b/configure >> index 3782a6a..87303f6 100755 >> --- a/configure >> +++ b/configure >> @@ -1532,7 +1532,9 @@ EOF >> : >> else >> error_exit "zlib check failed" \ >> - "Make sure to have the zlib libs and headers installed." >> + "Make sure to have the zlib libs and headers installed." \ >> + "Debian/Ubuntu: zlib1g-dev" \ >> + "Fedora/RHEL: zlib-devel" >> fi >> fi > > Removing that zlib check is on my private todo list since QEMU uses > glib2, because glib2 already depends on zlib. It may have some value existing as (at least on Fedora) glib2-devel depends on libz.so.1 (i.e. zlib) but *not* on zlib-devel, so if we just checked for glib2 we'd get the lib but not the headers for zlib, thus having a failing build. >> @@ -2656,6 +2662,8 @@ EOF >> # have neither and want - prompt for system/submodule install >> error_exit "DTC not present. Your options:" \ >> " (1) Preferred: Install the DTC devel package" \ >> + " Ubuntu/Debian: libfdt-dev" \ > > The previous line uses a tab character. Replace it by blanks. ack. Will do. > Here a small hint might by useful because searching for 'DTC' packages > will usually fail. What about writing "DTC (libfdt) devel package"? ack, will do. >> + " Fedora/RHEL: libfdt-devel" \ >> " (2) Fetch the DTC submodule, using:" \ >> " git submodule update --init dtc" >> else >> > > I'm not sure whether the file 'configure' is the right place for the > precise package information. Here are some thoughts: It's possibly not the ideal place, but I've never found an ideal place. In other projects I've had the list of package names bitrot in: - configure output - README - HACKING - INSTALL - some other documentation that ends up on a web site Pretty much the only place it hasn't bitrotted is puppet manifests and modules for setting up build machines... which isn't the *ideal* form of documentation :) That being said, I've found the package names outputted by configure to be useful, even if not always perfect. > * Those help messages are only useful for Debian / Fedore based Linux > distributions, but not for OpenSuSE and definitely not for other > hosts (Mac OS X, Windows, BSD). My guess is that for OSX, Windows and BSD the git submodule option may be taken more often? I'll happily add in the OpenSuSE packages.. I'm just a bit less experienced with OpenSuSE (maybe it's time for a VM though). > * They only cover a very limited set of packages. For a really useful > QEMU, lots of more packages are needed. That was to be my next patch: fleshing out the list and thinking of somewhere to put the optional package names so that they're easily discoverable. > * Package names are not really good interfaces because they tend to > change over time. Yep, they do - but this is relatively rare, and usually it's a version number bump, and the old name usually gives you something to search for that only gives a couple of results (rather than dozens). > My personal impression is that the current hints in configure are > sufficient (with the one exception DTC) and that the QEMU wiki is a > better place to document build dependencies for the different platforms. I'd vote for and rather than or, simply because I'm not good enough to read all the Wiki docs before typing "./configure && make" and I suspect I'm not the only one in the world :)
This expands on my previous patch which was just the "configure: helpfully output package names for some missing dependencies" patch. Based on feedback I've added a hint to the could not find DTC error message. There's also other changes that were suggested and the ordering of output from configure and configure --help which I found rather useful when attempting to find what package was needed for each configure option. Stewart Smith (6): configure: add hint of libfdt to DTC dependency not found message configure: sort output of configure results alphabetically configure: alphabetize output of --help and separate into groups configure: add help for --disable-xfsctl and --enable-xfsctl configure: add hints to a remedy for feature_not_found errors configure: helpfully output package names for some missing dependencies. configure | 378 ++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 197 insertions(+), 181 deletions(-)
24.01.2014 05:39, Stewart Smith wrote: > This expands on my previous patch which was just the "configure: helpfully > output package names for some missing dependencies" patch. > > Based on feedback I've added a hint to the could not find DTC error message. > > There's also other changes that were suggested and the ordering of output > from configure and configure --help which I found rather useful when > attempting to find what package was needed for each configure option. > > Stewart Smith (6): >1 configure: add hint of libfdt to DTC dependency not found message >2 configure: sort output of configure results alphabetically >3 configure: alphabetize output of --help and separate into groups >4 configure: add help for --disable-xfsctl and --enable-xfsctl >5 configure: add hints to a remedy for feature_not_found errors >6 configure: helpfully output package names for some missing > dependencies. I think I'd happily take 1, 2, 5 and 6, but 3 and 4 really needs to be redone, mentioning every option just once, not twice as it is done now. After that's done, it might be not necessary anymore for 3 at all. Or I can wait for a resend of whole series. Or alternatively I can try to rework it myself, but for now I'm quite busy so can't promise anything. Please note that major tweaks in ./configure will most likely conflict with modules support series which has been posted for revew again. What should I do? Thanks, /mjt
diff --git a/configure b/configure index 3782a6a..87303f6 100755 --- a/configure +++ b/configure @@ -1532,7 +1532,9 @@ EOF : else error_exit "zlib check failed" \ - "Make sure to have the zlib libs and headers installed." + "Make sure to have the zlib libs and headers installed." \ + "Debian/Ubuntu: zlib1g-dev" \ + "Fedora/RHEL: zlib-devel" fi fi libs_softmmu="$libs_softmmu -lz" @@ -2348,7 +2350,9 @@ if $pkg_config --atleast-version=$glib_req_ver gthread-2.0; then LIBS="$glib_libs $LIBS" libs_qga="$glib_libs $libs_qga" else - error_exit "glib-$glib_req_ver required to compile QEMU" + error_exit "glib-$glib_req_ver required to compile QEMU."\ + "Debian/Ubuntu: libglib2.0-dev" \ + "Fedora/RHEL: glib2-devel" fi ########################################## @@ -2380,6 +2384,8 @@ else error_exit "pixman not present. Your options:" \ " (1) Preferred: Install the pixman devel package (any recent" \ " distro should have packages as Xorg needs pixman too)." \ + " Ubuntu/Debian: libpixman-1-dev" \ + " Fedora/RHEL: pixman-devel"\ " (2) Fetch the pixman submodule, using:" \ " git submodule update --init pixman" fi @@ -2656,6 +2662,8 @@ EOF # have neither and want - prompt for system/submodule install error_exit "DTC not present. Your options:" \ " (1) Preferred: Install the DTC devel package" \ + " Ubuntu/Debian: libfdt-dev" \ + " Fedora/RHEL: libfdt-devel" \ " (2) Fetch the DTC submodule, using:" \ " git submodule update --init dtc" else
This just makes it a tiny bit easier for new developers to get started by making it easy to see what package they need to install to get the dependency. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> --- configure | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)