cross compiling configure errors

Johan Adolfsson johan.adolfsson at axis.com
Tue Dec 19 05:11:49 EST 2000


I agree that the tests make sense, but the problem is that
configure failes and exists when it reaches an error and you
don't get a Makefile created that you can tweak,
"./configure --help" wont give much help either.

There should be options to override the settings that normally
fails during cross compiling, or the AC_TRY_RUN should do
something "useful" in the cross compile section.

Are there/should there be any way to run configure so that it skips these
tests?
E.g. something like
--with-correct-snprintf / --with-incorrect-snprintf
Or add cross compile action to AC_TRY_RUN :
    AC_MSG_RESULT(yes)
    AC_MSG_WARN([** Cross compiling, assuming correct snprintf ])
(or be on the "safe" side and assume it's broken?)

--with-getpgrp-void
(BTW: Wouldn't it be possible to test this without running a testprogram,
 just compile and check the warnings and assume the header files are
correct?
 Is the AC_FUNC_GETPGRP macro really ok?)

--with-ssl-dir=xxx
This exists, but doesn't prevent the tests, shouldn't it?
  AC_TRY_LINK instead of AC_TRY_RUN seems to fix the OpenSSL test
  for me, wonder if it breaks it for someone else? :)

--with-rsaref

Or should the AC_TRY_RUN macros have an [action-if-cross-compiling]
entry, e.g:
  echo "Cross compiling, assuming RSA works"
  rsa_works=1
  break;
or
AC_MSG_WARN( [ ** Cross compiling, use rsa_works=1 if RSA works])
  break;

Setting rsa_work=1 before running configure works for me.

Some of the "options" to skip tests are "hidden" in the configure.in,
they really should be mentioned when doing "./configure --help":
no_rsa
rsa_work
no_dev_ptmx
no_dev_ptc (missing, but should be there I think)

There is also the issue when crosscompiling that some paths should be
with prefix and some without. The Makefile has the variable DESTDIR that
looks like it fixes that problem.

I have now managed to get it through configure and quite far in the build
process,
but now it fails on sshd.c:
gcc_cris -melinux -muclibc=/home/johana/e2/eroot -O2 -Wall -D__linux__ -DELI
NUX -DGETPGRP_VOID=1 -Wall -I. -I. -I/home/johana/e2/eroot/include -DETCDIR=
\"/etc\" -DSSH_PROGRAM=\"/bin/ssh\" -DSSH_ASKPASS_DEFAULT=\"/libexec/ssh-ask
pass\" -DHAVE_CONFIG_H   -c sshd.c -o sshd.o
sshd.c: In function `main':
sshd.c:864: warning: implicit declaration of function `howmany'
sshd.c:864: `fd_mask' undeclared (first use this function)
sshd.c:864: (Each undeclared identifier is reported only once
sshd.c:864: for each function it appears in.)
make[1]: *** [sshd.o] Error 1

Any hints on this one?

I have attached a patch file that I hope is reasonable in size,
any chance some of it gets into the distribution?

Best regards
/Johan

-----Original Message-----
From: Smith, Donald <Donald.Smith at qwest.com>
To: 'Johan Adolfsson' <johana at axis.com>; openssh-unix-dev at mindrot.org
<openssh-unix-dev at mindrot.org>
Date: Monday, December 18, 2000 15:26
Subject: RE: cross compiling configure errors


>These errors make sense. If your crosscompiling any test that involves
>running a binary on your local
>host should fail because your compiling for a different platform. The same
>can be said for "real" lib path
>checks. The path checks don't make sense on your local host only on the
>target host.
>Having said that these errors do serve to remind the compiler (the person
>not the software) that
>some of the tests were not run. So the compiler (the person not the
>software) needs to either check these
>by hand and/or hardcode known information into the Makefile that matches
the
>target system (Yes to RSA if
>you know you have rsa support on the target....)
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: openssh_configure_in.patch
Type: application/octet-stream
Size: 1561 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20001218/ddaf507c/attachment.obj 


More information about the openssh-unix-dev mailing list