We have to compile binary RPMs for both architectures (i386 and x86_64) for centos. When we want to install both, we have conflicts on common files (like in /usr/include, /bin, ...)
Is there 开发者_如何学C.spec creation rules that help avoiding these conflicts ?
I found a link (others sources seems to agree) :
- 64-bit computing: Co-existing in a 32-bit world
As I understand it, the answer would be :
- common files must be exactly the same in both packages ;
- binaries must be renamed in, for example,
<binary>-32
and<binary>-64
; - libs should be placed in subdirectories in %{_libdir} (which resolves to /usr/lib on 32 bit and to /usr/lib64 on x86_64)
- if libs are places in %{_libdir} subdirectory this needs to be added to file inside /etc/ld.so.conf.d/ to include these folders for linker
精彩评论