15

I am trying to install roccc 2.0. I have installed required packages. Now while installing it, it is giving me this error:

/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

I searched for gnu/stubs-32.h and came to know, for Linux 64-bit its in glibc-devel and for Linux 32-bit, its in libc6-dev-i386.

I am using Linux 32-bit: i386 GNU/Linux, but couldn't get the lib required to resolve this error.

Can somebody please help me out?

Kevdog777
  • 908
  • 7
  • 20
  • 43
user2931
  • 151
  • 1
  • 1
  • 5

6 Answers6

15

If your Linux distro is Redhat based (Fedora/CentOS/RHEL):

yum install glibc-devel.i686

References

slm
  • 15,396
  • 12
  • 109
  • 124
Subba Reddy
  • 431
  • 5
  • 6
3

Header file gnu/stubs-32.h is under /usr/include/i386-linux-gnu/ but the install script tries to find it in /usr/include/, try this quick fix to complete the installation:

sudo ln -s /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/gnu/stubs-32.h

After installation is finished, you can delete the link.

gfour
  • 959
  • 6
  • 9
1

The package name keeps on changing, just do a

yum list glibc-devel

to find out current package for 32 bit. In my case it only listed 2 packages one for 32 bit and one for 64 bit. I just installed the 32 bit using

yum install glibc-devel.i686
amarnath chatterjee
  • 1,942
  • 16
  • 15
0

Install 'glibc-devel' package, or whatever it called in your distro. You may also need to install ia32-libs lib32z1-dev lib32bz2-dev (names could be different in your distro).

Oleksandr Kravchuk
  • 5,963
  • 1
  • 20
  • 31
  • what i have done is: command1: apt-file search stubs-32.h output:libc6-dev: /usr/include/gnu/stubs-32.h command2:apt-get install libc6-dev but still there is same problem... – user2931 Apr 19 '12 at 12:51
0

The script is trying to get stubs-32.h from /usr/include/ where it is not found. To solve this you have to add an "include" path (by default it is /usr/include) like this:

C_INCLUDE_PATH=/usr/include/i386-linux-gnu/
export C_INCLUDE_PATH

OR

export C_INCLUDE_PATH=/usr/include/$(gcc -print-multiarch)

You can visit Error "gnu/stubs-32.h: No such file or directory" while compiling Nachos source code for additional reference.

slm
  • 15,396
  • 12
  • 109
  • 124
Aman
  • 1,627
  • 13
  • 19
0

If on a Red Hat distro such as Fedora/CentOS/RHEL you can do the following to find out what package provides a given file:

$ repoquery -qf */stubs-32.h
glibc-devel-0:2.17-260.el7.i686

And then install it:

$ sudo yum install -y glibc-devel-0:2.17-260.el7.i686
slm
  • 15,396
  • 12
  • 109
  • 124