I'm trying to compile a 32-bit C application on RHEL 7 64-bit using gcc 4.8. I'm getting a compiler error /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory. What do I need to do to get 32 bit apps compiled and linked?
            Asked
            
        
        
            Active
            
        
            Viewed 2.4k times
        
    15
            
            
        1 Answers
32
            To get RHEL 7 64-bit to compile gcc 4.8 32-bit programs, you'll need to do two things.
- Make sure all the 32-bit gcc 4.8 development tools are completely installed: - sudo yum install glibc-devel.i686 libgcc.i686 libstdc++-devel.i686 ncurses-devel.i686
- Compile programs using the -m32 flag - gcc pgm.c -m32 -o pgm
 
    
    
        BSalita
        
- 8,420
- 10
- 51
- 68
- 
                    You might also want to mark this answer as a solution to the question. – CristiFati Dec 18 '18 at 00:46
