Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1676564 > unrolled thread

[PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link against libnuma

Started byFathi Boudra <fathi.boudra@linaro.org>
First post2017-06-28 13:30 +0200
Last post2017-06-28 17:20 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link against libnuma Fathi Boudra <fathi.boudra@linaro.org> - 2017-06-28 13:30 +0200
    Re: [PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link  against libnuma Shuah Khan <shuah@kernel.org> - 2017-06-28 16:20 +0200
      Re: [PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link  against libnuma Fathi Boudra <fathi.boudra@linaro.org> - 2017-06-28 16:40 +0200
        Re: [PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link  against libnuma Shuah Khan <shuah@kernel.org> - 2017-06-28 17:20 +0200

#1676564 — [PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link against libnuma

FromFathi Boudra <fathi.boudra@linaro.org>
Date2017-06-28 13:30 +0200
Subject[PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link against libnuma
Message-ID<tXjku-69G-11@gated-at.bofh.it>
reuseport_bpf_numa fails to build with undefined reference:

 aarch64-linaro-linux-gcc
 --sysroot=/build/tmp-rpb-glibc/sysroots/hikey -Wall
 -Wl,--no-as-needed -O2 -g -I../../../../usr/include/  -Wl,-O1
 -Wl,--hash-style=gnu -Wl,--as-needed -lnuma  reuseport_bpf_numa.c
 -o
 /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa
 /tmp/ccfUuExT.o: In function `send_from_node':
 /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:138:
 undefined reference to `numa_run_on_node'
 /tmp/ccfUuExT.o: In function `main':
 /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:230:
 undefined reference to `numa_available'
 /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:233:
 undefined reference to `numa_max_node'

Use LDLIBS instead of LDFLAGS to properly link against libnuma.

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
---
 tools/testing/selftests/net/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
index 35cbb4cba410..17c732a19c4c 100644
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@ -3,7 +3,7 @@
 CFLAGS =  -Wall -Wl,--no-as-needed -O2 -g
 CFLAGS += -I../../../../usr/include/
 
-reuseport_bpf_numa: LDFLAGS += -lnuma
+reuseport_bpf_numa: LDLIBS += -lnuma
 
 TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh
 TEST_GEN_FILES =  socket
-- 
2.13.0

[toc] | [next] | [standalone]


#1676702 — Re: [PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link against libnuma

FromShuah Khan <shuah@kernel.org>
Date2017-06-28 16:20 +0200
SubjectRe: [PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link against libnuma
Message-ID<tXlZ0-7Qx-9@gated-at.bofh.it>
In reply to#1676564
On 06/28/2017 05:19 AM, Fathi Boudra wrote:
> reuseport_bpf_numa fails to build with undefined reference:
> 
>  aarch64-linaro-linux-gcc
>  --sysroot=/build/tmp-rpb-glibc/sysroots/hikey -Wall
>  -Wl,--no-as-needed -O2 -g -I../../../../usr/include/  -Wl,-O1
>  -Wl,--hash-style=gnu -Wl,--as-needed -lnuma  reuseport_bpf_numa.c
>  -o
>  /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa
>  /tmp/ccfUuExT.o: In function `send_from_node':
>  /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:138:
>  undefined reference to `numa_run_on_node'
>  /tmp/ccfUuExT.o: In function `main':
>  /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:230:
>  undefined reference to `numa_available'
>  /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:233:
>  undefined reference to `numa_max_node'
> 
> Use LDLIBS instead of LDFLAGS to properly link against libnuma.
> 
> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>

Did you try this on linux-ksefltest next? It has the fix for this.

thanks,
-- Shuah
> ---
>  tools/testing/selftests/net/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
> index 35cbb4cba410..17c732a19c4c 100644
> --- a/tools/testing/selftests/net/Makefile
> +++ b/tools/testing/selftests/net/Makefile
> @@ -3,7 +3,7 @@
>  CFLAGS =  -Wall -Wl,--no-as-needed -O2 -g
>  CFLAGS += -I../../../../usr/include/
>  
> -reuseport_bpf_numa: LDFLAGS += -lnuma
> +reuseport_bpf_numa: LDLIBS += -lnuma
>  
>  TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh
>  TEST_GEN_FILES =  socket
> 

[toc] | [prev] | [next] | [standalone]


#1676728 — Re: [PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link against libnuma

FromFathi Boudra <fathi.boudra@linaro.org>
Date2017-06-28 16:40 +0200
SubjectRe: [PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link against libnuma
Message-ID<tXmim-7Xs-23@gated-at.bofh.it>
In reply to#1676702
On 28 June 2017 at 17:19, Shuah Khan <shuah@kernel.org> wrote:
> On 06/28/2017 05:19 AM, Fathi Boudra wrote:
>> reuseport_bpf_numa fails to build with undefined reference:
>>
>>  aarch64-linaro-linux-gcc
>>  --sysroot=/build/tmp-rpb-glibc/sysroots/hikey -Wall
>>  -Wl,--no-as-needed -O2 -g -I../../../../usr/include/  -Wl,-O1
>>  -Wl,--hash-style=gnu -Wl,--as-needed -lnuma  reuseport_bpf_numa.c
>>  -o
>>  /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa
>>  /tmp/ccfUuExT.o: In function `send_from_node':
>>  /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:138:
>>  undefined reference to `numa_run_on_node'
>>  /tmp/ccfUuExT.o: In function `main':
>>  /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:230:
>>  undefined reference to `numa_available'
>>  /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:233:
>>  undefined reference to `numa_max_node'
>>
>> Use LDLIBS instead of LDFLAGS to properly link against libnuma.
>>
>> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
>
> Did you try this on linux-ksefltest next? It has the fix for this.

yes, I tried linux-ksefltest next and can reproduce.

> thanks,
> -- Shuah
>> ---
>>  tools/testing/selftests/net/Makefile | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
>> index 35cbb4cba410..17c732a19c4c 100644
>> --- a/tools/testing/selftests/net/Makefile
>> +++ b/tools/testing/selftests/net/Makefile
>> @@ -3,7 +3,7 @@
>>  CFLAGS =  -Wall -Wl,--no-as-needed -O2 -g
>>  CFLAGS += -I../../../../usr/include/
>>
>> -reuseport_bpf_numa: LDFLAGS += -lnuma
>> +reuseport_bpf_numa: LDLIBS += -lnuma
>>
>>  TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh
>>  TEST_GEN_FILES =  socket

[toc] | [prev] | [next] | [standalone]


#1676816 — Re: [PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link against libnuma

FromShuah Khan <shuah@kernel.org>
Date2017-06-28 17:20 +0200
SubjectRe: [PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link against libnuma
Message-ID<tXmV5-8uj-45@gated-at.bofh.it>
In reply to#1676728
On 06/28/2017 08:36 AM, Fathi Boudra wrote:
> On 28 June 2017 at 17:19, Shuah Khan <shuah@kernel.org> wrote:
>> On 06/28/2017 05:19 AM, Fathi Boudra wrote:
>>> reuseport_bpf_numa fails to build with undefined reference:
>>>
>>>  aarch64-linaro-linux-gcc
>>>  --sysroot=/build/tmp-rpb-glibc/sysroots/hikey -Wall
>>>  -Wl,--no-as-needed -O2 -g -I../../../../usr/include/  -Wl,-O1
>>>  -Wl,--hash-style=gnu -Wl,--as-needed -lnuma  reuseport_bpf_numa.c
>>>  -o
>>>  /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa
>>>  /tmp/ccfUuExT.o: In function `send_from_node':
>>>  /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:138:
>>>  undefined reference to `numa_run_on_node'
>>>  /tmp/ccfUuExT.o: In function `main':
>>>  /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:230:
>>>  undefined reference to `numa_available'
>>>  /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:233:
>>>  undefined reference to `numa_max_node'
>>>
>>> Use LDLIBS instead of LDFLAGS to properly link against libnuma.
>>>
>>> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
>>
>> Did you try this on linux-ksefltest next? It has the fix for this.
> 
> yes, I tried linux-ksefltest next and can reproduce.

My question is whether this fix is on top of linux-kselftest next.

> 
>> thanks,
>> -- Shuah
>>> ---
>>>  tools/testing/selftests/net/Makefile | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
>>> index 35cbb4cba410..17c732a19c4c 100644
>>> --- a/tools/testing/selftests/net/Makefile
>>> +++ b/tools/testing/selftests/net/Makefile
>>> @@ -3,7 +3,7 @@
>>>  CFLAGS =  -Wall -Wl,--no-as-needed -O2 -g
>>>  CFLAGS += -I../../../../usr/include/
>>>
>>> -reuseport_bpf_numa: LDFLAGS += -lnuma
>>> +reuseport_bpf_numa: LDLIBS += -lnum
>>>
>>>  TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh
>>>  TEST_GEN_FILES =  socket
> 
Please redo the patch on top of 

SeongJae Park's fix

selftest/net/Makefile: Specify output with $(OUTPUT)

btw - with the the above fix, I don't see any failures on x86_64.
I am curious why it fails in cross-build? Could you figure out if
your cross-build environment is good.

thanks,
-- Shuah

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web