Linux-perf-users Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] tools feature: Add missing -lzstd to the fast path feature detection
@ 2020-09-04 20:26 Arnaldo Carvalho de Melo
  2020-09-05  3:26 ` Namhyung Kim
  2020-09-05 10:44 ` Alexey Budankov
  0 siblings, 2 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-09-04 20:26 UTC (permalink / raw)
  To: Alexey Budankov
  Cc: Adrian Hunter, Ian Rogers, Jiri Olsa, Namhyung Kim,
	Linux Kernel Mailing List, linux-perf-users

We were failing that due to GTK2+ and then for the ZSTD test, which made
test-all.c, the fast path feature detection file to fail and thus
trigger building all of the feature tests, slowing down the test.

Eventually the ZSTD test would be built and would succeed, since it had
the needed -lzstd, avoiding:

  $ cat /tmp/build/perf/feature/test-all.make.output
  /usr/bin/ld: /tmp/ccRRJQ4u.o: in function `main_test_libzstd':
  /home/acme/git/perf/tools/build/feature/test-libzstd.c:8: undefined reference to `ZSTD_createCStream'
  /usr/bin/ld: /home/acme/git/perf/tools/build/feature/test-libzstd.c:9: undefined reference to `ZSTD_freeCStream'
  collect2: error: ld returned 1 exit status
  $

Fix it by adding -lzstd to the test-all target.

Now I need an entry to 'perf test' to make sure that
/tmp/build/perf/feature/test-all.make.output is empty...

Fixes: 3b1c5d9659718263 ("tools build: Implement libzstd feature check, LIBZSTD_DIR and NO_LIBZSTD defines")
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

---

diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 977067e34dff064d..ec815ffc7777a02b 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -91,7 +91,7 @@ __BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(
 ###############################
 
 $(OUTPUT)test-all.bin:
-	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -I/usr/include/slang -lslang $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
+	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -I/usr/include/slang -lslang $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma -lzstd
 
 $(OUTPUT)test-hello.bin:
 	$(BUILD)

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

* Re: [PATCH] tools feature: Add missing -lzstd to the fast path feature detection
  2020-09-04 20:26 [PATCH] tools feature: Add missing -lzstd to the fast path feature detection Arnaldo Carvalho de Melo
@ 2020-09-05  3:26 ` Namhyung Kim
  2020-09-05 10:44 ` Alexey Budankov
  1 sibling, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2020-09-05  3:26 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Alexey Budankov, Adrian Hunter, Ian Rogers, Jiri Olsa,
	Linux Kernel Mailing List, linux-perf-users

On Sat, Sep 5, 2020 at 5:26 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> We were failing that due to GTK2+ and then for the ZSTD test, which made
> test-all.c, the fast path feature detection file to fail and thus
> trigger building all of the feature tests, slowing down the test.
>
> Eventually the ZSTD test would be built and would succeed, since it had
> the needed -lzstd, avoiding:
>
>   $ cat /tmp/build/perf/feature/test-all.make.output
>   /usr/bin/ld: /tmp/ccRRJQ4u.o: in function `main_test_libzstd':
>   /home/acme/git/perf/tools/build/feature/test-libzstd.c:8: undefined reference to `ZSTD_createCStream'
>   /usr/bin/ld: /home/acme/git/perf/tools/build/feature/test-libzstd.c:9: undefined reference to `ZSTD_freeCStream'
>   collect2: error: ld returned 1 exit status
>   $
>
> Fix it by adding -lzstd to the test-all target.
>
> Now I need an entry to 'perf test' to make sure that
> /tmp/build/perf/feature/test-all.make.output is empty...
>
> Fixes: 3b1c5d9659718263 ("tools build: Implement libzstd feature check, LIBZSTD_DIR and NO_LIBZSTD defines")
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
> Cc: Ian Rogers <irogers@google.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks
Namhyung

>
> ---
>
> diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> index 977067e34dff064d..ec815ffc7777a02b 100644
> --- a/tools/build/feature/Makefile
> +++ b/tools/build/feature/Makefile
> @@ -91,7 +91,7 @@ __BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(
>  ###############################
>
>  $(OUTPUT)test-all.bin:
> -       $(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -I/usr/include/slang -lslang $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
> +       $(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -I/usr/include/slang -lslang $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma -lzstd
>
>  $(OUTPUT)test-hello.bin:
>         $(BUILD)

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

* Re: [PATCH] tools feature: Add missing -lzstd to the fast path feature detection
  2020-09-04 20:26 [PATCH] tools feature: Add missing -lzstd to the fast path feature detection Arnaldo Carvalho de Melo
  2020-09-05  3:26 ` Namhyung Kim
@ 2020-09-05 10:44 ` Alexey Budankov
  1 sibling, 0 replies; 3+ messages in thread
From: Alexey Budankov @ 2020-09-05 10:44 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Adrian Hunter, Ian Rogers, Jiri Olsa, Namhyung Kim,
	Linux Kernel Mailing List, linux-perf-users


On 04.09.2020 23:26, Arnaldo Carvalho de Melo wrote:
> We were failing that due to GTK2+ and then for the ZSTD test, which made
> test-all.c, the fast path feature detection file to fail and thus
> trigger building all of the feature tests, slowing down the test.
> 
> Eventually the ZSTD test would be built and would succeed, since it had
> the needed -lzstd, avoiding:
> 
>   $ cat /tmp/build/perf/feature/test-all.make.output
>   /usr/bin/ld: /tmp/ccRRJQ4u.o: in function `main_test_libzstd':
>   /home/acme/git/perf/tools/build/feature/test-libzstd.c:8: undefined reference to `ZSTD_createCStream'
>   /usr/bin/ld: /home/acme/git/perf/tools/build/feature/test-libzstd.c:9: undefined reference to `ZSTD_freeCStream'
>   collect2: error: ld returned 1 exit status
>   $
> 
> Fix it by adding -lzstd to the test-all target.
> 
> Now I need an entry to 'perf test' to make sure that
> /tmp/build/perf/feature/test-all.make.output is empty...
> 
> Fixes: 3b1c5d9659718263 ("tools build: Implement libzstd feature check, LIBZSTD_DIR and NO_LIBZSTD defines")
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
> Cc: Ian Rogers <irogers@google.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ---
> 
> diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> index 977067e34dff064d..ec815ffc7777a02b 100644
> --- a/tools/build/feature/Makefile
> +++ b/tools/build/feature/Makefile
> @@ -91,7 +91,7 @@ __BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(
>  ###############################
>  
>  $(OUTPUT)test-all.bin:
> -	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -I/usr/include/slang -lslang $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
> +	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -I/usr/include/slang -lslang $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma -lzstd
>  
>  $(OUTPUT)test-hello.bin:
>  	$(BUILD)
> 

Reviewed-by: Alexei Budankov <alexey.budankov@linux.intel.com>

Thanks!
Alexei

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-04 20:26 [PATCH] tools feature: Add missing -lzstd to the fast path feature detection Arnaldo Carvalho de Melo
2020-09-05  3:26 ` Namhyung Kim
2020-09-05 10:44 ` Alexey Budankov

Linux-perf-users Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-perf-users/0 linux-perf-users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-perf-users linux-perf-users/ https://lore.kernel.org/linux-perf-users \
		linux-perf-users@vger.kernel.org
	public-inbox-index linux-perf-users

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-perf-users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git