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?

0

6 Answers 6

16

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

yum install glibc-devel.i686 

References

Sign up to request clarification or add additional context in comments.

Comments

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.

Comments

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 

Comments

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).

1 Comment

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...
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.

Comments

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 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.