[SOLVED] CentOS 7.x i686 Support

Issues related to applications and software problems
Post Reply
User avatar
l2g
Posts: 9
Joined: 2015/08/14 13:04:27
Contact:

[SOLVED] CentOS 7.x i686 Support

Post by l2g » 2017/05/26 20:38:27

Mock doesn't provide a i386/32-bit configuration file for CentOS 7. I'm curious how 32-bit packages are rebuilt for this distribution as a result? For example... the package sip (python bindings to C++):

Code: Select all

# Closest i can get is a command like this (on a 64-bit system):
linux32 rpmbuild --target=i386 --rebuild SRPMS/sip-4.14.6-4.el7.src.rpm
Even the following using mock (and the provided configuration in /etc/mock/*) doesn't work:

Code: Select all

mock -v -r epel-7-x86_64 --arch=i386 \
  --resultdir=./rpms \
  --rebuild sip-4.14.6-4.el7.src.rpm
They both gets close, but eventually just spits out a bunch of errors (after building with the -m32 and -march=i386 flag):

Code: Select all

...
gcc -c -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m32 -march=x86-64 -mtune=generic -mfpmath=sse -fasynchronous-unwind-tables -O2 -Wall -W -DNDEBUG -I. -o lexer.o /builddir/build/BUILD/sip-4.14.6/sipgen/lexer.c

g++ -Wl,-z,relro  -o sip main.o transform.o gencode.o extracts.o export.o type_hints.o heap.o parser.o lexer.o 
/usr/bin/ld: i386 architecture of input file `main.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `transform.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `gencode.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `extracts.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `export.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `type_hints.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `heap.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `parser.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `lexer.o' is incompatible with i386:x86-64 output
collect2: error: ld returned 1 exit status
The bug is pretty evident... the g++ flag is missing the %configure flags that should have been set (causing it to use the defaults which is 64 bit). But this is right from CentOS's (base/os) repository; so this means CentOS/RedHat developers are compiling it without this problem at all with this bug present.

Is there another tool like mock that they are using? Or perhaps a custom mock configuration that just doesn't ship? Or more importantly; is there a good spot to learn how to build the accompanied i686 packages that sit next to their x86_64 counterparts?
Last edited by l2g on 2017/05/29 15:14:07, edited 1 time in total.

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: CentOS 7.x i686 Support

Post by toracat » 2017/05/26 21:24:31

You can find mock configuration file CentOS uses on their buildlogs machine. For example:

https://buildlogs.centos.org/c7.1611.u/ ... 6/mock.cfg

is for C7 i386.
CentOS Forum FAQ

User avatar
TrevorH
Site Admin
Posts: 33220
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7.x i686 Support

Post by TrevorH » 2017/05/27 14:06:43

Also the mock package from the CentOS extras repo has several more config files shipped by default:

Code: Select all

/etc/mock/centos-7-aarch64.cfg
/etc/mock/centos-7-armhfp.cfg
/etc/mock/centos-7-i386.cfg
/etc/mock/centos-7-ppc64.cfg
/etc/mock/centos-7-ppc64le.cfg
/etc/mock/centos-7-x86_64.cfg
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
l2g
Posts: 9
Joined: 2015/08/14 13:04:27
Contact:

Re: CentOS 7.x i686 Support

Post by l2g » 2017/05/27 14:16:20

Trevor and toracat; you guys are awesome.

Trevor, I'll check out the latest info you passed along, but i solved my problem yesterday using Toracat's help. I had to modify the cfg just a wee-bit, but otherwise, it worked great.

You can lock/close this thread if you want! Kudos to all your help!

Post Reply