cross compiling freeradius

Erich Titl erich.titl at think.ch
Thu Oct 15 15:52:01 CEST 2020


Hi Alan

Am 15.10.2020 um 14:12 schrieb Alan DeKok:
> On Oct 15, 2020, at 4:46 AM, Erich Titl <erich.titl at think.ch> wrote:
>> I am trying to cross compile freeradius-server-3.0.21. Until recently we
>> used a 2.x series but upgrading to openssl 1.1.1 forced us to upgrade
>> freeradius too (it is probably reasonable anyway).
> 
>   Yup.  v2 has been end of life for quite a while now.
> 
>> Now with freeradius 3.0.21 I am running into an impasse as configuration
>> barfs at me:
>>
>> checking for __builtin_choose_expr support in compiler... configure:
>> error: in
>> `/home/mega/leaf/devel/master-new-openssl/source/x86_64-unknown-linux-uclibc/radius/freeradius-server-3.0.21':
>> configure: error: cannot run test program while cross compiling
> 
>   Hmm... I suppose we could fix the configure check to not run programs.  But that won't really help.
> 
>   The short answer is that you can edit the "configure" script to remove those checks.  Just look for that error message, and remove all of the code which references "builtin_choose_expr".
> 
>   The configure script is just shell script (terrible, terrible shell script), but it's not too bad.
> 

Well the nested if constructs are not really easy to read.

>   You will likely have to do the same thing for other tests, too.
> 
>> It appears that I have to disable parallel testing of the capabilities.
>> Could anyone point me what to look at?
> 
>   Arguably the "configure" checks should be set up to not run any local programs.  Then cross compiling will be a lot easier.

I am afraid that by just disabling the checks lots of confdefs will just
be omitted. I have no idea what will be the results in the compiled
object if it compiles at all.

> 
>   But in the end, we don't do a lot of cross compiling, so it's not a well-tested feature.  If someone were to supply patches... we could add them, and then ensure that cross-compiling is supported for the future.

I understand that the compile script is built by autoconf, probably
using m4, unfortunately I am not familiar with this tool.

Thanks

Erich

-- 
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com



More information about the Freeradius-Users mailing list