cross compiling freeradius

Erich Titl erich.titl at think.ch
Fri Oct 16 00:08:11 CEST 2020


Hi Alan

Am 15.10.2020 um 19:23 schrieb Alan DeKok:
> On Oct 15, 2020, at 1:15 PM, Erich Titl <erich.titl at think.ch> wrote:
>> I got away with editing configure.ac and then run autogen.sh to create a
>> new configure script without the tests. Here are the relevant lines
> 
>   You can just do "make reconfig" and it will work.  You might need to do a "configure" first, but that doesn't have to be a cross-compile.  You can always re-run "configure" later.

So you are telling me that after commenting the offending macros in
configure.ac a make reconfig is the right thing to do?

> 
>   Don't run autogen.sh.  It will do all kinds of stupidities in order to 

I read you and that worries me. Should it not be removed from the
distibution?

> 
>> so it appears that configure is running, but now I see
>>
>> configure: creating ./config.status
>> config.status: creating all.mk
>> sed -i 's,need_relink=yes,need_relink=no,' freeradius-server-3.0.21/libtool
>> sed: can't read freeradius-server-3.0.21/libtool: No such file or directory
>> make: *** [buildtool.mk:21: freeradius-server-3.0.21/.configure] Error 2
>> make: Leaving directory
>> '/home/mega/leaf/devel/master-new-openssl/source/x86_64-unknown-linux-uclibc/radius'
>>
>> It looks like config.status gets created and started but libtool needs
>> to be created somewhere.
> 
>   We don't use libtool.  It's garbage.

It appears to be put in config.status and that is created by configure
AFAIK.

> 
>   Just do "make reconfig", and the build process will Do the Right Thing.

Well, we have some kind of a standardised build process, grown over the
years. Basically it ia a Makefile which prepares the package and then
runs configure with predefined options and then a make using the
generated configuration. I would like to streamline this and doubt I
will easily throw all this infrastructure away. Maybe we are wrong to
use cross compile but this is hard to foresee as we are supporting a
number of different architectures, e.g. x486, x686, x86-64 and a few RPI
versions. I can of course control what this makefile does.

mega at leafbuilder:~/leaf/devel/master-new-openssl/source/x86_64-unknown-linux-uclibc/radius/freeradius-server-3.0.21$
make reconfig
make: Nothing to be done for 'reconfig'.

I then ran configure as before

....
configure: creating ./config.status
config.status: creating all.mk
sed -i 's,need_relink=yes,need_relink=no,' freeradius-server-3.0.21/libtool
sed: can't read freeradius-server-3.0.21/libtool: No such file or directory
make: *** [buildtool.mk:21: freeradius-server-3.0.21/.configure] Error 2
make: Leaving directory
'/home/mega/leaf/devel/master-new-openssl/source/x86_64-unknown-linux-uclibc/radius'
...

This is what I read in configure

# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.

So it appears that configure is creating the offending sed invocation
which fails because it is missing libtool in the distribution.

There appears to be some code to build libtool in the scripts directory.

mega at leafbuilder:~/leaf/devel/master-new-openssl/source/x86_64-unknown-linux-uclibc/radius$
tar tjf freeradius-server-3.0.21.tar.bz2 | grep libtool
freeradius-server-3.0.21/scripts/jlibtool.c
freeradius-server-3.0.21/scripts/libtool.mk

Thanks

ET

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



More information about the Freeradius-Users mailing list