Bug 188136 - can't compile valgrind: missing gnu/stubs-32.h header file
Summary: can't compile valgrind: missing gnu/stubs-32.h header file
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc-kernheaders
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Woodhouse
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-04-06 11:05 UTC by kloczek
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-04-06 11:11:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description kloczek 2006-04-06 11:05:45 UTC
I can't compile valgrind on x86_64.
Probably gnu/stubs-{32,64}.h is missing in glibc-headers package.

From valgrind build log:

make[3]: Entering directory
`/home/users/prac/nd/kloczek/rpm/BUILD/valgrind-3.1.1/coregrind'
if gcc -B /home/users/prac/nd/kloczek/rpm/BUILD/valgrind-3.1.1/libgcc/
-DHAVE_CONFIG_H -I. -I. -I..  -I../coregrind -I.. -I../coregrind/x86
-I../coregrind/linux -I../coregrind/x86-linux -I../include -I../VEX/pub
-DVG_PLATFORM="\"x86-linux\"" -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1
-DVG_LIBDIR="\"/usr/lib64/valgrind"\"   -m32  -O -g -Wmissing-prototypes
-Winline -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes
-Wmissing-declarations -Wno-long-long -Wno-pointer-sign
-Wdeclaration-after-statement -MT libcoregrind_x86_linux_a-m_commandline.o -MD
-MP -MF ".deps/libcoregrind_x86_linux_a-m_commandline.Tpo" -c -o
libcoregrind_x86_linux_a-m_commandline.o `test -f 'm_commandline.c' || echo
'./'`m_commandline.c; \
then mv -f ".deps/libcoregrind_x86_linux_a-m_commandline.Tpo"
".deps/libcoregrind_x86_linux_a-m_commandline.Po"; else rm -f
".deps/libcoregrind_x86_linux_a-m_commandline.Tpo"; exit 1; fi
In file included from /usr/include/features.h:352,
                 from /usr/include/setjmp.h:26,
                 from pub_core_basics.h:63,
                 from m_commandline.c:31:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

[kloczek@boss SPECS]$ rpm -qf /usr/include/gnu/stubs.h
glibc-headers-2.4-5
[kloczek@boss SPECS]$ cat /usr/include/gnu/stubs.h
/* This file selects the right generated file of `__stub_FUNCTION' macros
   based on the architecture being compiled for.  */

#include <bits/wordsize.h>

#if __WORDSIZE == 32
# include <gnu/stubs-32.h>
#elif __WORDSIZE == 64
# include <gnu/stubs-64.h>
#else
# error "unexpected value for __WORDSIZE macro"
#endif

But tehere is no gnu/stubs-32.h and gnu/stubs-64.h header files installed in
system resources. If valgrind build correctly on Fedora build systems this fiels
probably are installed but not from regular packages.

Comment 1 Jakub Jelinek 2006-04-06 11:11:13 UTC
If you want to build 32-bit stuff on x86-64, you obviously need to install
32-bit devel environment, i.e. glibc-devel-*.i386.rpm in addition to 64-bit one
(glibc-devel-*.x86_64.rpm).

Comment 2 kloczek 2006-04-06 13:01:44 UTC
(In reply to comment #1)
> If you want to build 32-bit stuff on x86-64, you obviously need to install
> 32-bit devel environment, i.e. glibc-devel-*.i386.rpm in addition to 64-bit one
> (glibc-devel-*.x86_64.rpm).

OK but current valgrind.spec do not inform about this.
Probably it will be good add some BuildRequires rule for clarify this on
packagin level like:

%ifarch x86_64
BuildRequires: glibc-devel.i386
%endif



Note You need to log in before you can comment on or make changes to this bug.