[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-users] Fwd: [Beginners question]- Compilation error while trying user program from dom0
Sorry, in my case, my user application is running on the domO. -------- Original Message --------Subject: [Xen-users] [Beginners question]- Compilation error while trying user program from domU Date: Thu, 03 Jan 2013 10:12:12 +0100 From: MAYAP KAMGA Christine larissa <christine.mayapkamga@xxxxxxxxxxx> To: <xen-users@xxxxxxxxxxxxx> Hello I'm having almost the same problem as below.In my case, i want to use "cpufreq.h" and percpu.h libraries to get current processor frequency. **This is my sample program** #include <acpi/cpufreq/cpufreq.h> #include <asm/percpu.h> static unsigned int get_my_cur_freq(int cpuid) { struct cpufreq_policy *policy; policy = per_cpu(cpufreq_cpu_policy, cpuid); if (!policy) return 0; else return policy->cur; }I linked the necesary librairy, but while executing my makefile, i having the followinf error: XenRoot/xen/include/acpi/cpufreq/processor_perf.h:61: error: expected declaration specifiers or â...â before âcpufreq_statistic_dataâ XenRoot/xen/include/acpi/cpufreq/processor_perf.h:61: warning: data definition has no type or storage class XenRoot/xen/include/acpi/cpufreq/processor_perf.h:61: warning: type defaults to âintâ in declaration of âDECLARE_PER_CPUâ In file included from readCurrentCpuCounters.c:6:XenRoot/xen/include/acpi/cpufreq/cpufreq.h:23: warning: data definition has no type or storage class XenRoot/xen/include/acpi/cpufreq/cpufreq.h:23: warning: type defaults to âintâ in declaration of âDECLARE_PER_CPUâ XenRoot/xen/include/acpi/cpufreq/cpufreq.h:23: warning: parameter names (without types) in function declaration XenRoot/xen/include/acpi/cpufreq/cpufreq.h:25: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âcpufreq_verboseâ XenRoot/xen/include/acpi/cpufreq/cpufreq.h:62: error: expected declaration specifiers or â...â before âcpufreq_cpu_policyâ XenRoot/xen/include/acpi/cpufreq/cpufreq.h:62: warning: data definition has no type or storage class XenRoot/xen/include/acpi/cpufreq/cpufreq.h:62: warning: type defaults to âintâ in declaration of âDECLARE_PER_CPUâ XenRoot/xen/include/acpi/cpufreq/cpufreq.h:62: error: conflicting types for âDECLARE_PER_CPUâ XenRoot/xen/include/acpi/cpufreq/processor_perf.h:61: note: previous declaration of âDECLARE_PER_CPUâ was here XenRoot/xen/include/acpi/cpufreq/cpufreq.h: In function âcpufreq_register_driverâ: XenRoot/xen/include/acpi/cpufreq/cpufreq.h:164: error: âEINVALâ undeclared (first use in this function) XenRoot/xen/include/acpi/cpufreq/cpufreq.h:164: error: (Each undeclared identifier is reported only once XenRoot/xen/include/acpi/cpufreq/cpufreq.h:164: error: for each function it appears in.) XenRoot/xen/include/acpi/cpufreq/cpufreq.h:167: error: âEBUSYâ undeclared (first use in this function) XenRoot/xen/include/acpi/cpufreq/cpufreq.h: In function âcpufreq_unregister_driverâ: XenRoot/xen/include/acpi/cpufreq/cpufreq.h:177: error: âEINVALâ undeclared (first use in this function) readCurrentCpuCounters.c: In function âget_cur_freq_on_cpuâ:readCurrentCpuCounters.c:26: error: âper_cpu__cpufreq_cpu_policyâ undeclared (first use in this function) readCurrentCpuCounters.c:26: warning: type defaults to âintâ in declaration of âtype nameâ readCurrentCpuCounters.c:26: error: invalid type argument of âunary *â (have âintâ) make: *** [readCurrentCpuCounters.o] Erreur 1 Please, what can i do to solve this issue. PS: i'm using Xen in his 4.1.2 version. Thanks in advance On Wed, 2 Jan 2013 22:02:05 -0800 (PST), Lakshman Jayaraju wrote: Hi all,My aim is to invoke hypercalls from programs inside guest domains. So inthis regard I wrote a sample program as below that invokes a function(xc_domain_getinfo) declared in xenctrl.h. *Sample Program:* #include<stdio.h> #include<xenctrl.h> int main() { printf("Attempt to invoke hypercall!!!\n"); int handle,rc; xc_dominfo_t *info; handle = xc_interface_open(); printf(Ãcquired handle :%d\n",handle); rc = xc_domain_getinfo(handle,3,1,info); printf(" The returned value is :%d\n",rc); return 0; }I linked xenctrl library from dom0, but I am getting compilation error saying *xenctrl.h: No such file or directory*. Then as per the error message I tried copying(by downloading source) required header files as and when it says missing header files name on consecutive compilation. But I ended upwith path conflicts and couldn't succeed in compiling. *My doubts:** Do I need to copy header files manually into guest domain? - I tried copying header files required as per compilation error msgs but I ended upwith conflicts.* Any pointers to detailed guide to invoke hypercalls from guest domains??Thanks, Lakshman -- View this message in context: http://xen.1045712.n5.nabble.com/Beginners-question-Compilation-error-while-trying-user-program-from-domU-tp5713299.html Sent from the Xen - User mailing list archive at Nabble.com. _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |