Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 64159 - valgrind-2.2.0 Makefile generation problem $(prefix)
Summary: valgrind-2.2.0 Makefile generation problem $(prefix)
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Maurice van der Pot (RETIRED)
Depends on:
Reported: 2004-09-15 11:48 UTC by Keef Aragon
Modified: 2005-01-18 14:34 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Keef Aragon 2004-09-15 11:48:22 UTC
while emerging valgrind-2.2.0,

Makefile gets generated:

------- coregrind/Makefile:207 ---------

bindir = ${exec_prefix}/bin
build = i686-pc-linux
build_alias =
build_cpu = i686
build_os = linux
build_vendor = pc
datadir = /usr/share
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host_alias = i686-pc-linux-gnu
host_cpu = i686
host_os = linux-gnu
host_vendor = pc
includedir = ${prefix}/include
infodir = /usr/share/info
install_sh = /var/tmp/portage/valgrind-2.2.0/work/valgrind-2.2.0/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = /var/lib
mandir = /usr/share/man
mkdir_p = mkdir -p -- .
oldincludedir = /usr/include
prefix = /usr

note that prefix is defined way after it's used.  This is causing VG_LIBDIR to be generated as the temp. portage workdir + /usr/lib...


This appears to only be in the coregrind subdir of the valgrind build.

Reproducible: Always
Steps to Reproduce:
1. emerge =valgrind-2.2.0

Actual Results:  
build succeed but application can't run:

valgrind: failed to load
/var/tmp/portage/valgrind-2.2.0/image//usr/lib/valgrind/stage2: No such file or

Expected Results:  
build a Makefile with a prefix defined *before* it was used thus using the
proper prefix rather than the current directory.  Ultimately, it should have
generated a valgrind binary that will work.

Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.4.1, glibc-,
System uname: 2.6.5-aa5 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 1.80GHz
Gentoo Base System version 1.5.3
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe"
FEATURES="autoaddcvs ccache sandbox"
USE="X acpi aim alsa apache2 apm arts audiofile avi berkdb bitmap-fonts bonobo
canna cjk crypt cups doc dvd encode esd evo fbcon foomaticdb gd gdbm gif gnome
gpm gps gtk gtk2 imagemagick imap imlib innodb jpeg kde libg++ libwww mad mikmod
motif mpeg msn mysql ncurses nls oggvorbis opengl oscar oss pam pdflib perl png
python qt quicktime readline samba sdl slang spell ssl svga tcltk tcpd truetype
usb wmf x11 x86 xml xml2 xmms xorg xprint xv yahoo zlib"
Comment 1 Keef Aragon 2004-09-15 11:55:03 UTC
May well have misidentified cause of bad path.  When running make manually without portage, the path is set up fine... perhaps in a USE flag?
Comment 2 f5d8fd51ed1e804c9e8d0357e8614e0493b06e96 2004-09-15 13:26:31 UTC
emerges and runs fine for me, using it since this versions ebuild is out.
just emerged again just to be sure I'm using latest ebuild.
so I have no clue what might be going wrong for you...
Comment 3 Luca Barbato gentoo-dev 2004-09-23 06:17:38 UTC
I'm going to mark it worksforme, reopen if you experience and can reproduce the issue
Comment 4 Keef Aragon 2004-09-23 14:46:17 UTC
I resynced and re-emerged valgrind today...
same thing:

valgrind: failed to load /var/tmp/portage/valgrind-2.2.0/image//usr/lib/valgrind/stage2: No such file or directory

somewhere in the build a static path of /var/tmp/portage/valgrind-2.2.0/image/ is getting prepended onto a build parameter as that is there the files are going temporarily.

Could it be a bug which only arises with a certain USE flag?
Comment 5 Maurice van der Pot (RETIRED) gentoo-dev 2004-10-22 17:10:00 UTC
Could you provide the invocation command line of configure?

You can get to it by interrupting the emerge and checking near the top of the following file:
Comment 6 Maurice van der Pot (RETIRED) gentoo-dev 2005-01-06 11:34:20 UTC
I really need more info to do something about this.
Comment 7 Keef Aragon 2005-01-18 14:34:46 UTC
Not sure what the issue was but since 2.2.0-r1, this no longer seems to be an issue.