public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Re: Using embedded c and including header files
@ 2010-08-12  6:03 Wenji Huang
       [not found] ` <AANLkTi=Sz0j7EYW_v_ZY7Z8GKQE5=UH-r-pgt1o6KEAd@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Wenji Huang @ 2010-08-12  6:03 UTC (permalink / raw)
  To: tbscope; +Cc: systemtap

>llo,
>
>I'm experimenting with embedding c in my scripts but I have a problem.
>
>When I add an include file, it doesn't find it. The compiler does not
>look in /usr/include

This is for user space program.
>I searched through the manual of gcc and set a couple of environment
>variables (CPATH, ...), but this didn't work either.
>
>Is it possible to tell the compiler where to look for headers? I don't
>see an option in stap itself to set these directories. I'm using
>systemtap 1.2 though.

The standard searching path is your kernel module building path, like

/lib/modules/2.6.18-8.el5/build/include

put your file under that, or modify Makefile 

Regards,
Wenji

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

* Fwd: Using embedded c and including header files
       [not found] ` <AANLkTi=Sz0j7EYW_v_ZY7Z8GKQE5=UH-r-pgt1o6KEAd@mail.gmail.com>
@ 2010-08-12  6:23   ` Tim Beaulen
  0 siblings, 0 replies; 4+ messages in thread
From: Tim Beaulen @ 2010-08-12  6:23 UTC (permalink / raw)
  To: systemtap

---------- Forwarded message ----------
From: Tim Beaulen <tbscope@gmail.com>
Date: Thu, Aug 12, 2010 at 8:22 AM
Subject: Re: Using embedded c and including header files
To: Wenji Huang <wenji.huang@oracle.com>


On Thu, Aug 12, 2010 at 8:02 AM, Wenji Huang <wenji.huang@oracle.com> wrote:
>>llo,
>>
>>I'm experimenting with embedding c in my scripts but I have a problem.
>>
>>When I add an include file, it doesn't find it. The compiler does not
>>look in /usr/include
>
> This is for user space program.
>>I searched through the manual of gcc and set a couple of environment
>>variables (CPATH, ...), but this didn't work either.
>>
>>Is it possible to tell the compiler where to look for headers? I don't
>>see an option in stap itself to set these directories. I'm using
>>systemtap 1.2 though.
>
> The standard searching path is your kernel module building path, like
>
> /lib/modules/2.6.18-8.el5/build/include
>
> put your file under that, or modify Makefile
>
> Regards,
> Wenji
>
>




Thanks, I'll try that.

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

* Re: Using embedded c and including header files
  2010-08-12  5:40 Tim Beaulen
@ 2010-08-12 18:02 ` Frank Ch. Eigler
  0 siblings, 0 replies; 4+ messages in thread
From: Frank Ch. Eigler @ 2010-08-12 18:02 UTC (permalink / raw)
  To: Tim Beaulen; +Cc: systemtap

Tim Beaulen <tbscope@gmail.com> writes:

> I'm experimenting with embedding c in my scripts but I have a problem.
> When I add an include file, it doesn't find it. The compiler does not
> look in /usr/include [...]

We don't have a good story with respect to user-space headers being
pulled into embedded-C.  What do you need from there that @cast(),
using a user-space header path as its third argument, can't get at?

- FChE

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

* Using embedded c and including header files
@ 2010-08-12  5:40 Tim Beaulen
  2010-08-12 18:02 ` Frank Ch. Eigler
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Beaulen @ 2010-08-12  5:40 UTC (permalink / raw)
  To: systemtap

Hello,

I'm experimenting with embedding c in my scripts but I have a problem.

When I add an include file, it doesn't find it. The compiler does not
look in /usr/include
I searched through the manual of gcc and set a couple of environment
variables (CPATH, ...), but this didn't work either.

Is it possible to tell the compiler where to look for headers? I don't
see an option in stap itself to set these directories. I'm using
systemtap 1.2 though.

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

end of thread, other threads:[~2010-08-12 18:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-12  6:03 Using embedded c and including header files Wenji Huang
     [not found] ` <AANLkTi=Sz0j7EYW_v_ZY7Z8GKQE5=UH-r-pgt1o6KEAd@mail.gmail.com>
2010-08-12  6:23   ` Fwd: " Tim Beaulen
  -- strict thread matches above, loose matches on Subject: below --
2010-08-12  5:40 Tim Beaulen
2010-08-12 18:02 ` Frank Ch. Eigler

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).