From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8640 invoked by alias); 15 Jul 2011 20:46:00 -0000 Received: (qmail 8621 invoked by uid 22791); 15 Jul 2011 20:45:59 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Jul 2011 20:45:41 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6FKjeUd018055 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 15 Jul 2011 16:45:40 -0400 Received: from [10.11.231.236] (deploy7.rdu.redhat.com [10.11.231.236]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6FKjZWp020708 for ; Fri, 15 Jul 2011 16:45:35 -0400 Message-ID: <4E20A6EF.9010003@redhat.com> Date: Fri, 15 Jul 2011 20:46:00 -0000 From: William Cohen User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Red Hat/3.1.11-2.el6_1 Thunderbird/3.1.11 MIME-Version: 1.0 To: systemtap@sourceware.org Subject: Re: error to run systemtap in an ARM platform References: <4E1F90A8.2080000@gmail.com> <1310722941.4510.5.camel@springer.wildebeest.org> <4E209C3F.6060806@gmail.com> In-Reply-To: <4E209C3F.6060806@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q3/txt/msg00034.txt.bz2 On 07/15/2011 03:59 PM, Da Zheng wrote: > Hello Mark, > > On 07/15/11 02:42, Mark Wielaard wrote: >> Hi Da, >> >> On Thu, 2011-07-14 at 17:58 -0700, Da Zheng wrote: >>> I cross-compiled systemtap and tried to run it on an ARM platform, but >>> got the following error: >>> chronos@localhost ~ $ sudo stap --vp 01 syscalls_by_pid.stp >>> semantic error: unresolved arity-4 function: identifier >>> '_arch_ptrace_argstr' at /usr/share/systemtap/tapset/aux_syscalls.stp:2234:9 >>> source: retval=_arch_ptrace_argstr(request, pid, addr, data) >>> ^ >>> Pass 2: analyzed script: 285 probe(s), 1528 function(s), 21 embed(s), 1 >>> global(s) using 112076virt/96408res/46364shr kb, in >>> 3690usr/190sys/4041real ms. >>> Pass 2: analysis failed. Try again with another '--vp 01' option. >> We don't yet have a tapset/arm/aux_syscalls.stp version. >> Look at one of the existing tapset/*/aux_syscalls.stp >> (i386,ia64,powerpc,s390,x86_64) ones for examples how to write one. > Thanks. This has been fixed. But I got another problem. > However, my target machine doesn't have a C compiler, so I have to cross compile it. > I tried to compile my script with > $ stap -v syscalls_by_pid.stp -a arm -r /build/tegra2_seaboard/tmp/portage/sys-kernel/chromeos-kernel-9999/work/chromeos-kernel-9999/build/tegra2_seaboard -p 4 -k > > But I got the following error: > > Pass 1: parsed user script and 73 library script(s) using 38656virt/20388res/1712shr kb, in 100usr/10sys/105real ms. > Pass 2: analyzed script: 285 probe(s), 18 function(s), 23 embed(s), 1 global(s) using 159984virt/84836res/2544shr kb, in 14160usr/1890sys/4383real ms. > Pass 3: translated to C into "/tmp/stapsWo8wq/stap_23913.c" using 159984virt/87692res/5400shr kb, in 240usr/0sys/237real ms. > cc1: error: unrecognized command line option "-mlittle-endian" > cc1: error: unrecognized command line option "-mapcs" > cc1: error: unrecognized command line option "-mno-sched-prolog" > cc1: error: unrecognized command line option "-mabi=aapcs-linux" > cc1: error: unrecognized command line option "-mno-thumb-interwork" > /tmp/stapsWo8wq/stap_23913.c:1: error: bad value (armv5t) for -march= switch > /tmp/stapsWo8wq/stap_23913.c:1: error: bad value (armv5t) for -mtune= switch > make[3]: *** [/tmp/stapsWo8wq/stap_23913.o] Error 1 > make[2]: *** [_module_/tmp/stapsWo8wq] Error 2 > make[1]: *** [sub-make] Error 2 > make: *** [all] Error 2 > Pass 4: compiled C into "stap_23913.ko" in 1770usr/190sys/417real ms. > Pass 4: compilation failed. Try again with another '--vp 0001' option. > Keeping temporary directory "/tmp/stapsWo8wq" > > I use armv7a-cros-linux-gnueabi-gcc to cross compile the kernel and other software. How can I specify the compiler for cross compile? I tried to set the environment variable CC, but it doesn't work. > Any ideas? > > Thanks, > Da Hi Da, I have been doing cross compiles for the fedora arm kernel this week. You might try setting the PATH to include the path to the cross compiler if it isn't part of the normal path and then try something like: export ARCH=arm export CROSS_COMPILE=armv5tel-redhat-linux-gnueabi- make CROSS_COMPILE should be the prefix of the copmiler used for all the cross compile commands. I have made a quick wiki page at (still need to format it properly): http://sourceware.org/systemtap/wiki/SystemtapOnFedoraArm -Will