All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] get_mempolicy failing to compile
@ 2016-01-20 13:22 $rik
  2016-01-21  7:36 ` Jan Stancek
  0 siblings, 1 reply; 14+ messages in thread
From: $rik @ 2016-01-20 13:22 UTC (permalink / raw)
  To: ltp

Hi All,

I am trying to compile latest snapshot from github [1] and getting below errors.

arm-linux-gnueabihf-gcc -static -g -O2 -fno-strict-aliasing -pipe
-Wall -W -Wold-style-definition
-I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
-I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils
 -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
-I../../../../include -I../../../../include -static -pthread
-L/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/lib
-L../../../../lib  get_mempolicy01.c   -lltp  -lkerntest -lltp -o
get_mempolicy01
In file included from get_mempolicy01.c:63:0:
/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:
In function ?sigterm_handler?:
/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:111:33:
warning: unused parameter ?sig? [-Wunused-parameter]
 static void sigterm_handler(int sig)
                                 ^
get_mempolicy01.c: In function ?main?:
get_mempolicy01.c:197:14: warning: unused parameter ?argc? [-Wunused-parameter]
 int main(int argc, char **argv)
              ^
get_mempolicy01.c:197:27: warning: unused parameter ?argv? [-Wunused-parameter]
 int main(int argc, char **argv)
                           ^
/tmp/cciaYvm7.o: In function `setup_uid':
/home/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:64:
warning: Using 'getpwnam' in statically linked applications requires
at runtime the shared libraries from the glibc version used for
linking
/tmp/cciaYvm7.o: In function `main':
get_mempolicy01.c:(.text.startup+0x9c): undefined reference to
`numa_allocate_nodemask'
get_mempolicy01.c:(.text.startup+0xa2): undefined reference to
`numa_allocate_nodemask'
get_mempolicy01.c:(.text.startup+0xc2): undefined reference to
`numa_bitmask_setbit'
get_mempolicy01.c:(.text.startup+0x2ce): undefined reference to
`numa_bitmask_clearall'
get_mempolicy01.c:(.text.startup+0x2e8): undefined reference to
`numa_bitmask_equal'
/home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
In function `get_max_node':
/home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
reference to `numa_max_possible_node'
/home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
reference to `numa_max_possible_node'
/home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
In function `get_nodemask_allnodes':
/home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:71: undefined
reference to `nodemask_set'
/home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
In function `get_allowed_nodes_arr':
/home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:191: undefined
reference to `nodemask_isset'
/home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
In function `filter_nodemask_cpu':
/home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:126: undefined
reference to `nodemask_isset'
/home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:133: undefined
reference to `nodemask_clr'
/home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
In function `get_max_node':
/home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
reference to `numa_max_possible_node'
collect2: error: ld returned 1 exit status
make[4]: *** [get_mempolicy01] Error 1

Attached is my config log for reference.


[1] https://github.com/linux-test-project/ltp

-- 
Thanks & Regards,
M.Srikanth Kumar.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: application/octet-stream
Size: 335900 bytes
Desc: not available
URL: <http://lists.linux.it/pipermail/ltp/attachments/20160120/1aafdca6/attachment-0001.obj>

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

* [LTP] get_mempolicy failing to compile
  2016-01-20 13:22 [LTP] get_mempolicy failing to compile $rik
@ 2016-01-21  7:36 ` Jan Stancek
  2016-01-21 10:18   ` $rik
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Stancek @ 2016-01-21  7:36 UTC (permalink / raw)
  To: ltp





----- Original Message -----
> From: "$rik@nth" <srikanth007m@gmail.com>
> To: ltp@lists.linux.it
> Sent: Wednesday, 20 January, 2016 2:22:00 PM
> Subject: [LTP] get_mempolicy failing to compile
> 
> Hi All,
> 
> I am trying to compile latest snapshot from github [1] and getting below
> errors.
> 
> arm-linux-gnueabihf-gcc -static -g -O2 -fno-strict-aliasing -pipe
> -Wall -W -Wold-style-definition
> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils
>  -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
> -I../../../../include -I../../../../include -static -pthread
> -L/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/lib
> -L../../../../lib  get_mempolicy01.c   -lltp  -lkerntest -lltp -o
> get_mempolicy01
> In file included from get_mempolicy01.c:63:0:
> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:
> In function ?sigterm_handler?:
> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:111:33:
> warning: unused parameter ?sig? [-Wunused-parameter]
>  static void sigterm_handler(int sig)
>                                  ^
> get_mempolicy01.c: In function ?main?:
> get_mempolicy01.c:197:14: warning: unused parameter ?argc?
> [-Wunused-parameter]
>  int main(int argc, char **argv)
>               ^
> get_mempolicy01.c:197:27: warning: unused parameter ?argv?
> [-Wunused-parameter]
>  int main(int argc, char **argv)
>                            ^
> /tmp/cciaYvm7.o: In function `setup_uid':
> /home/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:64:
> warning: Using 'getpwnam' in statically linked applications requires
> at runtime the shared libraries from the glibc version used for
> linking
> /tmp/cciaYvm7.o: In function `main':
> get_mempolicy01.c:(.text.startup+0x9c): undefined reference to
> `numa_allocate_nodemask'
> get_mempolicy01.c:(.text.startup+0xa2): undefined reference to
> `numa_allocate_nodemask'
> get_mempolicy01.c:(.text.startup+0xc2): undefined reference to
> `numa_bitmask_setbit'
> get_mempolicy01.c:(.text.startup+0x2ce): undefined reference to
> `numa_bitmask_clearall'
> get_mempolicy01.c:(.text.startup+0x2e8): undefined reference to
> `numa_bitmask_equal'
> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> In function `get_max_node':
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> reference to `numa_max_possible_node'
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> reference to `numa_max_possible_node'
> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> In function `get_nodemask_allnodes':
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:71: undefined
> reference to `nodemask_set'
> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> In function `get_allowed_nodes_arr':
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:191: undefined
> reference to `nodemask_isset'
> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> In function `filter_nodemask_cpu':
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:126: undefined
> reference to `nodemask_isset'
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:133: undefined
> reference to `nodemask_clr'
> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> In function `get_max_node':
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> reference to `numa_max_possible_node'
> collect2: error: ld returned 1 exit status
> make[4]: *** [get_mempolicy01] Error 1
> 
> Attached is my config log for reference.

According to your log you have numa headers, but don't heave numa library
to link against.

#define HAVE_NUMA_H 1
#define HAVE_NUMAIF_H 1

NUMA_CPPFLAGS=''
NUMA_LIBS=''

Both should come from numactl devel package. To unblock compilation
you can edit include/config.h and set any numa related options to 0.
Then make clean && make should work.

Regards,
Jan

> 
> 
> [1] https://github.com/linux-test-project/ltp
> 
> --
> Thanks & Regards,
> M.Srikanth Kumar.
> 
> 
> --
> Mailing list info: http://lists.linux.it/listinfo/ltp
> 

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

* [LTP] get_mempolicy failing to compile
  2016-01-21  7:36 ` Jan Stancek
@ 2016-01-21 10:18   ` $rik
  2016-01-21 11:06     ` Jan Stancek
  0 siblings, 1 reply; 14+ messages in thread
From: $rik @ 2016-01-21 10:18 UTC (permalink / raw)
  To: ltp

libnuma-dev is already installed on my system. Any reason why still it
is failing to link with libraries?

On Thu, Jan 21, 2016 at 1:06 PM, Jan Stancek <jstancek@redhat.com> wrote:
>
>
>
>
> ----- Original Message -----
>> From: "$rik@nth" <srikanth007m@gmail.com>
>> To: ltp@lists.linux.it
>> Sent: Wednesday, 20 January, 2016 2:22:00 PM
>> Subject: [LTP] get_mempolicy failing to compile
>>
>> Hi All,
>>
>> I am trying to compile latest snapshot from github [1] and getting below
>> errors.
>>
>> arm-linux-gnueabihf-gcc -static -g -O2 -fno-strict-aliasing -pipe
>> -Wall -W -Wold-style-definition
>> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
>> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils
>>  -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
>> -I../../../../include -I../../../../include -static -pthread
>> -L/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/lib
>> -L../../../../lib  get_mempolicy01.c   -lltp  -lkerntest -lltp -o
>> get_mempolicy01
>> In file included from get_mempolicy01.c:63:0:
>> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:
>> In function ?sigterm_handler?:
>> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:111:33:
>> warning: unused parameter ?sig? [-Wunused-parameter]
>>  static void sigterm_handler(int sig)
>>                                  ^
>> get_mempolicy01.c: In function ?main?:
>> get_mempolicy01.c:197:14: warning: unused parameter ?argc?
>> [-Wunused-parameter]
>>  int main(int argc, char **argv)
>>               ^
>> get_mempolicy01.c:197:27: warning: unused parameter ?argv?
>> [-Wunused-parameter]
>>  int main(int argc, char **argv)
>>                            ^
>> /tmp/cciaYvm7.o: In function `setup_uid':
>> /home/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:64:
>> warning: Using 'getpwnam' in statically linked applications requires
>> at runtime the shared libraries from the glibc version used for
>> linking
>> /tmp/cciaYvm7.o: In function `main':
>> get_mempolicy01.c:(.text.startup+0x9c): undefined reference to
>> `numa_allocate_nodemask'
>> get_mempolicy01.c:(.text.startup+0xa2): undefined reference to
>> `numa_allocate_nodemask'
>> get_mempolicy01.c:(.text.startup+0xc2): undefined reference to
>> `numa_bitmask_setbit'
>> get_mempolicy01.c:(.text.startup+0x2ce): undefined reference to
>> `numa_bitmask_clearall'
>> get_mempolicy01.c:(.text.startup+0x2e8): undefined reference to
>> `numa_bitmask_equal'
>> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> In function `get_max_node':
>> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
>> reference to `numa_max_possible_node'
>> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
>> reference to `numa_max_possible_node'
>> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> In function `get_nodemask_allnodes':
>> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:71: undefined
>> reference to `nodemask_set'
>> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> In function `get_allowed_nodes_arr':
>> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:191: undefined
>> reference to `nodemask_isset'
>> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> In function `filter_nodemask_cpu':
>> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:126: undefined
>> reference to `nodemask_isset'
>> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:133: undefined
>> reference to `nodemask_clr'
>> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> In function `get_max_node':
>> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
>> reference to `numa_max_possible_node'
>> collect2: error: ld returned 1 exit status
>> make[4]: *** [get_mempolicy01] Error 1
>>
>> Attached is my config log for reference.
>
> According to your log you have numa headers, but don't heave numa library
> to link against.
>
> #define HAVE_NUMA_H 1
> #define HAVE_NUMAIF_H 1
>
> NUMA_CPPFLAGS=''
> NUMA_LIBS=''
>
> Both should come from numactl devel package. To unblock compilation
> you can edit include/config.h and set any numa related options to 0.
> Then make clean && make should work.
>
> Regards,
> Jan
>
>>
>>
>> [1] https://github.com/linux-test-project/ltp
>>
>> --
>> Thanks & Regards,
>> M.Srikanth Kumar.
>>
>>
>> --
>> Mailing list info: http://lists.linux.it/listinfo/ltp
>>



-- 
Thanks & Regards,
M.Srikanth Kumar.

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

* [LTP] get_mempolicy failing to compile
  2016-01-21 10:18   ` $rik
@ 2016-01-21 11:06     ` Jan Stancek
  2016-01-21 11:54       ` $rik
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Stancek @ 2016-01-21 11:06 UTC (permalink / raw)
  To: ltp





----- Original Message -----
> From: "$rik@nth" <srikanth007m@gmail.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp@lists.linux.it
> Sent: Thursday, 21 January, 2016 11:18:17 AM
> Subject: Re: [LTP] get_mempolicy failing to compile
> 
> libnuma-dev is already installed on my system. Any reason why still it
> is failing to link with libraries?

It looks like you are cross-compiling, do you have it installed
for target as well? (I'm assuming you're running on x86 and
cross compiling for arm)

Do you see the problem also if you compile for host (not cross-compile)?

> 
> On Thu, Jan 21, 2016 at 1:06 PM, Jan Stancek <jstancek@redhat.com> wrote:
> >
> >
> >
> >
> > ----- Original Message -----
> >> From: "$rik@nth" <srikanth007m@gmail.com>
> >> To: ltp@lists.linux.it
> >> Sent: Wednesday, 20 January, 2016 2:22:00 PM
> >> Subject: [LTP] get_mempolicy failing to compile
> >>
> >> Hi All,
> >>
> >> I am trying to compile latest snapshot from github [1] and getting below
> >> errors.
> >>
> >> arm-linux-gnueabihf-gcc -static -g -O2 -fno-strict-aliasing -pipe
> >> -Wall -W -Wold-style-definition
> >> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
> >> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils
> >>  -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
> >> -I../../../../include -I../../../../include -static -pthread
> >> -L/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/lib
> >> -L../../../../lib  get_mempolicy01.c   -lltp  -lkerntest -lltp -o
> >> get_mempolicy01
> >> In file included from get_mempolicy01.c:63:0:
> >> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:
> >> In function ?sigterm_handler?:
> >> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:111:33:
> >> warning: unused parameter ?sig? [-Wunused-parameter]
> >>  static void sigterm_handler(int sig)
> >>                                  ^
> >> get_mempolicy01.c: In function ?main?:
> >> get_mempolicy01.c:197:14: warning: unused parameter ?argc?
> >> [-Wunused-parameter]
> >>  int main(int argc, char **argv)
> >>               ^
> >> get_mempolicy01.c:197:27: warning: unused parameter ?argv?
> >> [-Wunused-parameter]
> >>  int main(int argc, char **argv)
> >>                            ^
> >> /tmp/cciaYvm7.o: In function `setup_uid':
> >> /home/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:64:
> >> warning: Using 'getpwnam' in statically linked applications requires
> >> at runtime the shared libraries from the glibc version used for
> >> linking
> >> /tmp/cciaYvm7.o: In function `main':
> >> get_mempolicy01.c:(.text.startup+0x9c): undefined reference to
> >> `numa_allocate_nodemask'
> >> get_mempolicy01.c:(.text.startup+0xa2): undefined reference to
> >> `numa_allocate_nodemask'
> >> get_mempolicy01.c:(.text.startup+0xc2): undefined reference to
> >> `numa_bitmask_setbit'
> >> get_mempolicy01.c:(.text.startup+0x2ce): undefined reference to
> >> `numa_bitmask_clearall'
> >> get_mempolicy01.c:(.text.startup+0x2e8): undefined reference to
> >> `numa_bitmask_equal'
> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> In function `get_max_node':
> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> >> reference to `numa_max_possible_node'
> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> >> reference to `numa_max_possible_node'
> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> In function `get_nodemask_allnodes':
> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:71: undefined
> >> reference to `nodemask_set'
> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> In function `get_allowed_nodes_arr':
> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:191: undefined
> >> reference to `nodemask_isset'
> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> In function `filter_nodemask_cpu':
> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:126: undefined
> >> reference to `nodemask_isset'
> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:133: undefined
> >> reference to `nodemask_clr'
> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> In function `get_max_node':
> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> >> reference to `numa_max_possible_node'
> >> collect2: error: ld returned 1 exit status
> >> make[4]: *** [get_mempolicy01] Error 1
> >>
> >> Attached is my config log for reference.
> >
> > According to your log you have numa headers, but don't heave numa library
> > to link against.
> >
> > #define HAVE_NUMA_H 1
> > #define HAVE_NUMAIF_H 1
> >
> > NUMA_CPPFLAGS=''
> > NUMA_LIBS=''
> >
> > Both should come from numactl devel package. To unblock compilation
> > you can edit include/config.h and set any numa related options to 0.
> > Then make clean && make should work.
> >
> > Regards,
> > Jan
> >
> >>
> >>
> >> [1] https://github.com/linux-test-project/ltp
> >>
> >> --
> >> Thanks & Regards,
> >> M.Srikanth Kumar.
> >>
> >>
> >> --
> >> Mailing list info: http://lists.linux.it/listinfo/ltp
> >>
> 
> 
> 
> --
> Thanks & Regards,
> M.Srikanth Kumar.
> 

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

* [LTP] get_mempolicy failing to compile
  2016-01-21 11:06     ` Jan Stancek
@ 2016-01-21 11:54       ` $rik
  2016-01-21 12:14         ` Jan Stancek
  0 siblings, 1 reply; 14+ messages in thread
From: $rik @ 2016-01-21 11:54 UTC (permalink / raw)
  To: ltp

My environment is ARM ubuntu and all my libs and packages are in AMR.

Yes still i am seeing the same issue even it is having arm libnuma-dev
packages and also numactl.

On Thu, Jan 21, 2016 at 4:36 PM, Jan Stancek <jstancek@redhat.com> wrote:
>
>
>
>
> ----- Original Message -----
>> From: "$rik@nth" <srikanth007m@gmail.com>
>> To: "Jan Stancek" <jstancek@redhat.com>
>> Cc: ltp@lists.linux.it
>> Sent: Thursday, 21 January, 2016 11:18:17 AM
>> Subject: Re: [LTP] get_mempolicy failing to compile
>>
>> libnuma-dev is already installed on my system. Any reason why still it
>> is failing to link with libraries?
>
> It looks like you are cross-compiling, do you have it installed
> for target as well? (I'm assuming you're running on x86 and
> cross compiling for arm)
>
> Do you see the problem also if you compile for host (not cross-compile)?
>
>>
>> On Thu, Jan 21, 2016 at 1:06 PM, Jan Stancek <jstancek@redhat.com> wrote:
>> >
>> >
>> >
>> >
>> > ----- Original Message -----
>> >> From: "$rik@nth" <srikanth007m@gmail.com>
>> >> To: ltp@lists.linux.it
>> >> Sent: Wednesday, 20 January, 2016 2:22:00 PM
>> >> Subject: [LTP] get_mempolicy failing to compile
>> >>
>> >> Hi All,
>> >>
>> >> I am trying to compile latest snapshot from github [1] and getting below
>> >> errors.
>> >>
>> >> arm-linux-gnueabihf-gcc -static -g -O2 -fno-strict-aliasing -pipe
>> >> -Wall -W -Wold-style-definition
>> >> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
>> >> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils
>> >>  -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
>> >> -I../../../../include -I../../../../include -static -pthread
>> >> -L/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/lib
>> >> -L../../../../lib  get_mempolicy01.c   -lltp  -lkerntest -lltp -o
>> >> get_mempolicy01
>> >> In file included from get_mempolicy01.c:63:0:
>> >> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:
>> >> In function ?sigterm_handler?:
>> >> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:111:33:
>> >> warning: unused parameter ?sig? [-Wunused-parameter]
>> >>  static void sigterm_handler(int sig)
>> >>                                  ^
>> >> get_mempolicy01.c: In function ?main?:
>> >> get_mempolicy01.c:197:14: warning: unused parameter ?argc?
>> >> [-Wunused-parameter]
>> >>  int main(int argc, char **argv)
>> >>               ^
>> >> get_mempolicy01.c:197:27: warning: unused parameter ?argv?
>> >> [-Wunused-parameter]
>> >>  int main(int argc, char **argv)
>> >>                            ^
>> >> /tmp/cciaYvm7.o: In function `setup_uid':
>> >> /home/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:64:
>> >> warning: Using 'getpwnam' in statically linked applications requires
>> >> at runtime the shared libraries from the glibc version used for
>> >> linking
>> >> /tmp/cciaYvm7.o: In function `main':
>> >> get_mempolicy01.c:(.text.startup+0x9c): undefined reference to
>> >> `numa_allocate_nodemask'
>> >> get_mempolicy01.c:(.text.startup+0xa2): undefined reference to
>> >> `numa_allocate_nodemask'
>> >> get_mempolicy01.c:(.text.startup+0xc2): undefined reference to
>> >> `numa_bitmask_setbit'
>> >> get_mempolicy01.c:(.text.startup+0x2ce): undefined reference to
>> >> `numa_bitmask_clearall'
>> >> get_mempolicy01.c:(.text.startup+0x2e8): undefined reference to
>> >> `numa_bitmask_equal'
>> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> >> In function `get_max_node':
>> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
>> >> reference to `numa_max_possible_node'
>> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
>> >> reference to `numa_max_possible_node'
>> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> >> In function `get_nodemask_allnodes':
>> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:71: undefined
>> >> reference to `nodemask_set'
>> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> >> In function `get_allowed_nodes_arr':
>> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:191: undefined
>> >> reference to `nodemask_isset'
>> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> >> In function `filter_nodemask_cpu':
>> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:126: undefined
>> >> reference to `nodemask_isset'
>> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:133: undefined
>> >> reference to `nodemask_clr'
>> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> >> In function `get_max_node':
>> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
>> >> reference to `numa_max_possible_node'
>> >> collect2: error: ld returned 1 exit status
>> >> make[4]: *** [get_mempolicy01] Error 1
>> >>
>> >> Attached is my config log for reference.
>> >
>> > According to your log you have numa headers, but don't heave numa library
>> > to link against.
>> >
>> > #define HAVE_NUMA_H 1
>> > #define HAVE_NUMAIF_H 1
>> >
>> > NUMA_CPPFLAGS=''
>> > NUMA_LIBS=''
>> >
>> > Both should come from numactl devel package. To unblock compilation
>> > you can edit include/config.h and set any numa related options to 0.
>> > Then make clean && make should work.
>> >
>> > Regards,
>> > Jan
>> >
>> >>
>> >>
>> >> [1] https://github.com/linux-test-project/ltp
>> >>
>> >> --
>> >> Thanks & Regards,
>> >> M.Srikanth Kumar.
>> >>
>> >>
>> >> --
>> >> Mailing list info: http://lists.linux.it/listinfo/ltp
>> >>
>>
>>
>>
>> --
>> Thanks & Regards,
>> M.Srikanth Kumar.
>>



-- 
Thanks & Regards,
M.Srikanth Kumar.

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

* [LTP] get_mempolicy failing to compile
  2016-01-21 11:54       ` $rik
@ 2016-01-21 12:14         ` Jan Stancek
  2016-01-21 12:42           ` $rik
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Stancek @ 2016-01-21 12:14 UTC (permalink / raw)
  To: ltp


----- Original Message -----
> From: "$rik@nth" <srikanth007m@gmail.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp@lists.linux.it
> Sent: Thursday, 21 January, 2016 12:54:35 PM
> Subject: Re: [LTP] get_mempolicy failing to compile
> 
> My environment is ARM ubuntu and all my libs and packages are in AMR.

I just noticed that config.log shows that -static is passed to gcc.
Can you run "dpkg -L libnuma-dev" to check you have static library
to link against?

Can you link against -lnuma outside of LTP build?

For example:

cat > numatest.c <<EOF
#include <stdio.h>
#include <numa.h>
int main(void)
{
        printf("%d\n", numa_max_possible_node());
        return 0;
}
EOF
gcc numatest.c -lnuma


> 
> Yes still i am seeing the same issue even it is having arm libnuma-dev
> packages and also numactl.
> 
> On Thu, Jan 21, 2016 at 4:36 PM, Jan Stancek <jstancek@redhat.com> wrote:
> >
> >
> >
> >
> > ----- Original Message -----
> >> From: "$rik@nth" <srikanth007m@gmail.com>
> >> To: "Jan Stancek" <jstancek@redhat.com>
> >> Cc: ltp@lists.linux.it
> >> Sent: Thursday, 21 January, 2016 11:18:17 AM
> >> Subject: Re: [LTP] get_mempolicy failing to compile
> >>
> >> libnuma-dev is already installed on my system. Any reason why still it
> >> is failing to link with libraries?
> >
> > It looks like you are cross-compiling, do you have it installed
> > for target as well? (I'm assuming you're running on x86 and
> > cross compiling for arm)
> >
> > Do you see the problem also if you compile for host (not cross-compile)?
> >
> >>
> >> On Thu, Jan 21, 2016 at 1:06 PM, Jan Stancek <jstancek@redhat.com> wrote:
> >> >
> >> >
> >> >
> >> >
> >> > ----- Original Message -----
> >> >> From: "$rik@nth" <srikanth007m@gmail.com>
> >> >> To: ltp@lists.linux.it
> >> >> Sent: Wednesday, 20 January, 2016 2:22:00 PM
> >> >> Subject: [LTP] get_mempolicy failing to compile
> >> >>
> >> >> Hi All,
> >> >>
> >> >> I am trying to compile latest snapshot from github [1] and getting
> >> >> below
> >> >> errors.
> >> >>
> >> >> arm-linux-gnueabihf-gcc -static -g -O2 -fno-strict-aliasing -pipe
> >> >> -Wall -W -Wold-style-definition
> >> >> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
> >> >> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils
> >> >>  -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
> >> >> -I../../../../include -I../../../../include -static -pthread
> >> >> -L/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/lib
> >> >> -L../../../../lib  get_mempolicy01.c   -lltp  -lkerntest -lltp -o
> >> >> get_mempolicy01
> >> >> In file included from get_mempolicy01.c:63:0:
> >> >> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:
> >> >> In function ?sigterm_handler?:
> >> >> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:111:33:
> >> >> warning: unused parameter ?sig? [-Wunused-parameter]
> >> >>  static void sigterm_handler(int sig)
> >> >>                                  ^
> >> >> get_mempolicy01.c: In function ?main?:
> >> >> get_mempolicy01.c:197:14: warning: unused parameter ?argc?
> >> >> [-Wunused-parameter]
> >> >>  int main(int argc, char **argv)
> >> >>               ^
> >> >> get_mempolicy01.c:197:27: warning: unused parameter ?argv?
> >> >> [-Wunused-parameter]
> >> >>  int main(int argc, char **argv)
> >> >>                            ^
> >> >> /tmp/cciaYvm7.o: In function `setup_uid':
> >> >> /home/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:64:
> >> >> warning: Using 'getpwnam' in statically linked applications requires
> >> >> at runtime the shared libraries from the glibc version used for
> >> >> linking
> >> >> /tmp/cciaYvm7.o: In function `main':
> >> >> get_mempolicy01.c:(.text.startup+0x9c): undefined reference to
> >> >> `numa_allocate_nodemask'
> >> >> get_mempolicy01.c:(.text.startup+0xa2): undefined reference to
> >> >> `numa_allocate_nodemask'
> >> >> get_mempolicy01.c:(.text.startup+0xc2): undefined reference to
> >> >> `numa_bitmask_setbit'
> >> >> get_mempolicy01.c:(.text.startup+0x2ce): undefined reference to
> >> >> `numa_bitmask_clearall'
> >> >> get_mempolicy01.c:(.text.startup+0x2e8): undefined reference to
> >> >> `numa_bitmask_equal'
> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> >> In function `get_max_node':
> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> >> >> reference to `numa_max_possible_node'
> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> >> >> reference to `numa_max_possible_node'
> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> >> In function `get_nodemask_allnodes':
> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:71: undefined
> >> >> reference to `nodemask_set'
> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> >> In function `get_allowed_nodes_arr':
> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:191: undefined
> >> >> reference to `nodemask_isset'
> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> >> In function `filter_nodemask_cpu':
> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:126: undefined
> >> >> reference to `nodemask_isset'
> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:133: undefined
> >> >> reference to `nodemask_clr'
> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> >> In function `get_max_node':
> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> >> >> reference to `numa_max_possible_node'
> >> >> collect2: error: ld returned 1 exit status
> >> >> make[4]: *** [get_mempolicy01] Error 1
> >> >>
> >> >> Attached is my config log for reference.
> >> >
> >> > According to your log you have numa headers, but don't heave numa
> >> > library
> >> > to link against.
> >> >
> >> > #define HAVE_NUMA_H 1
> >> > #define HAVE_NUMAIF_H 1
> >> >
> >> > NUMA_CPPFLAGS=''
> >> > NUMA_LIBS=''
> >> >
> >> > Both should come from numactl devel package. To unblock compilation
> >> > you can edit include/config.h and set any numa related options to 0.
> >> > Then make clean && make should work.
> >> >
> >> > Regards,
> >> > Jan
> >> >
> >> >>
> >> >>
> >> >> [1] https://github.com/linux-test-project/ltp
> >> >>
> >> >> --
> >> >> Thanks & Regards,
> >> >> M.Srikanth Kumar.
> >> >>
> >> >>
> >> >> --
> >> >> Mailing list info: http://lists.linux.it/listinfo/ltp
> >> >>
> >>
> >>
> >>
> >> --
> >> Thanks & Regards,
> >> M.Srikanth Kumar.
> >>
> 
> 
> 
> --
> Thanks & Regards,
> M.Srikanth Kumar.
> 

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

* [LTP] get_mempolicy failing to compile
  2016-01-21 12:14         ` Jan Stancek
@ 2016-01-21 12:42           ` $rik
  2016-01-21 12:46             ` Jan Stancek
  0 siblings, 1 reply; 14+ messages in thread
From: $rik @ 2016-01-21 12:42 UTC (permalink / raw)
  To: ltp

Yes it able to compile without any issues.

linaro@linaro-alip:~/Srikanth$ cat > numatest.c <<EOF
> #include <stdio.h>
> #include <numa.h>
> int main(void)
> {
>         printf("%d\n", numa_max_possible_node());
>         return 0;
> }
> EOF
linaro@linaro-alip:~/Srikanth$ gcc numatest.c -lnuma
linaro@linaro-alip:~/Srikanth$ ls -l
total 20
-rwxr-xr-x  1 linaro linaro 7920 Jan 21 12:26 a.out
-rw-r--r--  1 linaro linaro  124 Jan 21 12:26 numatest.c


On 1/21/16, Jan Stancek <jstancek@redhat.com> wrote:
>
> ----- Original Message -----
>> From: "$rik@nth" <srikanth007m@gmail.com>
>> To: "Jan Stancek" <jstancek@redhat.com>
>> Cc: ltp@lists.linux.it
>> Sent: Thursday, 21 January, 2016 12:54:35 PM
>> Subject: Re: [LTP] get_mempolicy failing to compile
>>
>> My environment is ARM ubuntu and all my libs and packages are in AMR.
>
> I just noticed that config.log shows that -static is passed to gcc.
> Can you run "dpkg -L libnuma-dev" to check you have static library
> to link against?
>
> Can you link against -lnuma outside of LTP build?
>
> For example:
>
> cat > numatest.c <<EOF
> #include <stdio.h>
> #include <numa.h>
> int main(void)
> {
>         printf("%d\n", numa_max_possible_node());
>         return 0;
> }
> EOF
> gcc numatest.c -lnuma
>
>
>>
>> Yes still i am seeing the same issue even it is having arm libnuma-dev
>> packages and also numactl.
>>
>> On Thu, Jan 21, 2016 at 4:36 PM, Jan Stancek <jstancek@redhat.com> wrote:
>> >
>> >
>> >
>> >
>> > ----- Original Message -----
>> >> From: "$rik@nth" <srikanth007m@gmail.com>
>> >> To: "Jan Stancek" <jstancek@redhat.com>
>> >> Cc: ltp@lists.linux.it
>> >> Sent: Thursday, 21 January, 2016 11:18:17 AM
>> >> Subject: Re: [LTP] get_mempolicy failing to compile
>> >>
>> >> libnuma-dev is already installed on my system. Any reason why still it
>> >> is failing to link with libraries?
>> >
>> > It looks like you are cross-compiling, do you have it installed
>> > for target as well? (I'm assuming you're running on x86 and
>> > cross compiling for arm)
>> >
>> > Do you see the problem also if you compile for host (not
>> > cross-compile)?
>> >
>> >>
>> >> On Thu, Jan 21, 2016 at 1:06 PM, Jan Stancek <jstancek@redhat.com>
>> >> wrote:
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > ----- Original Message -----
>> >> >> From: "$rik@nth" <srikanth007m@gmail.com>
>> >> >> To: ltp@lists.linux.it
>> >> >> Sent: Wednesday, 20 January, 2016 2:22:00 PM
>> >> >> Subject: [LTP] get_mempolicy failing to compile
>> >> >>
>> >> >> Hi All,
>> >> >>
>> >> >> I am trying to compile latest snapshot from github [1] and getting
>> >> >> below
>> >> >> errors.
>> >> >>
>> >> >> arm-linux-gnueabihf-gcc -static -g -O2 -fno-strict-aliasing -pipe
>> >> >> -Wall -W -Wold-style-definition
>> >> >> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
>> >> >> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils
>> >> >>  -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
>> >> >> -I../../../../include -I../../../../include -static -pthread
>> >> >> -L/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/lib
>> >> >> -L../../../../lib  get_mempolicy01.c   -lltp  -lkerntest -lltp -o
>> >> >> get_mempolicy01
>> >> >> In file included from get_mempolicy01.c:63:0:
>> >> >> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:
>> >> >> In function ?sigterm_handler?:
>> >> >> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:111:33:
>> >> >> warning: unused parameter ?sig? [-Wunused-parameter]
>> >> >>  static void sigterm_handler(int sig)
>> >> >>                                  ^
>> >> >> get_mempolicy01.c: In function ?main?:
>> >> >> get_mempolicy01.c:197:14: warning: unused parameter ?argc?
>> >> >> [-Wunused-parameter]
>> >> >>  int main(int argc, char **argv)
>> >> >>               ^
>> >> >> get_mempolicy01.c:197:27: warning: unused parameter ?argv?
>> >> >> [-Wunused-parameter]
>> >> >>  int main(int argc, char **argv)
>> >> >>                            ^
>> >> >> /tmp/cciaYvm7.o: In function `setup_uid':
>> >> >> /home/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:64:
>> >> >> warning: Using 'getpwnam' in statically linked applications
>> >> >> requires
>> >> >> at runtime the shared libraries from the glibc version used for
>> >> >> linking
>> >> >> /tmp/cciaYvm7.o: In function `main':
>> >> >> get_mempolicy01.c:(.text.startup+0x9c): undefined reference to
>> >> >> `numa_allocate_nodemask'
>> >> >> get_mempolicy01.c:(.text.startup+0xa2): undefined reference to
>> >> >> `numa_allocate_nodemask'
>> >> >> get_mempolicy01.c:(.text.startup+0xc2): undefined reference to
>> >> >> `numa_bitmask_setbit'
>> >> >> get_mempolicy01.c:(.text.startup+0x2ce): undefined reference to
>> >> >> `numa_bitmask_clearall'
>> >> >> get_mempolicy01.c:(.text.startup+0x2e8): undefined reference to
>> >> >> `numa_bitmask_equal'
>> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> >> >> In function `get_max_node':
>> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
>> >> >> reference to `numa_max_possible_node'
>> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
>> >> >> reference to `numa_max_possible_node'
>> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> >> >> In function `get_nodemask_allnodes':
>> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:71: undefined
>> >> >> reference to `nodemask_set'
>> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> >> >> In function `get_allowed_nodes_arr':
>> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:191:
>> >> >> undefined
>> >> >> reference to `nodemask_isset'
>> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> >> >> In function `filter_nodemask_cpu':
>> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:126:
>> >> >> undefined
>> >> >> reference to `nodemask_isset'
>> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:133:
>> >> >> undefined
>> >> >> reference to `nodemask_clr'
>> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
>> >> >> In function `get_max_node':
>> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
>> >> >> reference to `numa_max_possible_node'
>> >> >> collect2: error: ld returned 1 exit status
>> >> >> make[4]: *** [get_mempolicy01] Error 1
>> >> >>
>> >> >> Attached is my config log for reference.
>> >> >
>> >> > According to your log you have numa headers, but don't heave numa
>> >> > library
>> >> > to link against.
>> >> >
>> >> > #define HAVE_NUMA_H 1
>> >> > #define HAVE_NUMAIF_H 1
>> >> >
>> >> > NUMA_CPPFLAGS=''
>> >> > NUMA_LIBS=''
>> >> >
>> >> > Both should come from numactl devel package. To unblock compilation
>> >> > you can edit include/config.h and set any numa related options to 0.
>> >> > Then make clean && make should work.
>> >> >
>> >> > Regards,
>> >> > Jan
>> >> >
>> >> >>
>> >> >>
>> >> >> [1] https://github.com/linux-test-project/ltp
>> >> >>
>> >> >> --
>> >> >> Thanks & Regards,
>> >> >> M.Srikanth Kumar.
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Mailing list info: http://lists.linux.it/listinfo/ltp
>> >> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Thanks & Regards,
>> >> M.Srikanth Kumar.
>> >>
>>
>>
>>
>> --
>> Thanks & Regards,
>> M.Srikanth Kumar.
>>
>


-- 
Thanks & Regards,
M.Srikanth Kumar.

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

* [LTP] get_mempolicy failing to compile
  2016-01-21 12:42           ` $rik
@ 2016-01-21 12:46             ` Jan Stancek
       [not found]               ` <CANKSX+E608-qFt=-_vneFeBL+BH3zjZGsJXyjJ74rv3k507UYw@mail.gmail.com>
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Stancek @ 2016-01-21 12:46 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> From: "$rik@nth" <srikanth007m@gmail.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp@lists.linux.it
> Sent: Thursday, 21 January, 2016 1:42:18 PM
> Subject: Re: [LTP] get_mempolicy failing to compile
> 
> Yes it able to compile without any issues.
> 
> linaro@linaro-alip:~/Srikanth$ cat > numatest.c <<EOF
> > #include <stdio.h>
> > #include <numa.h>
> > int main(void)
> > {
> >         printf("%d\n", numa_max_possible_node());
> >         return 0;
> > }
> > EOF
> linaro@linaro-alip:~/Srikanth$ gcc numatest.c -lnuma
> linaro@linaro-alip:~/Srikanth$ ls -l
> total 20
> -rwxr-xr-x  1 linaro linaro 7920 Jan 21 12:26 a.out
> -rw-r--r--  1 linaro linaro  124 Jan 21 12:26 numatest.c

And if you add -static can it still compile?

> 
> 
> On 1/21/16, Jan Stancek <jstancek@redhat.com> wrote:
> >
> > ----- Original Message -----
> >> From: "$rik@nth" <srikanth007m@gmail.com>
> >> To: "Jan Stancek" <jstancek@redhat.com>
> >> Cc: ltp@lists.linux.it
> >> Sent: Thursday, 21 January, 2016 12:54:35 PM
> >> Subject: Re: [LTP] get_mempolicy failing to compile
> >>
> >> My environment is ARM ubuntu and all my libs and packages are in AMR.
> >
> > I just noticed that config.log shows that -static is passed to gcc.
> > Can you run "dpkg -L libnuma-dev" to check you have static library
> > to link against?
> >
> > Can you link against -lnuma outside of LTP build?
> >
> > For example:
> >
> > cat > numatest.c <<EOF
> > #include <stdio.h>
> > #include <numa.h>
> > int main(void)
> > {
> >         printf("%d\n", numa_max_possible_node());
> >         return 0;
> > }
> > EOF
> > gcc numatest.c -lnuma
> >
> >
> >>
> >> Yes still i am seeing the same issue even it is having arm libnuma-dev
> >> packages and also numactl.
> >>
> >> On Thu, Jan 21, 2016 at 4:36 PM, Jan Stancek <jstancek@redhat.com> wrote:
> >> >
> >> >
> >> >
> >> >
> >> > ----- Original Message -----
> >> >> From: "$rik@nth" <srikanth007m@gmail.com>
> >> >> To: "Jan Stancek" <jstancek@redhat.com>
> >> >> Cc: ltp@lists.linux.it
> >> >> Sent: Thursday, 21 January, 2016 11:18:17 AM
> >> >> Subject: Re: [LTP] get_mempolicy failing to compile
> >> >>
> >> >> libnuma-dev is already installed on my system. Any reason why still it
> >> >> is failing to link with libraries?
> >> >
> >> > It looks like you are cross-compiling, do you have it installed
> >> > for target as well? (I'm assuming you're running on x86 and
> >> > cross compiling for arm)
> >> >
> >> > Do you see the problem also if you compile for host (not
> >> > cross-compile)?
> >> >
> >> >>
> >> >> On Thu, Jan 21, 2016 at 1:06 PM, Jan Stancek <jstancek@redhat.com>
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > ----- Original Message -----
> >> >> >> From: "$rik@nth" <srikanth007m@gmail.com>
> >> >> >> To: ltp@lists.linux.it
> >> >> >> Sent: Wednesday, 20 January, 2016 2:22:00 PM
> >> >> >> Subject: [LTP] get_mempolicy failing to compile
> >> >> >>
> >> >> >> Hi All,
> >> >> >>
> >> >> >> I am trying to compile latest snapshot from github [1] and getting
> >> >> >> below
> >> >> >> errors.
> >> >> >>
> >> >> >> arm-linux-gnueabihf-gcc -static -g -O2 -fno-strict-aliasing -pipe
> >> >> >> -Wall -W -Wold-style-definition
> >> >> >> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
> >> >> >> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils
> >> >> >>  -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
> >> >> >> -I../../../../include -I../../../../include -static -pthread
> >> >> >> -L/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/lib
> >> >> >> -L../../../../lib  get_mempolicy01.c   -lltp  -lkerntest -lltp -o
> >> >> >> get_mempolicy01
> >> >> >> In file included from get_mempolicy01.c:63:0:
> >> >> >> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:
> >> >> >> In function ?sigterm_handler?:
> >> >> >> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:111:33:
> >> >> >> warning: unused parameter ?sig? [-Wunused-parameter]
> >> >> >>  static void sigterm_handler(int sig)
> >> >> >>                                  ^
> >> >> >> get_mempolicy01.c: In function ?main?:
> >> >> >> get_mempolicy01.c:197:14: warning: unused parameter ?argc?
> >> >> >> [-Wunused-parameter]
> >> >> >>  int main(int argc, char **argv)
> >> >> >>               ^
> >> >> >> get_mempolicy01.c:197:27: warning: unused parameter ?argv?
> >> >> >> [-Wunused-parameter]
> >> >> >>  int main(int argc, char **argv)
> >> >> >>                            ^
> >> >> >> /tmp/cciaYvm7.o: In function `setup_uid':
> >> >> >> /home/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:64:
> >> >> >> warning: Using 'getpwnam' in statically linked applications
> >> >> >> requires
> >> >> >> at runtime the shared libraries from the glibc version used for
> >> >> >> linking
> >> >> >> /tmp/cciaYvm7.o: In function `main':
> >> >> >> get_mempolicy01.c:(.text.startup+0x9c): undefined reference to
> >> >> >> `numa_allocate_nodemask'
> >> >> >> get_mempolicy01.c:(.text.startup+0xa2): undefined reference to
> >> >> >> `numa_allocate_nodemask'
> >> >> >> get_mempolicy01.c:(.text.startup+0xc2): undefined reference to
> >> >> >> `numa_bitmask_setbit'
> >> >> >> get_mempolicy01.c:(.text.startup+0x2ce): undefined reference to
> >> >> >> `numa_bitmask_clearall'
> >> >> >> get_mempolicy01.c:(.text.startup+0x2e8): undefined reference to
> >> >> >> `numa_bitmask_equal'
> >> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> >> >> In function `get_max_node':
> >> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> >> >> >> reference to `numa_max_possible_node'
> >> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> >> >> >> reference to `numa_max_possible_node'
> >> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> >> >> In function `get_nodemask_allnodes':
> >> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:71: undefined
> >> >> >> reference to `nodemask_set'
> >> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> >> >> In function `get_allowed_nodes_arr':
> >> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:191:
> >> >> >> undefined
> >> >> >> reference to `nodemask_isset'
> >> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> >> >> In function `filter_nodemask_cpu':
> >> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:126:
> >> >> >> undefined
> >> >> >> reference to `nodemask_isset'
> >> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:133:
> >> >> >> undefined
> >> >> >> reference to `nodemask_clr'
> >> >> >> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> >> >> >> In function `get_max_node':
> >> >> >> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> >> >> >> reference to `numa_max_possible_node'
> >> >> >> collect2: error: ld returned 1 exit status
> >> >> >> make[4]: *** [get_mempolicy01] Error 1
> >> >> >>
> >> >> >> Attached is my config log for reference.
> >> >> >
> >> >> > According to your log you have numa headers, but don't heave numa
> >> >> > library
> >> >> > to link against.
> >> >> >
> >> >> > #define HAVE_NUMA_H 1
> >> >> > #define HAVE_NUMAIF_H 1
> >> >> >
> >> >> > NUMA_CPPFLAGS=''
> >> >> > NUMA_LIBS=''
> >> >> >
> >> >> > Both should come from numactl devel package. To unblock compilation
> >> >> > you can edit include/config.h and set any numa related options to 0.
> >> >> > Then make clean && make should work.
> >> >> >
> >> >> > Regards,
> >> >> > Jan
> >> >> >
> >> >> >>
> >> >> >>
> >> >> >> [1] https://github.com/linux-test-project/ltp
> >> >> >>
> >> >> >> --
> >> >> >> Thanks & Regards,
> >> >> >> M.Srikanth Kumar.
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Mailing list info: http://lists.linux.it/listinfo/ltp
> >> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Thanks & Regards,
> >> >> M.Srikanth Kumar.
> >> >>
> >>
> >>
> >>
> >> --
> >> Thanks & Regards,
> >> M.Srikanth Kumar.
> >>
> >
> 
> 
> --
> Thanks & Regards,
> M.Srikanth Kumar.
> 

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

* [LTP] get_mempolicy failing to compile
       [not found]               ` <CANKSX+E608-qFt=-_vneFeBL+BH3zjZGsJXyjJ74rv3k507UYw@mail.gmail.com>
@ 2016-01-22  8:30                 ` Jan Stancek
  2016-01-22 12:10                   ` $rik
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Stancek @ 2016-01-22  8:30 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> From: "$rik@nth" <srikanth007m@gmail.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Sent: Friday, 22 January, 2016 5:25:54 AM
> Subject: Re: [LTP] get_mempolicy failing to compile
> 
> My environment is ARM ubuntu and all my libs and packages are in AMR.

config.log you gave us is from x86_64 system named "hyd-lnxbld84".

> Yes able to compile the source  static as well
> linaro@linaro-alip:~/Srikanth$ gcc -static numatest.c -lnuma

This is a different system, isn't it?

What I meant was "hyd-lnxbld84" system and gcc you use to
compile LTP:
  arm-linux-gnueabihf-gcc -static numatest.c -lnuma

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

* [LTP] get_mempolicy failing to compile
  2016-01-22  8:30                 ` Jan Stancek
@ 2016-01-22 12:10                   ` $rik
  2016-01-27  8:39                     ` $rik
  0 siblings, 1 reply; 14+ messages in thread
From: $rik @ 2016-01-22 12:10 UTC (permalink / raw)
  To: ltp

I did an softlink to arm-linux gcc after my initial mail.. So on
latest one you will be not seeing.

I will try on another development board. This is my 3rd board having problem :(

On Fri, Jan 22, 2016 at 2:00 PM, Jan Stancek <jstancek@redhat.com> wrote:
>
>
> ----- Original Message -----
>> From: "$rik@nth" <srikanth007m@gmail.com>
>> To: "Jan Stancek" <jstancek@redhat.com>
>> Sent: Friday, 22 January, 2016 5:25:54 AM
>> Subject: Re: [LTP] get_mempolicy failing to compile
>>
>> My environment is ARM ubuntu and all my libs and packages are in AMR.
>
> config.log you gave us is from x86_64 system named "hyd-lnxbld84".
>
>> Yes able to compile the source  static as well
>> linaro@linaro-alip:~/Srikanth$ gcc -static numatest.c -lnuma
>
> This is a different system, isn't it?
>
> What I meant was "hyd-lnxbld84" system and gcc you use to
> compile LTP:
>   arm-linux-gnueabihf-gcc -static numatest.c -lnuma



-- 
Thanks & Regards,
M.Srikanth Kumar.

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

* [LTP] get_mempolicy failing to compile
  2016-01-22 12:10                   ` $rik
@ 2016-01-27  8:39                     ` $rik
  2016-01-27 15:33                       ` Jan Stancek
  0 siblings, 1 reply; 14+ messages in thread
From: $rik @ 2016-01-27  8:39 UTC (permalink / raw)
  To: ltp

Now it is failing here.. on the same setup i am able to compile the
sample numa program statically.

make[4]: Leaving directory '/home/linaro/Srikanth/ltp/testcases/kernel/include'
gcc -static -g -O2 -fno-strict-aliasing -pipe -Wall -W
-Wold-style-definition
-I/home/linaro/Srikanth/ltp/testcases/kernel/include -D_GNU_SOURCE
-DNUMA_VERSION1_COMPATIBILITY -I../../../include -I../../../include
-static -pthread  -L../../../lib  numa_node_size.c   -lltp -lnuma -o
numa_node_size
numa_node_size.c: In function ?fmt_mem?:
numa_node_size.c:44:10: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
  if (mem == -1L)
          ^
/usr/lib/gcc/aarch64-linux-gnu/4.9/../../../aarch64-linux-gnu/libnuma.a(libnuma.o):(.bss+0x38):
multiple definition of `numa_exit_on_error'
/tmp/ccRABETR.o:(.bss+0x0): first defined here
/usr/lib/gcc/aarch64-linux-gnu/4.9/../../../aarch64-linux-gnu/libnuma.a(affinity.o):
In function `affinity_ip':
(.text+0x6dc): warning: Using 'getaddrinfo' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'numa_node_size' failed
make[3]: *** [numa_node_size] Error 1
make[3]: Leaving directory '/home/linaro/Srikanth/ltp/testcases/kernel/numa'
../../include/mk/generic_trunk_target.inc:93: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/linaro/Srikanth/ltp/testcases/kernel'
../include/mk/generic_trunk_target.inc:93: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/linaro/Srikanth/ltp/testcases'
Makefile:114: recipe for target 'testcases-all' failed
make: *** [testcases-all] Error 2

On Fri, Jan 22, 2016 at 12:10 PM, $rik@nth <srikanth007m@gmail.com> wrote:
> I did an softlink to arm-linux gcc after my initial mail.. So on
> latest one you will be not seeing.
>
> I will try on another development board. This is my 3rd board having problem :(
>
> On Fri, Jan 22, 2016 at 2:00 PM, Jan Stancek <jstancek@redhat.com> wrote:
>>
>>
>> ----- Original Message -----
>>> From: "$rik@nth" <srikanth007m@gmail.com>
>>> To: "Jan Stancek" <jstancek@redhat.com>
>>> Sent: Friday, 22 January, 2016 5:25:54 AM
>>> Subject: Re: [LTP] get_mempolicy failing to compile
>>>
>>> My environment is ARM ubuntu and all my libs and packages are in AMR.
>>
>> config.log you gave us is from x86_64 system named "hyd-lnxbld84".
>>
>>> Yes able to compile the source  static as well
>>> linaro@linaro-alip:~/Srikanth$ gcc -static numatest.c -lnuma
>>
>> This is a different system, isn't it?
>>
>> What I meant was "hyd-lnxbld84" system and gcc you use to
>> compile LTP:
>>   arm-linux-gnueabihf-gcc -static numatest.c -lnuma
>
>
>
> --
> Thanks & Regards,
> M.Srikanth Kumar.



-- 
Thanks & Regards,
M.Srikanth Kumar.

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

* [LTP] get_mempolicy failing to compile
  2016-01-27  8:39                     ` $rik
@ 2016-01-27 15:33                       ` Jan Stancek
  2016-01-28 11:27                         ` $rik
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Stancek @ 2016-01-27 15:33 UTC (permalink / raw)
  To: ltp





----- Original Message -----
> From: "$rik@nth" <srikanth007m@gmail.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp@lists.linux.it
> Sent: Wednesday, 27 January, 2016 9:39:26 AM
> Subject: Re: [LTP] get_mempolicy failing to compile
> 
> Now it is failing here.. on the same setup i am able to compile the
> sample numa program statically.
> 
> make[4]: Leaving directory
> '/home/linaro/Srikanth/ltp/testcases/kernel/include'
> gcc -static -g -O2 -fno-strict-aliasing -pipe -Wall -W
> -Wold-style-definition
> -I/home/linaro/Srikanth/ltp/testcases/kernel/include -D_GNU_SOURCE
> -DNUMA_VERSION1_COMPATIBILITY -I../../../include -I../../../include
> -static -pthread  -L../../../lib  numa_node_size.c   -lltp -lnuma -o
> numa_node_size
> numa_node_size.c: In function ?fmt_mem?:
> numa_node_size.c:44:10: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
>   if (mem == -1L)
>           ^
> /usr/lib/gcc/aarch64-linux-gnu/4.9/../../../aarch64-linux-gnu/libnuma.a(libnuma.o):(.bss+0x38):
> multiple definition of `numa_exit_on_error'

That's likely because "numa_exit_on_error" is supposed to be defined
by libnuma library:
  http://linux.die.net/man/3/numa_exit_on_error

Test defines it too, which creates conflict. We should consider removing it,
(and that it doesn't break older libnuma releases):

diff --git a/testcases/kernel/numa/numa_node_size.c b/testcases/kernel/numa/numa_node_size.c
index 6338bc7..1375193 100644
--- a/testcases/kernel/numa/numa_node_size.c
+++ b/testcases/kernel/numa/numa_node_size.c
@@ -38,7 +38,7 @@
 #include <numa.h>
 #endif
 
-int numa_exit_on_error = 0;
 char *fmt_mem(unsigned long long mem, char *buf)
 {
        if (mem == -1L)

Regards,
Jan

> /tmp/ccRABETR.o:(.bss+0x0): first defined here
> /usr/lib/gcc/aarch64-linux-gnu/4.9/../../../aarch64-linux-gnu/libnuma.a(affinity.o):
> In function `affinity_ip':
> (.text+0x6dc): warning: Using 'getaddrinfo' in statically linked
> applications requires at runtime the shared libraries from the glibc
> version used for linking
> collect2: error: ld returned 1 exit status
> <builtin>: recipe for target 'numa_node_size' failed
> make[3]: *** [numa_node_size] Error 1
> make[3]: Leaving directory '/home/linaro/Srikanth/ltp/testcases/kernel/numa'
> ../../include/mk/generic_trunk_target.inc:93: recipe for target 'all' failed
> make[2]: *** [all] Error 2
> make[2]: Leaving directory '/home/linaro/Srikanth/ltp/testcases/kernel'
> ../include/mk/generic_trunk_target.inc:93: recipe for target 'all' failed
> make[1]: *** [all] Error 2
> make[1]: Leaving directory '/home/linaro/Srikanth/ltp/testcases'
> Makefile:114: recipe for target 'testcases-all' failed
> make: *** [testcases-all] Error 2
> 
> On Fri, Jan 22, 2016 at 12:10 PM, $rik@nth <srikanth007m@gmail.com> wrote:
> > I did an softlink to arm-linux gcc after my initial mail.. So on
> > latest one you will be not seeing.
> >
> > I will try on another development board. This is my 3rd board having
> > problem :(
> >
> > On Fri, Jan 22, 2016 at 2:00 PM, Jan Stancek <jstancek@redhat.com> wrote:
> >>
> >>
> >> ----- Original Message -----
> >>> From: "$rik@nth" <srikanth007m@gmail.com>
> >>> To: "Jan Stancek" <jstancek@redhat.com>
> >>> Sent: Friday, 22 January, 2016 5:25:54 AM
> >>> Subject: Re: [LTP] get_mempolicy failing to compile
> >>>
> >>> My environment is ARM ubuntu and all my libs and packages are in AMR.
> >>
> >> config.log you gave us is from x86_64 system named "hyd-lnxbld84".
> >>
> >>> Yes able to compile the source  static as well
> >>> linaro@linaro-alip:~/Srikanth$ gcc -static numatest.c -lnuma
> >>
> >> This is a different system, isn't it?
> >>
> >> What I meant was "hyd-lnxbld84" system and gcc you use to
> >> compile LTP:
> >>   arm-linux-gnueabihf-gcc -static numatest.c -lnuma
> >
> >
> >
> > --
> > Thanks & Regards,
> > M.Srikanth Kumar.
> 
> 
> 
> --
> Thanks & Regards,
> M.Srikanth Kumar.
> 

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

* [LTP] get_mempolicy failing to compile
  2016-01-27 15:33                       ` Jan Stancek
@ 2016-01-28 11:27                         ` $rik
  0 siblings, 0 replies; 14+ messages in thread
From: $rik @ 2016-01-28 11:27 UTC (permalink / raw)
  To: ltp

Thanks Jan for the patch. It worked and able to compile entire LTP.

On Wed, Jan 27, 2016 at 9:03 PM, Jan Stancek <jstancek@redhat.com> wrote:
>
>
>
>
> ----- Original Message -----
>> From: "$rik@nth" <srikanth007m@gmail.com>
>> To: "Jan Stancek" <jstancek@redhat.com>
>> Cc: ltp@lists.linux.it
>> Sent: Wednesday, 27 January, 2016 9:39:26 AM
>> Subject: Re: [LTP] get_mempolicy failing to compile
>>
>> Now it is failing here.. on the same setup i am able to compile the
>> sample numa program statically.
>>
>> make[4]: Leaving directory
>> '/home/linaro/Srikanth/ltp/testcases/kernel/include'
>> gcc -static -g -O2 -fno-strict-aliasing -pipe -Wall -W
>> -Wold-style-definition
>> -I/home/linaro/Srikanth/ltp/testcases/kernel/include -D_GNU_SOURCE
>> -DNUMA_VERSION1_COMPATIBILITY -I../../../include -I../../../include
>> -static -pthread  -L../../../lib  numa_node_size.c   -lltp -lnuma -o
>> numa_node_size
>> numa_node_size.c: In function ?fmt_mem?:
>> numa_node_size.c:44:10: warning: comparison between signed and
>> unsigned integer expressions [-Wsign-compare]
>>   if (mem == -1L)
>>           ^
>> /usr/lib/gcc/aarch64-linux-gnu/4.9/../../../aarch64-linux-gnu/libnuma.a(libnuma.o):(.bss+0x38):
>> multiple definition of `numa_exit_on_error'
>
> That's likely because "numa_exit_on_error" is supposed to be defined
> by libnuma library:
>   http://linux.die.net/man/3/numa_exit_on_error
>
> Test defines it too, which creates conflict. We should consider removing it,
> (and that it doesn't break older libnuma releases):
>
> diff --git a/testcases/kernel/numa/numa_node_size.c b/testcases/kernel/numa/numa_node_size.c
> index 6338bc7..1375193 100644
> --- a/testcases/kernel/numa/numa_node_size.c
> +++ b/testcases/kernel/numa/numa_node_size.c
> @@ -38,7 +38,7 @@
>  #include <numa.h>
>  #endif
>
> -int numa_exit_on_error = 0;
>  char *fmt_mem(unsigned long long mem, char *buf)
>  {
>         if (mem == -1L)
>
> Regards,
> Jan
>
>> /tmp/ccRABETR.o:(.bss+0x0): first defined here
>> /usr/lib/gcc/aarch64-linux-gnu/4.9/../../../aarch64-linux-gnu/libnuma.a(affinity.o):
>> In function `affinity_ip':
>> (.text+0x6dc): warning: Using 'getaddrinfo' in statically linked
>> applications requires at runtime the shared libraries from the glibc
>> version used for linking
>> collect2: error: ld returned 1 exit status
>> <builtin>: recipe for target 'numa_node_size' failed
>> make[3]: *** [numa_node_size] Error 1
>> make[3]: Leaving directory '/home/linaro/Srikanth/ltp/testcases/kernel/numa'
>> ../../include/mk/generic_trunk_target.inc:93: recipe for target 'all' failed
>> make[2]: *** [all] Error 2
>> make[2]: Leaving directory '/home/linaro/Srikanth/ltp/testcases/kernel'
>> ../include/mk/generic_trunk_target.inc:93: recipe for target 'all' failed
>> make[1]: *** [all] Error 2
>> make[1]: Leaving directory '/home/linaro/Srikanth/ltp/testcases'
>> Makefile:114: recipe for target 'testcases-all' failed
>> make: *** [testcases-all] Error 2
>>
>> On Fri, Jan 22, 2016 at 12:10 PM, $rik@nth <srikanth007m@gmail.com> wrote:
>> > I did an softlink to arm-linux gcc after my initial mail.. So on
>> > latest one you will be not seeing.
>> >
>> > I will try on another development board. This is my 3rd board having
>> > problem :(
>> >
>> > On Fri, Jan 22, 2016 at 2:00 PM, Jan Stancek <jstancek@redhat.com> wrote:
>> >>
>> >>
>> >> ----- Original Message -----
>> >>> From: "$rik@nth" <srikanth007m@gmail.com>
>> >>> To: "Jan Stancek" <jstancek@redhat.com>
>> >>> Sent: Friday, 22 January, 2016 5:25:54 AM
>> >>> Subject: Re: [LTP] get_mempolicy failing to compile
>> >>>
>> >>> My environment is ARM ubuntu and all my libs and packages are in AMR.
>> >>
>> >> config.log you gave us is from x86_64 system named "hyd-lnxbld84".
>> >>
>> >>> Yes able to compile the source  static as well
>> >>> linaro@linaro-alip:~/Srikanth$ gcc -static numatest.c -lnuma
>> >>
>> >> This is a different system, isn't it?
>> >>
>> >> What I meant was "hyd-lnxbld84" system and gcc you use to
>> >> compile LTP:
>> >>   arm-linux-gnueabihf-gcc -static numatest.c -lnuma
>> >
>> >
>> >
>> > --
>> > Thanks & Regards,
>> > M.Srikanth Kumar.
>>
>>
>>
>> --
>> Thanks & Regards,
>> M.Srikanth Kumar.
>>



-- 
Thanks & Regards,
M.Srikanth Kumar.

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

* [LTP] get_mempolicy failing to compile
@ 2016-01-21  2:06 $rik
  0 siblings, 0 replies; 14+ messages in thread
From: $rik @ 2016-01-21  2:06 UTC (permalink / raw)
  To: ltp

Any pointers to unblock compilation of LTP?

On Wed, Jan 20, 2016 at 6:52 PM, $rik@nth <srikanth007m@gmail.com> wrote:
> Hi All,
>
> I am trying to compile latest snapshot from github [1] and getting below errors.
>
> arm-linux-gnueabihf-gcc -static -g -O2 -fno-strict-aliasing -pipe
> -Wall -W -Wold-style-definition
> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
> -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils
>  -I/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/include
> -I../../../../include -I../../../../include -static -pthread
> -L/home/hydlnxbld84/Srikanth/ltp/testcases/kernel/lib
> -L../../../../lib  get_mempolicy01.c   -lltp  -lkerntest -lltp -o
> get_mempolicy01
> In file included from get_mempolicy01.c:63:0:
> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:
> In function ?sigterm_handler?:
> /home/hydlnxbld84/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:111:33:
> warning: unused parameter ?sig? [-Wunused-parameter]
>  static void sigterm_handler(int sig)
>                                  ^
> get_mempolicy01.c: In function ?main?:
> get_mempolicy01.c:197:14: warning: unused parameter ?argc? [-Wunused-parameter]
>  int main(int argc, char **argv)
>               ^
> get_mempolicy01.c:197:27: warning: unused parameter ?argv? [-Wunused-parameter]
>  int main(int argc, char **argv)
>                            ^
> /tmp/cciaYvm7.o: In function `setup_uid':
> /home/Srikanth/ltp/testcases/kernel/syscalls/get_mempolicy/../utils/common_j_h.c:64:
> warning: Using 'getpwnam' in statically linked applications requires
> at runtime the shared libraries from the glibc version used for
> linking
> /tmp/cciaYvm7.o: In function `main':
> get_mempolicy01.c:(.text.startup+0x9c): undefined reference to
> `numa_allocate_nodemask'
> get_mempolicy01.c:(.text.startup+0xa2): undefined reference to
> `numa_allocate_nodemask'
> get_mempolicy01.c:(.text.startup+0xc2): undefined reference to
> `numa_bitmask_setbit'
> get_mempolicy01.c:(.text.startup+0x2ce): undefined reference to
> `numa_bitmask_clearall'
> get_mempolicy01.c:(.text.startup+0x2e8): undefined reference to
> `numa_bitmask_equal'
> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> In function `get_max_node':
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> reference to `numa_max_possible_node'
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> reference to `numa_max_possible_node'
> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> In function `get_nodemask_allnodes':
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:71: undefined
> reference to `nodemask_set'
> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> In function `get_allowed_nodes_arr':
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:191: undefined
> reference to `nodemask_isset'
> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> In function `filter_nodemask_cpu':
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:126: undefined
> reference to `nodemask_isset'
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:133: undefined
> reference to `nodemask_clr'
> /home/Srikanth/ltp/testcases/kernel/lib/libkerntest.a(numa_helper.o):
> In function `get_max_node':
> /home/Srikanth/ltp/testcases/kernel/lib/numa_helper.c:53: undefined
> reference to `numa_max_possible_node'
> collect2: error: ld returned 1 exit status
> make[4]: *** [get_mempolicy01] Error 1
>
> Attached is my config log for reference.
>
>
> [1] https://github.com/linux-test-project/ltp
>
> --
> Thanks & Regards,
> M.Srikanth Kumar.



-- 
Thanks & Regards,
M.Srikanth Kumar.

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

end of thread, other threads:[~2016-01-28 11:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-20 13:22 [LTP] get_mempolicy failing to compile $rik
2016-01-21  7:36 ` Jan Stancek
2016-01-21 10:18   ` $rik
2016-01-21 11:06     ` Jan Stancek
2016-01-21 11:54       ` $rik
2016-01-21 12:14         ` Jan Stancek
2016-01-21 12:42           ` $rik
2016-01-21 12:46             ` Jan Stancek
     [not found]               ` <CANKSX+E608-qFt=-_vneFeBL+BH3zjZGsJXyjJ74rv3k507UYw@mail.gmail.com>
2016-01-22  8:30                 ` Jan Stancek
2016-01-22 12:10                   ` $rik
2016-01-27  8:39                     ` $rik
2016-01-27 15:33                       ` Jan Stancek
2016-01-28 11:27                         ` $rik
2016-01-21  2:06 $rik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.