Error on compile Glibc 2.34 (32 bit) on 64 bit

Miguel Bernal Marin miguel.bernal@zapopan.tecmm.edu.mx
Thu Jun 30 23:41:41 GMT 2022


Hi,

I'm trying to build a 32 bit glibc 2.34 (Centos Stream 9 GLIBC),
using a 64 bit OS.

I do "rpmbuild -ba SPECS/glibc.spec --target i686", which give me
the following error:

make[2]: Entering directory '/workspace/rpmbuild/BUILD/glibc-2.34/csu'                                                                                        
gcc ../sysdeps/i386/start.S -c     -I../include -I/workspace/rpmbuild/BUILD/glibc-2.34/build-i686-redhat-linux/csu  -I/workspace/rpmbuild/BUILD/glibc-2.34/bui
ld-i686-redhat-linux  -I../sysdeps/unix/sysv/linux/i386/i686  -I../sysdeps/i386/i686/nptl  -I../sysdeps/unix/sysv/linux/i386  -I../sysdeps/unix/sysv/linux/x86
/include -I../sysdeps/unix/sysv/linux/x86  -I../sysdeps/x86/nptl  -I../sysdeps/i386/nptl  -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux  -
I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix/i386  -I../sysdeps/unix  -I../sysd
eps/posix  -I../sysdeps/i386/i686/fpu  -I../sysdeps/i386/i686  -I../sysdeps/i386/fpu  -I../sysdeps/x86/fpu  -I../sysdeps/i386  -I../sysdeps/x86/include -I../s
ysdeps/x86  -I../sysdeps/wordsize-32  -I../sysdeps/ieee754/float128  -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96  -I../sysdeps/ieee754/d
bl-64  -I../sysdeps/ieee754/flt-32  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/11/inc
lude -isystem /usr/include -D_LIBC_REENTRANT -include /workspace/rpmbuild/BUILD/glibc-2.34/build-i686-redhat-linux/libc-modules.h -DMODULE_NAME=libc -include 
../include/libc-symbols.h  -DPIC     -DTOP_NAMESPACE=glibc -DASSEMBLER -I/workspace/rpmbuild/BUILD/glibc-2.34/build-i686-redhat-linux/csu/. -DGAS_SYNTAX -fcf-
protection -include cet.h -g -Wa,--generate-missing-build-notes=yes -Werror=undef -Wa,--noexecstack  -Wa,-mtune=i686 -o /workspace/rpmbuild/BUILD/glibc-2.34/b
uild-i686-redhat-linux/csu/start.o -MD -MP -MF /workspace/rpmbuild/BUILD/glibc-2.34/build-i686-redhat-linux/csu/start.o.dt -MT /workspace/rpmbuild/BUILD/glibc
-2.34/build-i686-redhat-linux/csu/start.o                                                                                                                     
../sysdeps/i386/start.S: Assembler messages:                                                                                                                  
../sysdeps/i386/start.S:59: Error: bad register expression                                                                                                    
../sysdeps/i386/start.S:67: Error: invalid instruction suffix for `pop'                                                                                       
../sysdeps/i386/start.S:75: Error: invalid instruction suffix for `push'                                                                                      
../sysdeps/i386/start.S:80: Error: invalid instruction suffix for `push'                                                                                      
../sysdeps/i386/start.S:82: Error: invalid instruction suffix for `push'                                                                                      
../sysdeps/i386/start.S:91: Error: invalid instruction suffix for `push'                                                                                      
../sysdeps/i386/start.S:92: Error: invalid instruction suffix for `push'                                                                                      
../sysdeps/i386/start.S:94: Error: invalid instruction suffix for `push'
../sysdeps/i386/start.S:95: Error: invalid instruction suffix for `push'
../sysdeps/i386/start.S:105: Error: relocated field and relocation type differ in signedness
../sysdeps/i386/start.S:106: Error: invalid instruction suffix for `push'
make[2]: *** [/workspace/rpmbuild/BUILD/glibc-2.34/build-i686-redhat-linux/sysd-rules:653: /workspace/rpmbuild/BUILD/glibc-2.34/build-i686-redhat-linux/csu/st
art.o] Error 1


I could see -Wa,-mtune=i686, but do not know if a -m32 is missing.

Any advice?

-- 
Thanks,

Miguel Bernal Marin           Instituto Tecnológico José Mario Molina 
http://zapopan.tecmm.edu.mx   Pasquel y Henriquez      Campus Zapopan


More information about the Libc-help mailing list