public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Systemtap source compile for ARM arch
@ 2007-07-11  8:25 Naren chandru
  2007-07-11 15:33 ` Eugene Teo
  2007-07-11 17:02 ` Frank Ch. Eigler
  0 siblings, 2 replies; 8+ messages in thread
From: Naren chandru @ 2007-07-11  8:25 UTC (permalink / raw)
  To: systemtap

Hi all,
 
I am new to systemtap. I have downloaded the
systemtap-20070630.tar.bz2 src and compiled for i686
architecture without any issue the source get
compiled.
 
Now I am trying to build it for ARM architecture. I
don't know how to cross compile systemtap for ARM
architecture. Please help me to cross compile  system
tap for arm arch. 
 
If anyone have the procedure for system tap cross
compilation pls tell me the procedure.
 
Thanks & Regards,
Naren 



      Unlimited freedom, unlimited storage. Get it now, on http://in.mail.yahoo.com

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

* Re: Systemtap source compile for ARM arch
  2007-07-11  8:25 Systemtap source compile for ARM arch Naren chandru
@ 2007-07-11 15:33 ` Eugene Teo
  2007-07-11 16:36   ` Eugene Teo
  2007-07-11 20:34   ` Anderson Lizardo
  2007-07-11 17:02 ` Frank Ch. Eigler
  1 sibling, 2 replies; 8+ messages in thread
From: Eugene Teo @ 2007-07-11 15:33 UTC (permalink / raw)
  To: Naren chandru; +Cc: systemtap

Naren chandru wrote:
> Hi all,
>  
> I am new to systemtap. I have downloaded the
> systemtap-20070630.tar.bz2 src and compiled for i686
> architecture without any issue the source get
> compiled.
>  
> Now I am trying to build it for ARM architecture. I
> don't know how to cross compile systemtap for ARM
> architecture. Please help me to cross compile  system
> tap for arm arch. 
>  
> If anyone have the procedure for system tap cross
> compilation pls tell me the procedure.

Are you using scratchbox? I was trying to get SystemTap working on scratchbox
but I didn't manage to go any further than just stap -e 'probe begin {...}'.
It has some problems with looking up for the kernel debuginfo. I have not looked
at it further, so I am not sure if it is a problem with SystemTap or scratchbox.

Quentin mentioned that he got SystemTap working by installing it natively. I
have not tried that.

Also, take note that if your device is using busybox instead of bash, you need
to edit /usr/libexec/systemtap/stp_check to use sh instead of bash. And if
CONFIG_CPU_CP15 is not defined, you need this patch[1] (not necessary if you use
the cvs version of SystemTap).

Btw, you also need the kprobes kernel patches for ARM[2,3].

Let me know how it goes. Thanks!

[1] http://sourceware.org/ml/systemtap-cvs/2007-q3/msg00021.html
[2] http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=4447
[3] http://www.kernel.org/pub/linux/kernel/people/eugeneteo/kprobes/

Eugene


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

* Re: Systemtap source compile for ARM arch
  2007-07-11 15:33 ` Eugene Teo
@ 2007-07-11 16:36   ` Eugene Teo
  2007-07-11 20:34   ` Anderson Lizardo
  1 sibling, 0 replies; 8+ messages in thread
From: Eugene Teo @ 2007-07-11 16:36 UTC (permalink / raw)
  To: Naren chandru; +Cc: systemtap

Naren chandru wrote:
> Hi all,
>  
> I am new to systemtap. I have downloaded the
> systemtap-20070630.tar.bz2 src and compiled for i686
> architecture without any issue the source get
> compiled.
>  
> Now I am trying to build it for ARM architecture. I
> don't know how to cross compile systemtap for ARM
> architecture. Please help me to cross compile  system
> tap for arm arch. 
>  
> If anyone have the procedure for system tap cross
> compilation pls tell me the procedure.

Are you using scratchbox? I was trying to get SystemTap working on scratchbox
but I didn't manage to go any further than just stap -e 'probe begin {...}'.
It has some problems with looking up for the kernel debuginfo. I have not looked
at it further, so I am not sure if it is a problem with SystemTap or scratchbox.

Quentin mentioned that he got SystemTap working by installing it natively. I
have not tried that.

Also, take note that if your device is using busybox instead of bash, you need
to edit /usr/libexec/systemtap/stp_check to use sh instead of bash. And if
CONFIG_CPU_CP15 is not defined, you need this patch[1] (not necessary if you use
the cvs version of SystemTap).

Btw, you also need the kprobes kernel patches for ARM[2,3].

Let me know how it goes. Thanks!

[1] http://sourceware.org/ml/systemtap-cvs/2007-q3/msg00021.html
[2] http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=4447
[3] http://www.kernel.org/pub/linux/kernel/people/eugeneteo/kprobes/

Eugene

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

* Re: Systemtap source compile for ARM arch
  2007-07-11  8:25 Systemtap source compile for ARM arch Naren chandru
  2007-07-11 15:33 ` Eugene Teo
@ 2007-07-11 17:02 ` Frank Ch. Eigler
  2007-07-12 14:13   ` Naren chandru
  1 sibling, 1 reply; 8+ messages in thread
From: Frank Ch. Eigler @ 2007-07-11 17:02 UTC (permalink / raw)
  To: Naren chandru; +Cc: systemtap

Naren chandru <naren_lin@yahoo.co.in> writes:

> [...]  Now I am trying to build it for ARM architecture. I don't
> know how to cross compile systemtap for ARM architecture. [...]

If you mean building a systemtap binary that will run on an ARM host
(and thus run a native ARM compiler to build the modules), this is how
it should work:

PATH=...path.to.arm.toolchain..:$PATH .../configure --host=CONFIG_TRIPLET ...

However, this breaks for a few different reasons.  One of them is the
missing passing down of "--host" to a bundled elfutils build, which is
the likely configuration for a cross tool.  There are some other
obstacles.  But in principle, it should be workable.

- FChE

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

* Re: Systemtap source compile for ARM arch
  2007-07-11 15:33 ` Eugene Teo
  2007-07-11 16:36   ` Eugene Teo
@ 2007-07-11 20:34   ` Anderson Lizardo
  1 sibling, 0 replies; 8+ messages in thread
From: Anderson Lizardo @ 2007-07-11 20:34 UTC (permalink / raw)
  To: Eugene Teo; +Cc: Naren chandru, systemtap

On 7/11/07, Eugene Teo <eteo@redhat.com> wrote:
> Are you using scratchbox? I was trying to get SystemTap working on scratchbox
> but I didn't manage to go any further than just stap -e 'probe begin {...}'.
> It has some problems with looking up for the kernel debuginfo. I have not looked
> at it further, so I am not sure if it is a problem with SystemTap or scratchbox.

Have you tried using the "-r" option to pass the correct kernel
release? E.g. "stap -p4 -e '...' -r 2.6.18-omap1". Otherwise it will
get the host kernel version.

Also make sure you have the necessary symlinks inside Scratchbox:

/boot/vmlinux-<release> -> /path/to/kernel_sources/vmlinux
/lib/modules/<release>/build -> /path/to/kernel_sources
/lib/modules/<release>/source -> /path/to/kernel_sources

Finally, make sure you created a /lib/modules/<release>/kernel
directory. It can even be empty, but stap may complain with a "missing
debug info" error if it's not there.

Regards,
-- 
Anderson Lizardo

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

* Re: Systemtap source compile for ARM arch
  2007-07-11 17:02 ` Frank Ch. Eigler
@ 2007-07-12 14:13   ` Naren chandru
  2007-07-12 17:24     ` Frank Ch. Eigler
  0 siblings, 1 reply; 8+ messages in thread
From: Naren chandru @ 2007-07-12 14:13 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: systemtap

Frank,
Thanks for the quick reply.

>"Frank Ch. Eigler" <fche@redhat.com> wrote:
>
> > [...]  Now I am trying to build it for ARM
> architecture. I don't
> > know how to cross compile systemtap for ARM
> architecture. [...]
> 
> If you mean building a systemtap binary that will
> run on an ARM host
> (and thus run a native ARM compiler to build the
> modules), this is how
> it should work:
> 
> PATH=...path.to.arm.toolchain..:$PATH .../configure
> --host=CONFIG_TRIPLET ...
> 
> However, this breaks for a few different reasons. 
> One of them is the
> missing passing down of "--host" to a bundled
> elfutils build, which is
> the likely configuration for a cross tool.  There
> are some other
> obstacles.  But in principle, it should be workable.
> 

I have started the compilation of systemtap src in
native ARM compiler. 

Source details:
- elfutils-0.128 with elfutils-portability.patch
applied.
- systemtap-20070630.tar.bz2 snapshot.

I have compiled the "src" with following commands
 
 # tar -xvjf systemtap-20070630.tar.bz2
 # cd src
 # ./configure  
--with-elfutils=/home/naren/elfutils-0.128 
 # make all check

I got the following error:

r -Wunused -Wextra -ffunction-sections -g -O2 -MT
xmalloc.o -MD -MP -MF .deps/xmalloc.Tpo -c -o
xmalloc.o /home/naren/elfutils-0.128/lib/xmalloc.c
cc1: warnings being treated as errors
/home/naren/elfutils-0.128/lib/xmalloc.c: In function
'xmalloc':
/home/naren/elfutils-0.128/lib/xmalloc.c:51: warning:
implicit declaration of function 'gettext'
/home/naren/elfutils-0.128/lib/xmalloc.c:51: warning:
incompatible implicit declaration of built-in function
'gettext'
/home/naren/elfutils-0.128/lib/xmalloc.c: In function
'xcalloc':
/home/naren/elfutils-0.128/lib/xmalloc.c:65: warning:
incompatible implicit declaration of built-in function
'gettext'
/home/naren/elfutils-0.128/lib/xmalloc.c: In function
'xrealloc':
/home/naren/elfutils-0.128/lib/xmalloc.c:79: warning:
incompatible implicit declaration of built-in function
'gettext'
make[3]: *** [xmalloc.o] Error 1
make[3]: Leaving directory
`/home/naren/src/build-elfutils/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/naren/src/build-elfutils'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/home/naren/src/build-elfutils'
make: *** [stamp-elfutils] Error 2


- Naren




		
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

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

* Re: Systemtap source compile for ARM arch
  2007-07-12 14:13   ` Naren chandru
@ 2007-07-12 17:24     ` Frank Ch. Eigler
  2007-07-31 13:48       ` Systemtap hello world error with ARM Naren chandru
  0 siblings, 1 reply; 8+ messages in thread
From: Frank Ch. Eigler @ 2007-07-12 17:24 UTC (permalink / raw)
  To: Naren chandru; +Cc: systemtap

Hi -

On Thu, Jul 12, 2007 at 09:31:49AM +0100, Naren chandru wrote:
> I have started the compilation of systemtap src in
> native ARM compiler. 

OK.

> /home/naren/elfutils-0.128/lib/xmalloc.c: In function
> 'xmalloc':
> /home/naren/elfutils-0.128/lib/xmalloc.c:51: warning:
> implicit declaration of function 'gettext'
> [...]

Maybe your <libintl.h> is somehow incompatible with elfutils.

- FChE

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

* Systemtap hello world error  with ARM
  2007-07-12 17:24     ` Frank Ch. Eigler
@ 2007-07-31 13:48       ` Naren chandru
  0 siblings, 0 replies; 8+ messages in thread
From: Naren chandru @ 2007-07-31 13:48 UTC (permalink / raw)
  To: systemtap


Hi all,

I have cross compiled systemtap for ARM arch by
following method

During "Make all check" I got error

"/usr/include/fts.h:41:3: error: #error "<fts.h>
cannot be used with -D_FILE_OFFSET_BITS==64"

I added #undef __USE_FILE_OFFSET64 to 
linux-kernel-module.c in elfutils

also I did

 sed -i /ifndef/s/PACKAGE/PACKAGE_NAME/
libdwfl/libdwflP.h

But I got the same error again and I commented the
following lines in "/usr/include/fts.h" and continued
the compilation

-----------------------
/* The fts interface is incompatible with the LFS
interface which
   transparently uses the 64-bit file access
functions.  */
//#ifdef __USE_FILE_OFFSET64
//# error "<fts.h> cannot be used with
-D_FILE_OFFSET_BITS==64"
//#endif
-----------------------

Then I struck with error

"cannot find -lglib-2.0 collect2: ld returned 1 exit
status"

I have installed libglib-2.0 and continued the
compilation 

Again I struck with error

"src/runtime/staprun/relay.c:94: undefined reference
to `ppoll'"

I am using glibc 2.5 eventhough I got above error
and edited the src/runtime/staprun/relay.c file 
and compiled systemtap successfully and installed it
in OMAP ARM target.

In OMAP ARM target I have executed the following hello
world test and I got the following error.

# stap -v -ve 'probe begin { log("hello world") exit
() }'

ERROR 1:
=========
make: Entering directory
`/usr/src/kernel/Linux-2.6.22.1'
test -e include/linux/autoconf.h -a -e
include/config/auto.conf || (            \
echo;                                                 
         \
echo "  ERROR: Kernel configuration is invalid.";     
         \
echo "         include/linux/autoconf.h or
include/config/auto.conf are missing.";      \
echo "         Run 'make oldconfig && make prepare' on
kernel src to fix it.";  \
echo;                                                 
         \
/bin/false)
mkdir -p /tmp/stapwATnki/.tmp_versions
rm -f /tmp/stapwATnki/.tmp_versions/*

ERROR:2
=======
In file included from
/tmp/stapwATnki/stap_3c82b5f3ff7e56944d4563ca9f446a02_372.c:43:
usr/share/systemtap/runtime/regs.c: In function
'_stp_print_regs':
usr/share/systemtap/runtime/regs.c:225: warning:
implicit declaration of function 'condition_codes'
make[1]: ***
[/tmp/stapwATnki/stap_3c82b5f3ff7e56944d4563ca9f446a02_372.o]
Error 1
make: *** [_module_/tmp/stapwATnki] Error 2
make: Leaving directory
`/usr/src/kernel/Linux-2.6.22.1'
Pass 4: compiled C into
"stap_3c82b5f3ff7e56944d4563ca9f446a02_372.ko" in
22650usr/5030sys/33030real ms.
Pass 4: compilation failed.  Try again with more '-v'
(verbose) options.
Running rm -rf /tmp/stapwATnki

I don't know how to proceed further and to rectify the
above errors.Can any one tell me how to rectify above
error and also to execute the hello world in arm
target.

Thanks,
Naren.



      5, 50, 500, 5000. Store N number of mails in your inbox. Go to http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html

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

end of thread, other threads:[~2007-07-31  9:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-11  8:25 Systemtap source compile for ARM arch Naren chandru
2007-07-11 15:33 ` Eugene Teo
2007-07-11 16:36   ` Eugene Teo
2007-07-11 20:34   ` Anderson Lizardo
2007-07-11 17:02 ` Frank Ch. Eigler
2007-07-12 14:13   ` Naren chandru
2007-07-12 17:24     ` Frank Ch. Eigler
2007-07-31 13:48       ` Systemtap hello world error with ARM Naren chandru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).