Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

oprofile Log


Commit Date  
[8f12d5] by Maynard Johnson Maynard Johnson

Fix configure to not alter user variables and remove non-working --with-gcc option

The configure script for oprofile had a few places
where user variables were being altered in contradiction
to the GNU Automake manual. See the following URL for details:

http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html

In brief, user variables are those listed under "Some influential
environment variables" section of the output from 'configure --help'.
These are variables which the user may set prior to invoking configure,
and thus, the configure script should not alter them. This patch
makes use of new internal variables (e.g., OP_LDFLAGS and OP_CPPFLAGS),
which did unfortunately create quite a ripple effect with the Makefile.am
files. But this was unavoidable in order to correct this error.

Additionally, the '--with-gcc' option does not work anymore because
the generated configure script runs the AC_PROG_CC before processing the
"--with-gcc" option, so it fails to find a compiler. Unsure of when
this stopped working (assume it must have worked in 2005 when it was
initially added), but even fairly old distros (e.g., SLES 10) with
autoconf version 2.59 do not process this option as we would want.
If users wish to configure oprofile to use an alternate compiler,
they should pass the compiler pathnames on the configure command line, thusly:
./configure CC=/my-gcc-install/bin/gcc CXX=/my-gcc-instal/g++

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-07-13 17:44:49 Tree
[0fa5fc] by Maynard Johnson Maynard Johnson

Add #include "config.h" before bfd.h for perf-events branch

While building oprofile against a current CVS snapshot of binutils,
I received the following error:

-----------------------------------------
make[2]: Entering directory `/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent'
/bin/sh ../libtool --tag=CC --mode=compile /opt/at5.0-5-rc1/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent -fPIC -I /home/cseo/at5.0/at5.0-5/src/oprofile/libop -I /home/cseo/at5.0/at5.0-5/src/oprofile/libutil -g -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c -o libopagent_la-opagent.lo `test -f 'opagent.c' || echo '/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent/'`opagent.c
libtool: compile: /opt/at5.0-5-rc1/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent -fPIC -I /home/cseo/at5.0/at5.0-5/src/oprofile/libop -I /home/cseo/at5.0/at5.0-5/src/oprofile/libutil -g -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c opagent.c -fPIC -DPIC -o .libs/libopagent_la-opagent.o
In file included from opagent.c:63:0:
/opt/at5.0-5-rc1/include/bfd.h:37:2: error: #error config.h must be included before this header
-----------------------------------------

I opened a bug against binutils for this (see http://sourceware.org/bugzilla/show_bug.cgi?id=14243),
but the rationale for this error was explained to me thusly:

"This is a correctness issue. bfd.h and the headers that bfd.h #include test at
least one HAVE_* macro. So you need to include the file that defines those
HAVE_* macros before bfd.h. [sic] It is a really good idea to always include
config.h (or sysdep.h or alloca-conf.h that include config.h) before any other
files, including system headers."

This patch is a minimal patch that addresses the build failure with binutils,
ensuring that our config.h is #include'd before bfd.h

Since my work on the perf-events branch has involved testing on newer
binutils, I want to get this fix committed into the perf-events branch now
so I don't need to be adding a private patch for those times when I build
with new binutils.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-15 18:55:33 Tree
[08d917] by Maynard Johnson Maynard Johnson

Add #include "config.h" before bfd.h

While building oprofile against a current CVS snapshot of binutils,
I received the following error:

-----------------------------------------
make[2]: Entering directory `/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent'
/bin/sh ../libtool --tag=CC --mode=compile /opt/at5.0-5-rc1/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent -fPIC -I /home/cseo/at5.0/at5.0-5/src/oprofile/libop -I /home/cseo/at5.0/at5.0-5/src/oprofile/libutil -g -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c -o libopagent_la-opagent.lo `test -f 'opagent.c' || echo '/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent/'`opagent.c
libtool: compile: /opt/at5.0-5-rc1/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent -fPIC -I /home/cseo/at5.0/at5.0-5/src/oprofile/libop -I /home/cseo/at5.0/at5.0-5/src/oprofile/libutil -g -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c opagent.c -fPIC -DPIC -o .libs/libopagent_la-opagent.o
In file included from opagent.c:63:0:
/opt/at5.0-5-rc1/include/bfd.h:37:2: error: #error config.h must be included before this header
-----------------------------------------

I opened a bug against binutils for this (see http://sourceware.org/bugzilla/show_bug.cgi?id=14243),
but the rationale for this error was explained to me thusly:

"This is a correctness issue. bfd.h and the headers that bfd.h #include test at
least one HAVE_* macro. So you need to include the file that defines those
HAVE_* macros before bfd.h. [sic] It is a really good idea to always include
config.h (or sysdep.h or alloca-conf.h that include config.h) before any other
files, including system headers."

This patch is a minimal patch that addresses the build failure with binutils,
ensuring that our config.h is #include'd before bfd.h

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-15 15:06:52 Tree
[9529ae] by William Cohen William Cohen

Convert the .cvsignore files into .gitignore files.

2011-02-15 19:50:17 Tree
[4464a1] by Maynard johnson Maynard johnson

Move code from bfddefines to libopagent to fix cross-compile error

2008-07-03 16:20:17 Tree
[af7e83] by John Levon John Levon

Split changelog, fix cvsignore

2008-04-28 21:54:40 Tree
[8a6f6b] by Daniel Hansel Daniel Hansel

JIT support (for profiling Java applications) added

2008-04-28 21:23:26 Tree