[CentOS] Problem compiling freeradius on x86_64

Thu Mar 6 03:22:35 UTC 2008
Johnny Hughes <johnny at centos.org>

Sergio Belkin wrote:
> 2008/3/5, Mogens Kjaer <mk at crc.dk>:
>> Sergio Belkin wrote:
>>  > Hi,
>>  > I can't compile freeradius-2.0.2 (Centos RPM is too old for what I
>>  > need) on Centos 5.1 x86_64. It outputs:
>>  >
>>  > /usr/lib/libltdl.so: could not read symbols: File in wrong format
>>  > collect2: ld returned 1 exit status
>>

That error means you are trying to link against i386 libraries with -m64 
... which you can't do. You need to remove all i[3,4,5,6]86 RPMS from an 
x86_64 build server except for glibc.i686 and glibc-devel.i386 (and 
those packages are only needed to build a couple packages).

>>
>> Maybe it should look for /usr/lib64/libltdl.so ?
>>
>>  Can't you use the Centos SRPM file as a template for
>>  the build process?
<snip>
> 
> Ooops  :S How can I do that?

First thing is that building on x86_64 is quite a PITA.

You will need to either use mock with the appropriate configuration file 
   or you will need to create a build machine that has only x86_64 RPMS 
(otherwise you will either try (and fail) to link to i386 libraries ... 
or if you have enough i386 software actually installed (binutils, 
libgcc, glibc and glibc-devel) then you will actually link against i386 
libraries).

This will most likely make your binaries not work, or require mixed 
software on other installs.

So, I would recommend that you create a build VM or use mock.

Thanks,
Johnny Hughes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20080305/68c0a58d/attachment-0004.sig>