Error: staprun syntax error on Target

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error: staprun syntax error on Target

Satish Kumar
Hi all,

I am getting following error with staprun on target board

root@xilinx-zynq-le:~# staprun
/usr/target/bin/staprun: line 1: syntax error: unexpected "("
root@xilinx-zynq-le:~#


I am using systamtap 2.6.0-1 7 elfutils  elfutils-0.161 version

& commit Id for systemtap

commit cbeaab6abc002463024b5a199ac1fc2f49a31738
Author: Hilko Bengen <[hidden email]>
Date:   Thu Sep 25 22:44:57 2014 +0200

Running on ubuntu 14.04 machine on x86_64 bit.


I got compiled stap for host successfully
staprun & stapio for target successfully
and copied /macharm (creted with ./configure) directory into target

& when running the staprun on the target getting error as


root@xilinx-zynq-le:~# staprun hello.ko
/usr/target/bin/staprun: line 1: syntax error: unexpected "("
root@xilinx-zynq-le:~#

Kernel compiled for Target board: 3.14


I used following commands to create stap & stptun, stapio based on
following web page

https://drzhf9.wordpress.com/2015/02/19/systemtap-for-arm/

can you please support me to resolve the issue.


If blog page is wrong, please provide me proper Doc. or set of commands to
create stap, staprun & stapio for ARM Target board
I did not see much doc.s open for the ARM Arch.


Thanks in advance


Regards
Satish.G
Reply | Threaded
Open this post in threaded view
|

Re: Error: staprun syntax error on Target

Frank Ch. Eigler
Satish Kumar <[hidden email]> writes:

> [...]
> root@xilinx-zynq-le:~# staprun
> /usr/target/bin/staprun: line 1: syntax error: unexpected "("
> following web page
> https://drzhf9.wordpress.com/2015/02/19/systemtap-for-arm/

The staprun binary needs to be built for the same architecture on which
it will be executed.  (This is the same as any other binary.)  It sounds
as though you did the "building for target board" part without the
appropriate --host=XXXXX configure option, or something went wrong with
that build process.

Can the ARM board run a full enough OS to natively build systemtap
(with --disable-translator if you like), so cross-compilation is not
needed?


- FChE
Reply | Threaded
Open this post in threaded view
|

Re: Error: staprun syntax error on Target

Satish Kumar
Hi Frank,

Thank you for quick reply.
It is working now on target board based on your inputs.

If compiling stap, staprun, stapio on the same system, instead of using
Cross compilation, issue becomes resolved.


In this case, systemtap 2.6 + elfutils 0.161 + Kernel 3.14 --> success
Same want to run on Kernel 4.9, so which version of systemtap &  which
version of elfutils should use
I am looking for ARM Arch .board
Because if systemtap version and kernel version are not aligned, it does
not work(Provided in one of Document).

If systemtap not supports till 4.9 kernel ,
what is highest supported Kernel version + which systemtap version + which
elfutils version?

Please provide the above information

Thanks in advance.

Regards
Satish.G

On Wed, Nov 29, 2017 at 11:42 PM, Frank Ch. Eigler <[hidden email]> wrote:

> Satish Kumar <[hidden email]> writes:
>
> > [...]
> > root@xilinx-zynq-le:~# staprun
> > /usr/target/bin/staprun: line 1: syntax error: unexpected "("
> > following web page
> > https://drzhf9.wordpress.com/2015/02/19/systemtap-for-arm/
>
> The staprun binary needs to be built for the same architecture on which
> it will be executed.  (This is the same as any other binary.)  It sounds
> as though you did the "building for target board" part without the
> appropriate --host=XXXXX configure option, or something went wrong with
> that build process.
>
> Can the ARM board run a full enough OS to natively build systemtap
> (with --disable-translator if you like), so cross-compilation is not
> needed?
>
>
> - FChE
>
Reply | Threaded
Open this post in threaded view
|

Re: Error: staprun syntax error on Target

Frank Ch. Eigler
Hi -

On Thu, Nov 30, 2017 at 09:00:52PM +0530, Satish Kumar wrote:
> Thank you for quick reply.
> It is working now on target board based on your inputs.
> If compiling stap, staprun, stapio on the same system, instead of using
> Cross compilation, issue becomes resolved.

Glad to hear it.

> [...]  If systemtap not supports till 4.9 kernel , what is highest
> supported Kernel version + which systemtap version + which elfutils
> version?

Systemtap tries to preserve its own support for ancient kernels.  So
any systemtap release newer than your target kernel should support
that kernel plus anything else from the last decade (roughly
speaking).  So for kernel 4.9 or older, you could build stap 3.1 or
3.2 and enjoy.


- FChE
Reply | Threaded
Open this post in threaded view
|

Re: Error: staprun syntax error on Target

Satish Kumar
On Thu, Nov 30, 2017 at 9:05 PM, Frank Ch. Eigler <[hidden email]> wrote:

> Hi -
>
> On Thu, Nov 30, 2017 at 09:00:52PM +0530, Satish Kumar wrote:
> > Thank you for quick reply.
> > It is working now on target board based on your inputs.
> > If compiling stap, staprun, stapio on the same system, instead of using
> > Cross compilation, issue becomes resolved.
>
> Glad to hear it.
>
> > [...]  If systemtap not supports till 4.9 kernel , what is highest
> > supported Kernel version + which systemtap version + which elfutils
> > version?
>
> Systemtap tries to preserve its own support for ancient kernels.  So
> any systemtap release newer than your target kernel should support
> that kernel plus anything else from the last decade (roughly
> speaking).  So for kernel 4.9 or older, you could build stap 3.1 or
> 3.2 and enjoy.
>
>
> - FChE
>
Ok.. that is nice
& thanks for the support

Regards
Satish.G