Re: Question about compiling oprofile

William Cohen <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On 02/16/2016 07:54 PM, Wei-Fan Chiang wrote:
> Hello Will, 
> 
> Here are some information about the environment I am using oprofile: 
> 
> OS: Ubuntu 12.04 
> CPU: Intel Xeon E5645 
> GCC and G++ verison: 4.8.1 
> 
> Regards, 
> - Wei-Fan 

Hi,

I am wondering if some missing package might be causing this issue.  I found someone has been able to build oprofile on ubuntu 12.04, but it isn't clear which version he was building:

https://geekwentfreak-raviteja.rhcloud.com/blog/2012/10/08/installing-and-using-oprofiler-in-ubuntu-12-04/

It looks like oprofile-0.9.9 and oprofile-1.0.0 has been successfully build on newer versions of ubuntu:

https://launchpad.net/ubuntu/+source/oprofile/1.0.0-0ubuntu3/+build/6459971
https://launchpad.net/ubuntu/trusty/+package/oprofile


It looks like binutils removed the PARAMS for binutils-2.25:

http://fossies.org/diffs/binutils/2.24_vs_2.25/include/libiberty.h-diff.html

Is it possible to get a newer version of binutils on the machine or edit libiberty.h remove the PARAMS fro the declartions of expandargv and writeargv?

-Will

> 
> 2016-02-16 16:02 GMT-07:00 William Cohen <[email protected] <mailto:[email protected]>>:
> 
>     On 02/16/2016 03:09 PM, Wei-Fan Chiang wrote:
>     > Hello sir,
>     >
>     > My name is Wei-Fan Chiang, and I am currently a graduate student of University of Utah.
>     >
>     > I tried to compile oprofile (the version on github, v1.1, and v1.0) but encountered the following error message:
>     >
>     > ========
>     > g++ -DHAVE_CONFIG_H -I. -I..  -I ../libutil -I ../libop -I ../libpp   -W -Wall -fno-common -ftemplate-depth-50 -g -O2 -MT bfd_support.o -MD -MP -MF .deps/bfd_support.Tpo -c -o bfd_support.o bfd_support.cpp
>     > In file included from ../libutil/op_libiberty.h:27:0,
>     >                  from bfd_support.cpp:20:
>     > /usr/include/libiberty.h:88:24: error: expected initializer before ‘PARAMS’
>     >  extern void expandargv PARAMS ((int *, char ***));
>     >                         ^
>     > /usr/include/libiberty.h:92:22: error: expected initializer before ‘PARAMS’
>     >  extern int writeargv PARAMS ((char **, FILE *));
>     >                       ^
>     > ========
>     >
>     > Could you please help me resolve this problem?
>     >
>     > Thanks.
>     >
>     > - Wei-Fan
> 
>     Hi,
> 
>     It would be useful to know what architecture and linux distribution you are attempting to build oprofile on.The version of /usr/include/libiberty.h on RHEL 7 and Fedora 23 do not have PARAMS in the declaration of expandargv or writeargv.
> 
>     Looking around for libiberty.h and PARAMS turned up where the PARAMS needed to be defined.
> 
>     https://gcc.gnu.org/ml/gcc-patches/2004-03/msg00125.html
> 
>     Also what compiler is being used to build oprofile? I could imagine a case where PARAMS isn't getting set due the compiler being used.
> 
>     -Will
> 
> 
> 


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.