You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Enrico Weigelt <we...@metux.de> on 2004/12/14 06:39:25 UTC

yet another autoconf torture

hi folks,


when trying to crosscompile apache, it breaks in libapr configure:

> cannot check setpgrp when crosscompiling

So crosscompiling seems to be impossible. I've tested it on 
2.0.49 up to 2.0.52. 


cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service

  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     contact@metux.de
  cellphone: +49 174 7066481
---------------------------------------------------------------------
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------

Re: yet another autoconf torture

Posted by Enrico Weigelt <we...@metux.de>.
* Paul Querna <ch...@force-elite.com> wrote:

<snip>
> >So crosscompiling seems to be impossible. I've tested it on 
> >2.0.49 up to 2.0.52. 
> 
> uhm. cross compiling from what to what?
i686-pc-gnu-linux -> i686-pc-gnu-linux, but with sysroot and
different libc versions.


cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service

  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     contact@metux.de
  cellphone: +49 174 7066481
---------------------------------------------------------------------
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------

Re: yet another autoconf torture

Posted by Paul Querna <ch...@force-elite.com>.
Enrico Weigelt wrote:
> hi folks,
> 
> 
> when trying to crosscompile apache, it breaks in libapr configure:
> 
> 
>>cannot check setpgrp when crosscompiling
> 
> 
> So crosscompiling seems to be impossible. I've tested it on 
> 2.0.49 up to 2.0.52. 

uhm. cross compiling from what to what?

Re: yet another autoconf torture

Posted by Enrico Weigelt <we...@metux.de>.
* Joe Orton <jo...@redhat.com> wrote:

<snip>
> It is possible to support cross compilation with autoconf-based build
> systems.  configure supports this by use of cache variables; standard
> practice is to build up a "config.site" file with the correct test
> results for the target (e.g. "ac_cv_func_setpgrp_void=yes"), and set
> CONFIG_SITE to point at that file.  More work may be needed on the
> configure scripts to use AC_CACHE_CHECK appropriately.
Ah, do I have to patch anything for that or does it run out of the box ?

I had exactly the same problem with openssl. I fixed it by simply 
pulling off several checks (ie the file-exist-checks simply refused 
to work in crosscompile mode) and recreated configure. The tests I 
removed were meaningless for my platforms nevertheless. 

But the problem is another point: autoconf is not really made for 
crosscompiling. the support for different tool commands and the so called
"crosscompile support" (simply disable a bunch of checks or refuse to
work when it doesnt know what to do now) is just an ugly hack, neither
are sysroot builds supported in any way.

To get a really reliable solution for that, we need an new, well designed
universal toolchain frontend. this of course could also be shipped with
apache for a while (-> "vendor branch" ... grrmpf).

> But the Makefiles still won't work since they have no separate of host
> and target $CC etc, yet need to build and run executables on the host
> system in several places.  So there is definitely more work needed
> there.
Right. 
I'm passing my crosstoolchain commands (CC,LD, ...). But this only
works as long as the package doesnt bring its own host-side-tools. 

We need at least an *clear* distinction between host und and target
compilation.

These are all questions for the unitool, which I already announced
here. For those who dont remember:

Wiki: http://nibiru.borg.metux.de:7000/wiki/index.php/Universal_Toolchain
Maillist: unitool-dev@metux.de, subscribe via majordomo@metux.de


cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service

  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     contact@metux.de
  cellphone: +49 174 7066481
---------------------------------------------------------------------
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------

Re: yet another autoconf torture

Posted by Joe Orton <jo...@redhat.com>.
On Tue, Dec 14, 2004 at 06:39:25AM +0100, Enrico Weigelt wrote:
> 
> hi folks,
> 
> 
> when trying to crosscompile apache, it breaks in libapr configure:
> 
> > cannot check setpgrp when crosscompiling
> 
> So crosscompiling seems to be impossible. I've tested it on 
> 2.0.49 up to 2.0.52. 

It is possible to support cross compilation with autoconf-based build
systems.  configure supports this by use of cache variables; standard
practice is to build up a "config.site" file with the correct test
results for the target (e.g. "ac_cv_func_setpgrp_void=yes"), and set
CONFIG_SITE to point at that file.  More work may be needed on the
configure scripts to use AC_CACHE_CHECK appropriately.

But the Makefiles still won't work since they have no separate of host
and target $CC etc, yet need to build and run executables on the host
system in several places.  So there is definitely more work needed
there.

Regards,

joe