i386 libs vs. x86_64 libs

Support for the other architectures (X86_64, IA-64, and PowerPC)
Post Reply
rotorboy
Posts: 27
Joined: 2005/03/03 23:02:04

i386 libs vs. x86_64 libs

Post by rotorboy » 2008/11/10 16:14:08

Greetings. I'm trying to compile php 5.2.6 using --with-curl but I'm getting some errors:

/usr/bin/ld: skipping incompatible /usr/lib/libgssapi_krb5.so when searching for -lgssapi_krb5
/usr/bin/ld: skipping incompatible /usr/lib/libgssapi_krb5.a when searching for -lgssapi_krb5
/usr/bin/ld: cannot find -lgssapi_krb5

On various forums the suggested fix is to link all libraries to their 64 bit versions. I'm currently on a 64 bit install xen 5 VM. When I check a sample of the libs etc. I see:

krb5-libs i386 1.6.1-25.el5_2.1 installed 1.4 M
curl i386 7.15.5-2.el5 installed 463 k
curl-devel i386 7.15.5-2.el5 installed 637 k
curl-devel x86_64 7.15.5-2.el5 installed 743 k
ecryptfs-utils i386 41-1.el5 installed 290 k
krb5-devel i386 1.6.1-25.el5_2.1 installed 4.3 M
nss_ldap i386 253-13.el5_2.1 installed 3.2 M
openldap i386 2.3.27-8.el5_2.4 installed 578 k
openssl i686 0.9.8b-10.el5 installed 3.2 M
openssl-devel x86_64 0.9.8b-10.el5 installed 4.9 M
openssl-devel i386 0.9.8b-10.el5 installed 4.3 M
pam_ccreds i386 3-5 installed 32 k
pam_krb5 i386 2.2.14-1.el5_2.1 installed 249 k

1) Why are most packages i386 instead of x86_64?

2) Is there a safe/easy way to move these all to the 64 bit?

3) Are there any problems with this approach?

Thanks.

User avatar
toracat
Forum Moderator
Posts: 7413
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: i386 libs vs. x86_64 libs

Post by toracat » 2008/11/10 16:57:57

[quote]
rotorboy wrote:

3) Are there any problems with this approach?
[/quote]
Yes, if you compile from source, you might eventually break the system (depending on how you do it and what you compile). Please read:

http://wiki.centos.org/PackageManagement/SourceInstalls

Regarding php 5.2.6, it is currently available from the CentOS testing repo. Go to http://wiki.centos.org/AdditionalResources/Repositories and set up this repository. Make sure you have the yum priorities plugin installed appropriately. Then you should be able to install php 5.2.6 by adding the [b]--enablerepo=c5-testing[/b] option to the yum command.

rotorboy
Posts: 27
Joined: 2005/03/03 23:02:04

Re: i386 libs vs. x86_64 libs

Post by rotorboy » 2008/11/10 18:14:52

ok, that's not what I meant but to address your issue...

Suffice it to say I have sufficient reason for compiling PHP/Apache/MySQL and a few other things. My only issue is that I'm having problems on x86_64 when using curl. The rest works fine.

User avatar
toracat
Forum Moderator
Posts: 7413
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: i386 libs vs. x86_64 libs

Post by toracat » 2008/11/10 19:12:29

If you are not planning to run any 32-bit applications on your 64-bit OS, you should consider building a pure 64-bit system. This would involve removing all i386 and i686 packages and adding something like "exclude=*.i386 *.i686" to your yum.conf file.

If you need to retain 32-bit libraries, things tend to become messy. The current version of yum has a bug and may install i386 rpm's even when they are not required or not needed.

NedSlider
Forum Moderator
Posts: 2892
Joined: 2005/10/28 13:11:50
Location: UK

Re: i386 libs vs. x86_64 libs

Post by NedSlider » 2008/11/10 22:24:11

[quote]
rotorboy wrote:
Greetings. I'm trying to compile php 5.2.6 using --with-curl but I'm getting some errors:

/usr/bin/ld: skipping incompatible /usr/lib/libgssapi_krb5.so when searching for -lgssapi_krb5
/usr/bin/ld: skipping incompatible /usr/lib/libgssapi_krb5.a when searching for -lgssapi_krb5
/usr/bin/ld: cannot find -lgssapi_krb5

[/quote]

Try uninstalling krb5-devel.i386, rinse and repeat.

As toracat said, compiling for x86_64 on a mixed arch system can get real messy. It's probably best to set up a dedicated pure x86_64 build system.

Alternatively, build your own RPM package for php 5.2.6. You can grab the source RPM for php 5.2.6 from the CentOS testing area and rebuild it --with-curl if that option isn't already enabled:

http://dev.centos.org/centos/5/testing/SRPMS/

rotorboy
Posts: 27
Joined: 2005/03/03 23:02:04

Re: i386 libs vs. x86_64 libs

Post by rotorboy » 2008/11/12 00:57:33

Thanks guys...

It took a bit of fiddling with uninstalling .i386's and installing .x86_64's but at the end of the day that and relinking some .so files did the trick.

I haven't had this problem on 64 bit systems as most of my systems don't require curl. Anyhow I got this sorted out with your clues and a posting that showed relinking the .so files affected... as an example:

ln -sf /lib64/libcom_err.so.2 /lib64/libcom_err.so

A few of these and configure decided it was happy. Now I'm compiling and so far it's looking good.

FYI - I always compile into /usr/local/whatever so I don't mess with any RPM's.

szidikm
Posts: 1
Joined: 2005/09/23 13:14:07

Re: i386 libs vs. x86_64 libs

Post by szidikm » 2010/08/24 18:26:30

Thanks for the prev post - that link tip got my php-5.2.14 to finally complie with curl support.

Post Reply

Return to “CentOS 5 - X86_64,s390(x) and PowerPC Support”