Hey all,
Has anybody here ever cross-compiled ruby successfully? I ask because I’m
trying to do just that and “configure” busts in a number of places when
cross-compiling. An example:
checking whether getpgrp takes no argument… configure: error: cannot check
getpgrp if cross compiling
at which point “configure” exits.
I looked at its source and see:
echo $ac_n “checking whether getpgrp takes no argument”"… $ac_c" 1>&6
echo “configure:3830: checking whether getpgrp takes no argument” >&5
if eval “test “echo '$''{'ac_cv_func_getpgrp_void'+set}'
” = set”; then
echo $ac_n “(cached) $ac_c” 1>&6
else
if test “$cross_compiling” = yes; then
{ echo “configure: error: cannot check getpgrp if cross compiling” 1>&2;
exit
1; }
else
cat > conftest.$ac_ext <<EOF
…
So unless there’s a cached value for this setting, then I’m SOL if I’m
cross-compiling.
Is there a work-around for this? Can I manually “pre-cache” this setting by
figuring out the correct value and editing (pre-creating really)
config.cache?
Btw, Brian, when not cross-compiling I found that the entire Ruby distribution
is 3.3MB so if I can get it to cross-compile it should do what I need.
Oh, and jumping ahead a little bit, has anybody ever cross-compiled eRuby? If
I can get Ruby ported I think I’m going to try to use it to replace a really
awful CGI written in 18 C files with html mixed in haphasardly with C code.
Ugh.
Ben
Hey all,
Has anybody here ever cross-compiled ruby successfully? I ask because I’m
trying to do just that and “configure” busts in a number of places when
cross-compiling. An example:
I tried cross-compiling it for the Zaurus… there are issues.
checking whether getpgrp takes no argument… configure: error: cannot check
getpgrp if cross compiling
at which point “configure” exits.
This is one of them. Comment out AC_FUNC_GETPGRP in configure.in,
regenerate configure, and try again
I looked at its source and see:
The “configure” script is generated by autoconf from configure.in.
> Oh, and jumping ahead a little bit, has anybody ever cross-compiled eRuby? If
> I can get Ruby ported I think I'm going to try to use it to replace a really
> awful CGI written in 18 C files with html mixed in haphasardly with C code.
> Ugh.
Nice.
The other problem with cross compiling is the handling of shared
libraries. I can get a static compile fine, but no shared libs or
dynamic loading. Someone had a suggestion about explicitly specifying
support, but I haven’t had a chance to try it out.
···
On Wed, 16 Jul 2003 04:30:03 +0900 Ben Giddings ben@thingmagic.com wrote:
–
Ryan Pavlik rpav@users.sf.net
“Well what was it, Mr. Nightmare Pants?” - 8BT
Hey all,
Hi
Has anybody here ever cross-compiled ruby successfully? I ask because I’m
trying to do just that and “configure” busts in a number of places when
cross-compiling. An example:
checking whether getpgrp takes no argument… configure: error: cannot check
getpgrp if cross compiling
at which point “configure” exits.
there are indeed some problems with configure, I got around them
by (sorry, it’s bad …) patching the configure script. But the
biggest problem, and one you cannot easily correct is the fact
that during the build process, a miniruby executable is
produced. This executable is then run several times, for
example to create generate Makefile from extconf.rb scripts. But
since your cross compiling, it cannot be run on your build
environment …
One workaround would be to specify that the ruby executable from
the current build environment should be used, but using a
specific config file to override the system specific settings
(since we don’t want to use the one from the build environment)
…
Anyway, good luck
and please post if you find a solution !
···
On Wed, Jul 16, 2003 at 04:30:03AM +0900, Ben Giddings wrote:
–
Benoît PIERRE pierre_b@epita.fr
Étudiant EPITA GISTR promo 2004
.-------------------------------------. [GnuPG FingerPrint]
Avoid the Gates of Hell. Use Linux | BDEE523CB7AE6D9DB4C0
_____________________________________| 8B0288677E698B65CC35
Hi,
Ben Giddings ben@thingmagic.com writes:
Has anybody here ever cross-compiled ruby successfully? I ask because I’m
trying to do just that and “configure” busts in a number of places when
cross-compiling. An example:
Following binaries are cross-compiled on a Linux box:
ftp://ftp.ruby-lang.org/pub/ruby/binaries/cygwin/
ftp://ftp.ruby-lang.org/pub/ruby/binaries/djgppp/
ftp://ftp.ruby-lang.org/pub/ruby/binaries/mingw/
checking whether getpgrp takes no argument… configure: error: cannot check
getpgrp if cross compiling
at which point “configure” exits.
I looked at its source and see:
echo $ac_n “checking whether getpgrp takes no argument”"… $ac_c" 1>&6
echo “configure:3830: checking whether getpgrp takes no argument” >&5
if eval “test “echo '$''{'ac_cv_func_getpgrp_void'+set}'
” = set”; then
echo $ac_n “(cached) $ac_c” 1>&6
else
if test “$cross_compiling” = yes; then
{ echo “configure: error: cannot check getpgrp if cross compiling” 1>&2;
exit
1; }
else
cat > conftest.$ac_ext <<EOF
…
So unless there’s a cached value for this setting, then I’m SOL if I’m
cross-compiling.
Is there a work-around for this? Can I manually “pre-cache” this setting by
figuring out the correct value and editing (pre-creating really)
config.cache?
You can set these environment variables:
ac_cv_func_getpgrp_void=yes
ac_cv_func_setpgrp_void=yes
ac_cv_sizeof_long_long=8
ac_cv_func_memcmp_clean=yes
ac_cv_func_getrlimit=yes
For Bash, the procedure is:
ac_cv_func_getpgrp_void=yes
ac_cv_func_setpgrp_void=yes
ac_cv_sizeof_long_long=8
ac_cv_func_memcmp_clean=yes
ac_cv_func_getrlimit=yes
./configure
–target=foo
–host=bar
–build=sh config.guess
…
···
–
eban