tools, configure: Fix LIB_PATH computation in configure scripts
PATCH v2 1/1 tools, configure: Fix LIB_PATH computation in configure scripts
# HG changeset patch
# User Boris Ostrovsky <[email protected]>
# Date 1339185838 -7200
# Node ID fa21f847fc66619fad38923cd87d6ba51d731eba
# Parent 32034d1914a607d7b6f1f060352b4cac973600f8 tools, configure: Fix LIB_PATH computation in configure scripts
tool's configure script sets LIB_PATH by chopping off ${exec_prefix} from $libdir and it does so by computing length of ${exec_prefix} value. However, $libdir's value is a literal '${exec_prefix}/lib' string (i.e. $exec_prefix is not substituted) and therefore LIB_PATH may be computed incorrectly, most likely as "c_prefix}/lib64" assuming that exec_prefix is NONE.
Instead, we should start at offset `expr length '${exec_prefix}/' (which is 15).
tools/configure +1 -1
@@ -6062,7 +6062,7 @@ fi else - LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}" + LIB_PATH="${libdir:`expr length '${exec_prefix}/'`}" fi
tools/m4/default_lib.m4 +1 -1
@@ -9,6 +9,6 @@ AC_DEFUN([AX_DEFAULT_LIB], LIB_PATH="lib" ]) ], [ - LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}" + LIB_PATH="${libdir:`expr length '${exec_prefix}/'`}" ]) AC_SUBST(LIB_PATH)])
Quoted 14 lines · Boris Ostrovsky
# HG changeset patch
# User Boris Ostrovsky <[email protected]>
# Date 1339185838 -7200
# Node IDfa21f847fc66619fad38923cd87d6ba51d731eba
# Parent32034d1914a607d7b6f1f060352b4cac973600f8tools, configure: FixLIB_PATHcomputation in configure scriptstool's configure script sets
LIB_PATHby chopping off ${exec_prefix} from $libdir and it does so by computing length of ${exec_prefix} value. However, $libdir's value is a literal '${exec_prefix}/lib' string (i.e. $exec_prefix is not substituted) and thereforeLIB_PATHmay be computed incorrectly, most likely as "c_prefix}/lib64" assuming thatexec_prefixis NONE.
Quoted 4 lines
Instead, we should start at offset `expr length '${exec_prefix}/' (which is 15).
Signed-off-by Boris Ostrovsky <[email protected]>
Boris, sorry for letting this languish for so long.
Roger, any opinion on this patch?
If I'm reading the script right this is the else clause of
[AS_IF([test "\${exec_prefix}/lib" = "$libdir"],so at this point we know libdir != ${exec_prefix}/lib, is there any guarantee that it even starts with \${exec_prefix} ?
I think this patch is complementary too rather than conflicting with / subsumed by Matt's "tools: honour --libdir when it is passed to ./configure" ?
Ian.
Quoted 30 lines
diff -r
32034d1914a6-rfa21f847fc66tools/configuretools/configure +1
-1@@ -6062,7 +6062,7 @@ fi else - LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}" + LIB_PATH="${libdir:`expr length '${exec_prefix}/'`}" fidiff -r
32034d1914a6-rfa21f847fc66tools/m4/default_lib.m4tools/m4/default_lib.m4 +1
-1@@ -9,6 +9,6 @@ AC_DEFUN([AX_DEFAULT_LIB], LIB_PATH="lib" ]) ], [ - LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}" + LIB_PATH="${libdir:`expr length '${exec_prefix}/'`}" ]) AC_SUBST(LIB_PATH)])_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 25 lines · Ian Campbell
Quoted 14 lines · Boris Ostrovsky
# HG changeset patch
# User Boris Ostrovsky<[email protected]>
# Date 1339185838 -7200
# Node IDfa21f847fc66619fad38923cd87d6ba51d731eba
# Parent32034d1914a607d7b6f1f060352b4cac973600f8tools, configure: FixLIB_PATHcomputation in configure scriptstool's configure script sets
LIB_PATHby chopping off ${exec_prefix} from $libdir and it does so by computing length of ${exec_prefix} value. However, $libdir's value is a literal '${exec_prefix}/lib' string (i.e. $exec_prefix is not substituted) and thereforeLIB_PATHmay be computed incorrectly, most likely as "c_prefix}/lib64" assuming thatexec_prefixis NONE.Quoted 4 lines
Instead, we should start at offset `expr length '${exec_prefix}/' (which is 15).
Signed-off-by Boris Ostrovsky<[email protected]>Boris, sorry for letting this languish for so long.
Roger, any opinion on this patch?
If I'm reading the script right this is the else clause of
Quoted 8 lines
[AS_IF([test "\${exec_prefix}/lib" = "$libdir"],so at this point we know libdir != ${exec_prefix}/lib, is there any guarantee that it even starts with \${exec_prefix} ?
I think this patch is complementary too rather than conflicting with / subsumed by Matt's "tools: honour --libdir when it is passed to ./configure" ?
I think this patch is not needed anymore if we apply Matt's one, since Matt's patch gets rid of LIB_PATH usage, and instead uses exec_prefix and libdir directly.
Quoted 38 lines
Ian.
Quoted 25 lines
diff -r
32034d1914a6-rfa21f847fc66tools/configuretools/configure +1
-1@@ -6062,7 +6062,7 @@ fi else - LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}" + LIB_PATH="${libdir:`expr length '${exec_prefix}/'`}" fidiff -r
32034d1914a6-rfa21f847fc66tools/m4/default_lib.m4tools/m4/default_lib.m4 +1
-1@@ -9,6 +9,6 @@ AC_DEFUN([AX_DEFAULT_LIB], LIB_PATH="lib" ]) ], [ - LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}" + LIB_PATH="${libdir:`expr length '${exec_prefix}/'`}" ]) AC_SUBST(LIB_PATH)])Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 31 lines · Roger Pau Monne
Quoted 30 lines · Ian Campbell
Quoted 14 lines · Boris Ostrovsky
# HG changeset patch
# User Boris Ostrovsky<[email protected]>
# Date 1339185838 -7200
# Node IDfa21f847fc66619fad38923cd87d6ba51d731eba
# Parent32034d1914a607d7b6f1f060352b4cac973600f8tools, configure: FixLIB_PATHcomputation in configure scriptstool's configure script sets
LIB_PATHby chopping off ${exec_prefix} from $libdir and it does so by computing length of ${exec_prefix} value. However, $libdir's value is a literal '${exec_prefix}/lib' string (i.e. $exec_prefix is not substituted) and thereforeLIB_PATHmay be computed incorrectly, most likely as "c_prefix}/lib64" assuming thatexec_prefixis NONE.Quoted 4 lines
Instead, we should start at offset `expr length '${exec_prefix}/' (which is 15).
Signed-off-by Boris Ostrovsky<[email protected]>Boris, sorry for letting this languish for so long.
Roger, any opinion on this patch?
If I'm reading the script right this is the else clause of
[AS_IF([test "\${exec_prefix}/lib" = "$libdir"],so at this point we know libdir != ${exec_prefix}/lib, is there any guarantee that it even starts with \${exec_prefix} ?
Quoted 7 lines
Quoted 3 lines
I think this patch is complementary too rather than conflicting with / subsumed by Matt's "tools: honour --libdir when it is passed to ./configure" ?
I think this patch is not needed anymore if we apply Matt's one, since Matt's patch gets rid of
LIB_PATHusage, and instead usesexec_prefixand libdir directly.
So Matt's patch could/should remove tools/m4/default_lib.m4?
Ian.
Quoted 31 lines · Ian Campbell
Quoted 30 lines · Roger Pau Monne
Quoted 29 lines · Ian Campbell
Quoted 14 lines · Boris Ostrovsky
# HG changeset patch
# User Boris Ostrovsky<[email protected]>
# Date 1339185838 -7200
# Node IDfa21f847fc66619fad38923cd87d6ba51d731eba
# Parent32034d1914a607d7b6f1f060352b4cac973600f8tools, configure: FixLIB_PATHcomputation in configure scriptstool's configure script sets
LIB_PATHby chopping off ${exec_prefix} from $libdir and it does so by computing length of ${exec_prefix} value. However, $libdir's value is a literal '${exec_prefix}/lib' string (i.e. $exec_prefix is not substituted) and thereforeLIB_PATHmay be computed incorrectly, most likely as "c_prefix}/lib64" assuming thatexec_prefixis NONE.Quoted 4 lines
Instead, we should start at offset `expr length '${exec_prefix}/' (which is 15).
Signed-off-by Boris Ostrovsky<[email protected]>Boris, sorry for letting this languish for so long.
Roger, any opinion on this patch?
If I'm reading the script right this is the else clause of
[AS_IF([test "\${exec_prefix}/lib" = "$libdir"],so at this point we know libdir != ${exec_prefix}/lib, is there any guarantee that it even starts with \${exec_prefix} ?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
I think this patch is complementary too rather than conflicting with / subsumed by Matt's "tools: honour --libdir when it is passed to ./configure" ?
I think this patch is not needed anymore if we apply Matt's one, since Matt's patch gets rid of
LIB_PATHusage, and instead usesexec_prefixand libdir directly.So Matt's patch could/should remove
tools/m4/default_lib.m4?
Yes, I've already replied to that thread also :)