error when running "make bench"

Message ID alpine.DEB.2.21.2001161620520.23348@digraph.polyomino.org.uk
State Committed
Headers

Commit Message

Joseph Myers Jan. 16, 2020, 4:31 p.m. UTC
  On Thu, 16 Jan 2020, paul zimmermann wrote:

> thank you Szabolcs, this solved the problem.
> 
> However, I believe the issue is on the glibc side. Indeed, the
> bench-timing-type is linked with /tmp/lib/ld-linux-x86-64.so.2
> by the glibc Makefile, and that file doesn't exist if "make install"
> was not done (I configured with ./configure --prefix=/tmp).

The normal configuration people generally test with has --prefix=/usr.

However, what this indicates to me is that the call of $(timing-type) 
needs to use $(test-via-rtld-prefix).  Does this (untested) patch help in 
your configuration using --prefix=/tmp?


Run bench-timing-type with newly built libc.

benchtests/timing-type is built with the newly built libc, so should
be run with it like actual tests and benchmarks.
  

Comments

Paul Zimmermann Jan. 18, 2020, 12:18 p.m. UTC | #1
Dear Joseph,

> Date: Thu, 16 Jan 2020 16:31:05 +0000
> From: Joseph Myers <joseph@codesourcery.com>
> 
> On Thu, 16 Jan 2020, paul zimmermann wrote:
> 
> > thank you Szabolcs, this solved the problem.
> > 
> > However, I believe the issue is on the glibc side. Indeed, the
> > bench-timing-type is linked with /tmp/lib/ld-linux-x86-64.so.2
> > by the glibc Makefile, and that file doesn't exist if "make install"
> > was not done (I configured with ./configure --prefix=/tmp).
> 
> The normal configuration people generally test with has --prefix=/usr.
> 
> However, what this indicates to me is that the call of $(timing-type) 
> needs to use $(test-via-rtld-prefix).  Does this (untested) patch help in 
> your configuration using --prefix=/tmp?
> 
> 
> Run bench-timing-type with newly built libc.
> 
> benchtests/timing-type is built with the newly built libc, so should
> be run with it like actual tests and benchmarks.
> 
> diff --git a/benchtests/Makefile b/benchtests/Makefile
> index 99c3fae9bf..71b9565fed 100644
> --- a/benchtests/Makefile
> +++ b/benchtests/Makefile
> @@ -217,7 +217,10 @@ bench-malloc: $(binaries-bench-malloc)
>  # capable language or tool.
>  bench-func: $(binaries-bench)
>  	if [ -n '$^' ] ; then \
> -	{ timing_type=$$($(timing-type)); \
> +	{ timing_type=$$($(test-wrapper-env) \
> +			 $(run-program-env) \
> +			 $(test-via-rtld-prefix) \
> +			 $(timing-type)); \
>  	  echo "{\"timing_type\": \"$${timing_type}\","; \
>  	  echo " \"functions\": {"; \
>  	  for run in $^; do \

yes this patch solves the issue.

Paul
  
Joseph Myers Jan. 20, 2020, 11:23 a.m. UTC | #2
On Sat, 18 Jan 2020, paul zimmermann wrote:

> yes this patch solves the issue.

Siddhesh, is this patch 
<https://sourceware.org/ml/libc-alpha/2020-01/msg00346.html> OK for the 
current development stage?
  
Siddhesh Poyarekar Jan. 20, 2020, 11:26 a.m. UTC | #3
On 20/01/20 4:53 pm, Joseph Myers wrote:
> On Sat, 18 Jan 2020, paul zimmermann wrote:
> 
>> yes this patch solves the issue.
> 
> Siddhesh, is this patch 
> <https://sourceware.org/ml/libc-alpha/2020-01/msg00346.html> OK for the 
> current development stage?
> 

Yes, this patch is OK for master.

Thanks,
Siddhesh
  

Patch

diff --git a/benchtests/Makefile b/benchtests/Makefile
index 99c3fae9bf..71b9565fed 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -217,7 +217,10 @@  bench-malloc: $(binaries-bench-malloc)
 # capable language or tool.
 bench-func: $(binaries-bench)
 	if [ -n '$^' ] ; then \
-	{ timing_type=$$($(timing-type)); \
+	{ timing_type=$$($(test-wrapper-env) \
+			 $(run-program-env) \
+			 $(test-via-rtld-prefix) \
+			 $(timing-type)); \
 	  echo "{\"timing_type\": \"$${timing_type}\","; \
 	  echo " \"functions\": {"; \
 	  for run in $^; do \