Re: Question about compiling oprofile

William Cohen <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[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
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.