Bug 188136 - can't compile valgrind: missing gnu/stubs-32.h header file
can't compile valgrind: missing gnu/stubs-32.h header file
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: glibc-kernheaders (Show other bugs)
rawhide
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: David Woodhouse
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-06 07:05 EDT by kloczek
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-04-06 07:11:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description kloczek 2006-04-06 07:05:45 EDT
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 07:11:13 EDT
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 09:01:44 EDT
(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.