cross compilation problem with krb5_1.6.3

Ken Raeburn raeburn at MIT.EDU
Tue May 6 18:16:38 EDT 2008


On May 6, 2008, at 15:36, Mahmudul Haque wrote:
> I am stuck in cross compiling the krb5-1.6.3 for my mips board.  i am
> getting the following error whenever i try to compile it:-
> "checking for constructor/destructor attribute support... configure:
> error: Cannot test for constructor/destructor support when cross
> compiling"
> any suggestion would be highly appreciable.....thnx

Unfortunately, cross-compilation hasn't been a priority for us in the  
past; we've heard some interest in that area, but haven't yet begun to  
really explore it.

I'm sure there are a number of places in the configure script where we  
assume a native compilation environment.  If you don't mind looking  
through autoconf scripts, the ones I know about off the top of my head  
shouldn't be hard to find: Look for any use of AC_TRY_LINK and  
AC_TRY_RUN in src/configure.in and src/aclocal.m4.  You'll probably  
need to explicitly set in your environment the ac_cv_* variables those  
tests will try to set.  Depending on the target system, the link tests  
may work, or may not; the execution tests obviously won't.

There are also places where we test the name of the host system, so if  
you're not specifying "--host=mips-something", you probably should  
be.  (In GNU autoconf terminology, "host" is the system where the  
software will be run, "build" is where you run your compiler to make  
the software, and if the software you're building is a compiler or  
related tool, "target" is the system for which it would generate code;  
so something like "configure --build=sparc-solaris2.10 --host=i686- 
windows" means you're compiling Windows programs on a Solaris  
machine.  I doubt there's much in our build system that cares what the  
build OS is, but the host OS would be important.)

There are a few things -- special linker options, for example -- that  
are hard to figure out with autoconf tests even if you can execute  
programs, and for an embedded system our configuration scripts will  
have no idea what to do.  You'll probably need to change src/config/ 
shlib.conf to support your MIPS board.

Once you get past that, there are probably other issues that'll come up:
  * We assume you want to build the applications like telnet, which  
may be impossible for some embedded systems, and you probably don't  
want them anyways.  There's no real hook for building just an SDK or  
something like that.
  * We assume we're building and installing shared libraries; that may  
work for some embedded systems, but not others.
Unfortunately, our documentation for build system dependencies is  
somewhat haphazard, an issue we're hoping to address soon, but some of  
the info you might need is in doc/implementor.texinfo.  It's a little  
out of date, because it still describes building static libraries,  
which we don't support well (or officially at all) at the moment.  I  
did add, at the end, a copy of some email I sent to someone asking  
about a port to pSOS a while back.

I know others have gotten Kerberos code working on embedded systems  
before:
  * TeamF1 has products for VxWorks and others
  * Shoichi Sakane mentions in http://tools.ietf.org/html/draft-sakane-krb-cross-problem-statement-02 
  porting the MIT code to an H8 processor.

If you do go ahead with this, please keep us informed, and please  
consider contributing patches back.  Most of the interest we've heard  
lately has been focused on mobile devices, not precisely the same  
requirements as embedded devices in general, but with some overlap I'm  
sure.  So feedback on how this works out for you may help us plan our  
future work better, and make incorporating future releases easier for  
you in turn.

-- 
Ken Raeburn, Senior Programmer
MIT Kerberos Consortium



More information about the Kerberos mailing list