POV-Ray : Newsgroups : povray.programming : Cross-compilation possible? : Cross-compilation possible? Server Time
4 Nov 2024 21:23:17 EST (-0500)
  Cross-compilation possible?  
From: Nicolas Alvarez
Date: 27 Feb 2008 10:45:25
Message: <47c58595@news.povray.org>
Trying to cross-compile POV-Ray 3.6.1. Build platform: cygwin. I'll 
leave you curious on what the host platform is.

As far as I know, the correct way to set it is using --host on the 
configure script. That makes the configure script print this warning 
(and then continue happily):

configure: WARNING: If you wanted to set the --build type, don't use 
--host. If a cross compiler is detected then cross compile mode will be 
used.

So I'm not sure if I'm really doing it right.


After configuring POV-Ray itself, it configures zlib. All works fine. 
Then libpng, which also works fine. When it arrives to libjpeg, I get this:

checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH

Apparently it doesn't support --host. Maybe the fact that it was made 
with autoconf 1.12 (and we're up to 2.61) has something to do :) Calling 
it with 'CC=platform-gcc' as an argument makes it work correctly.

After libjpeg fails, POV-Ray's configure script *continues*, and starts 
tiff's configure. That *also* fails, and POV-Ray's configure still says 
it's all done and ready to run make! I think there should be checks for 
sub-configures failing. Maybe starting the configure script of the next 
library anyway (so the user can solve all problems at once before trying 
again) but at the end giving a message that it's *not* all good and ready.

Second roadblock. Libtiff's problem is similar to libjpeg: it can't find 
cc. Running it with --host, it says it's not even a valid option. it 
doesn't even support giving it CC=platform-gcc as an argument, I have to 
set it on the environment before running configure. I *just* noticed I 
can also use --with-CC=platform-gcc. And I can pass the platform name as 
an argument (without any switch), but that doesn't make it use the 
correct CC name, so I don't know what it's useful for.

Now its configure script works fine. And third roadblock. libtiff's 
makefile has a terrible habit of compiling tools (using the 
cross-compiler!) and trying to run them; like mkversion, and another 
tool to make a lookup table or something. Of course, this doesn't work: 
"cannot execute binary file". I was able to manually create tiffvers.h, 
but I won't be doing the same with the lookup table...

Fine, I get the idea. Libtiff won't cross-compile without a lot of hacking.

Feature request: let me disable it. It would make sense if I could 
disable tiff support completely, giving an error when that file format 
is used in an image_map or similar. Or what if I want a build without 
*any* image support, for rendering RSOCPs on an embedded device?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.