From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Subject: Re: make install not creating lib entries in /usr/lib under Ubunu 11.10 Date: Wed, 29 Feb 2012 11:18:14 +0100 Message-ID: References: <1319013780.3385.64.camel@zakaz.uk.xensource.com> <20126.62103.576976.140927@mariner.uk.xensource.com> <1319287633.17770.10.camel@dagon.hellion.org.uk> <1330423226.31269.35.camel@zakaz.uk.xensource.com> <1330459026.10008.57.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1330459026.10008.57.camel@dagon.hellion.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xensource.com" , Ian Jackson , Jeffrey Karrels List-Id: xen-devel@lists.xenproject.org 2012/2/28 Ian Campbell : > On Tue, 2012-02-28 at 17:51 +0000, Jeffrey Karrels wrote: > >> > Have you changed anything here or are you saying that a pristine Xen >> > tree when built on CentOS installs 64 bit libraries to /usr/lib instead >> > of /usr/lib64? If so please can you be precise about what tree you are >> > running (e.g. the exact URL you cloned and which changeset you got) and >> > steps you took to install (e.g. what patches did you apply, what >> > commands did you type) and what exactly you saw (e.g. what was >> > in /usr/lib and what was in /usr/lib64) >> >> #uname -a >> Linux xenbuild2.cyberlab 2.6.32-220.4.1.el6.x86_64 #1 SMP Tue Jan 24 >> 02:13:44 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux >> >> #hg clone -r 24869 http://xenbits.xen.org/hg/xen-unstable.hg >> #cd xen-unstable >> #./configure --enable-xsm --libdir=/usr/lib64 > > OK, so you are using something new enough to have the autoconf stuff -- > I think this is simply a bug in that. I've CC'd Roger. > > Ideally configure would auto-detect the right thing for the given system > and so --libdir would not be required. This would certainly be n > improvement over the pre-autoconf thing. configure was not properly parsing the libdir path and always set it to "lib", this is a fix: 8<-------------------------------------------- autoconf: fix libdir detection If user specifies a libdir it is used, if no libdir is specified configure checks if $prefix/lib64 is a directory and uses that, if not lib is used. Signed-off-by: Roger Pau Monne diff -r 4758a7a94c15 tools/configure --- a/tools/configure Wed Feb 22 04:46:07 2012 +0100 +++ b/tools/configure Wed Feb 22 06:31:53 2012 +0100 @@ -3845,7 +3845,6 @@ case $host_os in *\ *) host_os=`echo "$h - # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # @@ -6551,13 +6550,23 @@ else fi # Check library path -if test -d "$prefix/lib64"; then : - - LIB_PATH="lib64" - -else - - LIB_PATH="lib" +if test "\${exec_prefix}/lib" = "$libdir"; then : + if test "$prefix" = "NONE"; then : + prefix=$ac_default_prefix +fi + if test -d "${prefix}/lib64"; then : + + LIB_PATH="lib64" + +else + + LIB_PATH="lib" + +fi + +else + + LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}" fi diff -r 4758a7a94c15 tools/m4/default_lib.m4 --- a/tools/m4/default_lib.m4 Wed Feb 22 04:46:07 2012 +0100 +++ b/tools/m4/default_lib.m4 Wed Feb 22 06:31:53 2012 +0100 @@ -1,8 +1,12 @@ AC_DEFUN([AX_DEFAULT_LIB], -[AS_IF([test -d "$prefix/lib64"], [ - LIB_PATH="lib64" -],[ - LIB_PATH="lib" +[AS_IF([test "\${exec_prefix}/lib" = "$libdir"], + [AS_IF([test "$prefix" = "NONE"], [prefix=$ac_default_prefix]) + AS_IF([test -d "${prefix}/lib64"], [ + LIB_PATH="lib64" + ],[ + LIB_PATH="lib" + ]) +], [ + LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}" ]) AC_SUBST(LIB_PATH)]) -