* [Powertop] ia64 builds fails (and maybe alpha too?)
@ 2013-09-03 23:04 Jose Luis Rivas
0 siblings, 0 replies; 6+ messages in thread
From: Jose Luis Rivas @ 2013-09-03 23:04 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 2393 bytes --]
-----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
[3]
https://github.com/juw/powertop.deb/blob/1a298734a297f83a72601fe0c2aab7f88bcd6b3b/debian/patches/0001-Fix-build-on-ia64.patch
[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-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Powertop] ia64 builds fails (and maybe alpha too?)
@ 2013-09-03 23:09 Arjan van de Ven
0 siblings, 0 replies; 6+ messages in thread
From: Arjan van de Ven @ 2013-09-03 23:09 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 2175 bytes --]
On 9/3/2013 4:04 PM, Jose Luis Rivas wrote:
> -----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
> ```
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)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Powertop] ia64 builds fails (and maybe alpha too?)
@ 2013-09-03 23:18 Jose Luis Rivas
0 siblings, 0 replies; 6+ messages in thread
From: Jose Luis Rivas @ 2013-09-03 23:18 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 812 bytes --]
On Tue Sep 3 18:39:26 2013, Arjan van de Ven wrote:
>
> 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?
--
Jose Luis Rivas
The Debian Project -- http://debian.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Powertop] ia64 builds fails (and maybe alpha too?)
@ 2013-09-04 7:32 Sergey Senozhatsky
0 siblings, 0 replies; 6+ messages in thread
From: Sergey Senozhatsky @ 2013-09-04 7:32 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1694 bytes --]
On (09/03/13 16:09), Arjan van de Ven wrote:
> >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
> >```
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Powertop] ia64 builds fails (and maybe alpha too?)
@ 2013-09-04 8:40 Sergey Senozhatsky
0 siblings, 0 replies; 6+ messages in thread
From: Sergey Senozhatsky @ 2013-09-04 8:40 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 2860 bytes --]
On (09/03/13 18:48), Jose Luis Rivas wrote:
> On Tue Sep 3 18:39:26 2013, Arjan van de Ven wrote:
> >
> > 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.
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 syscall
where 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
> 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?
> --
> Jose Luis Rivas
> The Debian Project -- http://debian.org
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Powertop] ia64 builds fails (and maybe alpha too?)
@ 2013-09-04 14:52 Arjan van de Ven
0 siblings, 0 replies; 6+ messages in thread
From: Arjan van de Ven @ 2013-09-04 14:52 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 853 bytes --]
On 9/3/2013 4:18 PM, Jose Luis Rivas wrote:
> On Tue Sep 3 18:39:26 2013, Arjan van de Ven wrote:
>>
>> 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.
Lets add Tony to this... he knows IA64 a lot better than I do
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-09-04 14:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-03 23:04 [Powertop] ia64 builds fails (and maybe alpha too?) Jose Luis Rivas
-- strict thread matches above, loose matches on Subject: below --
2013-09-03 23:09 Arjan van de Ven
2013-09-03 23:18 Jose Luis Rivas
2013-09-04 7:32 Sergey Senozhatsky
2013-09-04 8:40 Sergey Senozhatsky
2013-09-04 14:52 Arjan van de Ven
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.