In <E19RyR2-0000LT-00@localhost>, Keith Packard wrote:> Around 12 o''clock on Jun 16, Jace Krull wrote: > > > but still run into problems during make and make install, when it tries to > > execute the (just built) fc-lang or fc-cache programs. > > We''ll need to skip this part of the install in a cross compile > environment; if anyone has suggestions on how to detect that, please speak > up and we''ll try to get it patched.The GNU autotools book has a whole chapter about this, too much for me to parse and summarise here quickly. There''s probably a section in info autoconf too. The most useful thing is it sets a shell variable called cross_compiling ("yes" or "no"). The book also says you need to watch out for AC_TRY_RUN and AC_CHECK_SIZEOF, and some others that look a bit obscure. -- TH * http://www.realh.co.uk
On Tue, 2003-06-17 at 13:18, Keith Packard wrote:> Around 8 o''clock on Jun 17, Jace Krull wrote: > > > One approach I''ve seen is to simply require that the natively compiled > > binaries pre-exist in the environment (only when cross compiling). > > For ''fc-lang'' and ''fc-glyphlist'', that''s not practical as those programs > are not installed and so only exist in the build tree. > > We need to find out how to use the --host and --build options to switch > compilers.I don''t think this is feasible with autoconf. If you don''t to install these programs, you have two possible approaches: A) Simply distribute the generated files with the fontconfig distribution; we do this for various source files in GTK+ that require more exotic dependencies to regenerate. B) Allow the user to point the build at a natively compiled uninstalled tree of fontconfig. Regards, Owen
Keith Packard wrote:> Around 12 o''clock on Jun 16, Jace Krull wrote: > > >>but still run into problems during make and make install, when it tries to >>execute the (just built) fc-lang or fc-cache programs. > > > We''ll need to skip this part of the install in a cross compile > environment; if anyone has suggestions on how to detect that, please speak > up and we''ll try to get it patched.Easy, all you have to do is setup an AM_CONDITIONAL case statement in configure.ac to see if $build == $host. If the test fails, then do not run the conditionalized portions of the respective Makefile.am''s. Cheers, Nicholas
Around 8 o''clock on Jun 17, Jace Krull wrote:> One approach I''ve seen is to simply require that the natively compiled > binaries pre-exist in the environment (only when cross compiling).For ''fc-lang'' and ''fc-glyphlist'', that''s not practical as those programs are not installed and so only exist in the build tree. We need to find out how to use the --host and --build options to switch compilers. -keith
Around 20 o''clock on Jun 16, Nicholas Wourms wrote:> BTW, I should have one patch pending which fixes some Cygwin-related > stuff and resurrects fontconfig-config. Did you get it?Yes, I was having python adventures with mailman and didn''t figure it out until yesterday. I hope things will work a bit better now... -keith
Keith Packard wrote:> Around 15 o''clock on Jun 16, Nicholas Wourms wrote: > > >>>but still run into problems during make and make install, when it tries to >>>execute the (just built) fc-lang or fc-cache programs. >> > >>Easy, all you have to do is setup an AM_CONDITIONAL case statement in >>configure.ac to see if $build == $host. If the test fails, then do not >>run the conditionalized portions of the respective Makefile.am''s. > > > The fc-lang (and new fc-glyphname) programs must be run as a part of the > build process and so must be compiled with the native compiler rather than > the cross compiler. > > I have no idea what is needed to fix the automake files to make all of > this happen; I''ll have to fix it at some point, and help would be > appreciated... >Ok, I know what to do in that case. I''ll fix up something and submit it later on. But to explain, there exists an add on macro which obtains the native compiler and defines it. The macro I speak of is this one: http://ac-archive.sourceforge.net/Cross_Compilation/ac_prog_cc_for_build.html Breifly looking at the source, it seems like the two programs do not depend on any other libraries than libc, so this should be rather simple to set up. Again, we will use an AM_CONDITIONAL to determine the compiling and installation steps. BTW, I should have one patch pending which fixes some Cygwin-related stuff and resurrects fontconfig-config. Did you get it? I think it is still trapped in the post-waiting-to-be-approved-or-rejected queue of the list admin. Cheers, Nicholas
Keith Packard wrote:>Around 15 o''clock on Jun 16, Nicholas Wourms wrote: > > > >>>but still run into problems during make and make install, when it tries to >>>execute the (just built) fc-lang or fc-cache programs. >>> >>> >>Easy, all you have to do is setup an AM_CONDITIONAL case statement in >>configure.ac to see if $build == $host. If the test fails, then do not >>run the conditionalized portions of the respective Makefile.am''s. >> >> >The fc-lang (and new fc-glyphname) programs must be run as a part of the >build process and so must be compiled with the native compiler rather than >the cross compiler. > > >One approach I''ve seen is to simply require that the natively compiled binaries pre-exist in the environment (only when cross compiling). Usually that just means the package must be installed on compile host. Unless some of the binaries are not installed by the package, in which case you have to natively build it and copy the binaries from the build area, etc. I know next to nothing about autoconf (beyond deciphering the resulting configuration scripts) so I can''t help you much there. Except to test whatever you come up with on my platform. Thanks, Jace
Around 12 o''clock on Jun 16, Jace Krull wrote:> but still run into problems during make and make install, when it tries to > execute the (just built) fc-lang or fc-cache programs.We''ll need to skip this part of the install in a cross compile environment; if anyone has suggestions on how to detect that, please speak up and we''ll try to get it patched. -keith
Around 15 o''clock on Jun 16, Nicholas Wourms wrote:>>but still run into problems during make and make install, when it tries to >>execute the (just built) fc-lang or fc-cache programs.> Easy, all you have to do is setup an AM_CONDITIONAL case statement in > configure.ac to see if $build == $host. If the test fails, then do not >run the conditionalized portions of the respective Makefile.am''s.The fc-lang (and new fc-glyphname) programs must be run as a part of the build process and so must be compiled with the native compiler rather than the cross compiler. I have no idea what is needed to fix the automake files to make all of this happen; I''ll have to fix it at some point, and help would be appreciated... -keith
Hello, I''m in the process of cross-compiling fontconfig-2.2.0. I''m building on i386-linux with a target of arm-linux. I''ve tried various permutations of the --host, --build, and --target options to the configure script, but still run into problems during make and make install, when it tries to execute the (just built) fc-lang or fc-cache programs. I can force it to work by hacking up the makefile, but would prefer a clean build from the tarball if that''s possible. Is there some option(s) I''m missing ? Or should I just live with my ugly hacking ? Thanks, Jace Krull Balatech, Inc. www.balatech.com