I found the easiest way to get all the dependencies out of the way was to attempt to install Fedora’s oprofile, oprofile-devel, and oprofile-gui through YUM. But instead of installing them, just find out their dependencies and install those.
$ sudo yum install lcms libmng qt lcms -y
checking for kernel OProfile support... yes checking whether malloc attribute is understood... no checking whether __builtin_expect is understood... yes checking for sched_setaffinity... yes checking for perfmonctl... no checking for poptGetContext in -lpopt... yes checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking libiberty.h usability... no checking libiberty.h presence... no checking for libiberty.h... no checking for cplus_demangle in -liberty... no configure: error: liberty library not found
You’ll probably hit this wall because liberty or iberty or whatever this library is known as is not part of binutils. It’s in binutils-devel. So install that.
$ sudo yum install binutils-devel -y
You should be able to configure, make, make install now. Don’t forget to specify the other options you’ll want for a custom build.
--with-binutils=dir Path to binutils installation to use --with-binutils-libname Lib dir name under binutils installation; [lib]] --with-gcc=dir Path to GCC installation to use --with-kernel-support Use 2.6 kernel (no kernel source tree required) --with-linux=dir Path to Linux source tree --with-module-dir=dir Path to module installation directory --with-java=java-home Path to Java home directory --with-extra-includes=DIR add extra include paths --with-extra-libs=DIR add extra library paths --with-target=cell-be Check BFD support for Cell Broadband Engine SPU profiling --with-x use the X Window System --with-qt-dir where the root of Qt is installed --with-qt-includes where the Qt includes are. --with-qt-libraries where the Qt library is installed.