ia64 builds fails (and maybe alpha too?)
Jose Luis Rivas
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
[Please keep Julian CC'd since I don't know if he's subscribed to this list, I am.]
Hi,
During the packaging of PowerTOP for Debian we have come across and issue in the building for ia64[0][1]. Julian (co-maintainer at Debian) made a patch for it [2][3].
Doing some research it looks like this was removed on 9ce9ec6[4] altogether with alpha support. What are those older kernels mentioned in the commit message? Maybe our build-daemons for ia64 have older kernels in that case please let us know which is the minimum kernel version for this to work.
If is not the case and in fact we need the patch, can this be included upstream before and we can make a new release of PowerTOP with this?
Kind regards,
Keep up the good work!
[0]
https://buildd.debian.org/status/fetch.php?pkg=powertop&arch=ia64&ver=2.4-1&stamp=1377923202
[1] Excerpt from the build log:
``` g++ -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 - -I/usr/include/libnl3 -DLOCALEDIR=\"/usr/share/locale\" - -D_FORTIFY_SOURCE=2 -fno-omit-frame-pointer -fstack-protector -Wall - -Wshadow -Wformat -I/usr/include/libnl3 -g -O2 -Wformat - -Werror=format-security -c -o perf/powertop-perf.o `test -f 'perf/perf.cpp' || echo './'`perf/perf.cpp perf/perf.cpp:1:0: warning: -fstack-protector not supported for this target [enabled by default] perf/perf.cpp: In function 'int sys_perf_event_open(perf_event_attr*, pid_t, int, int, long unsigned int)': perf/perf.cpp:67:17: error: '__NR_perf_event_open' was not declared in this scope perf/perf.cpp:69:1: warning: control reaches end of non-void function [-Wreturn-type] make[4]: *** [perf/powertop-perf.o] Error 1 make[3]: *** [all] Error 2 ```
[2] https://github.com/ghostbar/powertop.deb/pull/2
[4]
https://github.com/fenrus75/powertop/commit/9ce9ec662ce7b642967fd75222114b624b8a503a
- --
Jose Luis Rivas
The Debian Project -- http://debian.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEAREDAAYFAlImav0ACgkQOKCtW8rKsRjqxwCgkk9dVz7MaYPZdJ8vZ2a/wodO GLYAnRkoeXYPiW4n805L2pL+YCgO8spV
=2eeU
-----END PGP SIGNATURE-----
Arjan van de Ven
Quoted 38 lines · Jose Luis Rivas
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160[Please keep Julian CC'd since I don't know if he's subscribed to this list, I am.]
Hi,
During the packaging of PowerTOP for Debian we have come across and issue in the building for
ia64[0][1]. Julian (co-maintainer at Debian) made a patch for it [2][3].Doing some research it looks like this was removed on
9ce9ec6[4] altogether withalphasupport. What are those older kernels mentioned in the commit message? Maybe our build-daemons for ia64 have older kernels in that case please let us know which is the minimum kernel version for this to work.If is not the case and in fact we need the patch, can this be included upstream before and we can make a new release of PowerTOP with this?
Kind regards,
Keep up the good work![0]
https://buildd.debian.org/status/fetch.php?pkg=powertop&arch=ia64&ver=2.4-1&stamp=1377923202[1] Excerpt from the build log:
``` g++ -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 - -I/usr/include/libnl3 -DLOCALEDIR=\"/usr/share/locale\" - -D_FORTIFY_SOURCE=2 -fno-omit-frame-pointer -fstack-protector -Wall - -Wshadow -Wformat -I/usr/include/libnl3 -g -O2 -Wformat - -Werror=format-security -c -o perf/powertop-perf.o `test -f 'perf/perf.cpp' || echo './'`perf/perf.cpp perf/perf.cpp:1:0: warning: -fstack-protector not supported for this target [enabled by default] perf/perf.cpp: In function 'int sys_perf_event_open(perf_event_attr*,
Quoted 8 lines
pid_t, int, int, long unsigned int)': perf/perf.cpp:67:17: error: '__NR_perf_event_open' was not declared in this scope perf/perf.cpp:69:1: warning: control reaches end of non-void function [-Wreturn-type] make[4]: *** [perf/powertop-perf.o] Error 1 make[3]: *** [all] Error 2 ```
if your kernel does not have "perf", there is no point in using powertop.... really; it will not work at all.
(including anything asm-generic/foo also is the wrong answer; that directory is not architectural from a kernel perspective, only for indirect inclusion)
Jose Luis Rivas
Quoted 10 lines · Arjan van de Ven
if your kernel does not have "perf", there is no point in using powertop....
really; it will not work at all.(including anything asm-generic/foo also is the wrong answer; that directory is not architectural
from a kernel perspective, only for indirect inclusion)
It does. I was just writing to Julian about this. It seems like it is actually a bug in the kernel not having it defined in ia64's unistd.h[0] (checking Linus's master branch).
[0]
https://github.com/torvalds/linux/blob/master/arch/ia64/include/uapi/asm/unistd.h
Meaning that it wont fail in alpha, but's failing on ia64 because that line is missing.
Seems like the right hint, Arjan?
Signature · 2 lines
Jose Luis Rivas The Debian Project -- http://debian.org
Sergey Senozhatsky
Quoted 18 lines · Arjan van de Ven
Quoted 9 lines
g++ -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2
- -I/usr/include/libnl3 -DLOCALEDIR=\"/usr/share/locale\"
- -D_FORTIFY_SOURCE=2 -fno-omit-frame-pointer -fstack-protector -Wall
- -Wshadow -Wformat -I/usr/include/libnl3 -g -O2 -Wformat
- -Werror=format-security -c -operf/powertop-perf.otest -f 'perf/perf.cpp' || echo './'perf/perf.cpp perf/perf.cpp:1:0: warning: -fstack-protector not supported for this target [enabled by default]
perf/perf.cpp: In function 'int sys_perf_event_open(perf_event_attr*,Quoted 8 lines
pid_t, int, int, long unsigned int)':
perf/perf.cpp:67:17: error: '__NR_perf_event_open' was not declared in this scope
perf/perf.cpp:69:1: warning: control reaches end of non-void function [-Wreturn-type]
make[4]: *** [perf/powertop-perf.o] Error 1
make[3]: *** [all] Error 2
```
Quoted 6 lines
if your kernel does not have "perf", there is no point in using powertop.... really; it will not work at all.
(including anything asm-generic/foo also is the wrong answer; that directory is not architectural from a kernel perspective, only for indirect inclusion)
we had this workaround some time ago, it was removed by
commit 9ce9ec662ce7b642967fd75222114b624b8a503a
Author: Chris E Ferron <chris.e.ferron(a)linux.intel.com> Date: Fri Jul 20 15:14:08 2012 -0700
removed re-define of __NR_perf_event_open, what was needed for stale headers in older kernels. sys/syscall.h will not be correct.
-/* __NR_perf_event_open in ia64 and alpha is defined elsewhere */ -#ifdef __ia64__
-#include <asm-generic/unistd.h>
-#endif
-ss
Sergey Senozhatsky
Quoted 6 lines · Jose Luis Rivas
Quoted 5 lines · Arjan van de Ven
if your kernel does not have "perf", there is no point in using powertop....
really; it will not work at all.
Quoted 7 lines
Quoted 5 lines
(including anything asm-generic/foo also is the wrong answer; that directory is not architectural
from a kernel perspective, only for indirect inclusion)It does.
Sorry, I doubt that.
ia64 entry.S
// the syscall number may have changed, so re-load it and re-calculate the
// syscall entry-point:
adds r15=PT(R15)+16,sp // r15 = &pt_regs.r15 (syscall #)
;;
ld8 r15=[r15]
mov r3=NR_syscalls - 1
;;
adds r15=-1024,r15
movl r16=sys_call_table
;;
shladd r20=r15,3,r16 // r20 = sys_call_table + 8*(syscall-1024)
cmp.leu p6,p7=r15,r3
;;
(p6) ld8 r20=[r20] // load address of syscall entry point
(p7) movl r20=sys_ni_syscall
;;
mov b6=r20
br.call.sptk.many rp=b6 // do the syscallwhere syscall_table is something like this:
data8 sys_preadv
data8 sys_pwritev // 1320
data8 sys_rt_tgsigqueueinfo
data8 sys_recvmmsg
data8 sys_fanotify_init
data8 sys_fanotify_mark
data8 sys_prlimit64 // 1325
data8 sys_name_to_handle_at
data8 sys_open_by_handle_at
data8 sys_clock_adjtime
data8 sys_syncfs
data8 sys_setns // 1330
data8 sys_sendmmsg
data8 sys_process_vm_readv
data8 sys_process_vm_writev
data8 sys_accept4
data8 sys_finit_module // 1335
and no, there is no perf_event_open syscall.
simply definining missing __NR
#define __NR_perf_event_open 1336
and then performing
call sys_call_table + 8*(syscall-1024)
will not do the trick. this only will make compilable binary, and that's it.
so I NACK the proposed patch at the moment.
-ss
Quoted 19 lines
I was just writing to Julian about this. It seems like it is actually a bug in the kernel not having it defined in ia64's unistd.h[0] (checking Linus's master branch).
[0]
https://github.com/torvalds/linux/blob/master/arch/ia64/include/uapi/asm/unistd.hMeaning that it wont fail in alpha, but's failing on ia64 because that line is missing.
Seems like the right hint, Arjan?
Signature · 6 lines
Jose Luis Rivas The Debian Project -- http://debian.org _______________________________________________ PowerTop mailing list PowerTop(a)lists.01.org https://lists.01.org/mailman/listinfo/powertop
Arjan van de Ven
Quoted 16 lines · Jose Luis Rivas
Quoted 10 lines · Arjan van de Ven
if your kernel does not have "perf", there is no point in using powertop....
really; it will not work at all.(including anything asm-generic/foo also is the wrong answer; that directory is not architectural
from a kernel perspective, only for indirect inclusion)It does. I was just writing to Julian about this. It seems like it is actually a bug in the kernel not having it defined in ia64's unistd.h[0] (checking Linus's master branch).
Quoted 5 lines
[0]
https://github.com/torvalds/linux/blob/master/arch/ia64/include/uapi/asm/unistd.hMeaning that it wont fail in alpha, but's failing on ia64 because that line is missing.
Lets add Tony to this... he knows IA64 a lot better than I do