Topic: NetBSD 5.1 Crosscompile on FreeBSD 8.2 failed

Hi

I tried to crosscompile the NetBSD 5.1 on FreeBSD 8.2. But unfortunetally the compilation failed with this output: http://pastebin.com/FbAjeMLn

It seems that some undefined references exists, e.g.:

The function "SHA384_Final" not find reference to "be64enc"
The function "SHA512_Final" not find reference to "be64enc"
The function "SHA224_256_Final" not find reference to "be32enc"

But in the manpage of FreeBSD "man 9 byteorder" stands that alls this references should be implemented. My build way was following. I downloaded the sources with:

           $ ftp -i ftp://ftp.at.NetBSD.org/pub/NetBSD/NetB … urce/sets/
           ftp> mget *.tgz
           ftp> quit

Extracted them inside the home directory ~/.../usr/src:

               $ foreach file (*.tgz)
               ? tar -vxzf $file -C /usr/src
               ? en

And have started the compilation of the toolchain with:

           $ cd ~/.../usr/src
           $ ./build.sh -m i386 -O ../obj tools

What is wrong in my way? I have seen in google, that some people have same problem. But unfortunetally nobody written a solution. It's maybe possible to disable some SHA algorithms? Or exists a more nice solution? smile

Re: NetBSD 5.1 Crosscompile on FreeBSD 8.2 failed

I found a solution in this link http://mail-index.netbsd.org/netbsd-bug … 14886.html

There stands, that in the configuration process the sys/endian.h is missing. To solve that, you need edit some files in usr/src/tools/compat. The first file is configure where you need add sys/endian.h to ac_header behind machine/endian.h like below:

for ac_header in ... sys/endian.h machine/endian.h ...

Afterwards you need edit file configure.ac. Add simple sys/endian.h to AC_CHECK_HEADERS behind machine/endian.h like below:

AC_CHECK_HEADERS(... sys/endian.h machine/endian.h ...

In the end, edit file nbtool_config.h.in and add between #undef HAVE_SYS_DIR_H and #undef HAVE_SYS_FEATURETEST_H this:

/* Define if you have the <sys/endian.h> header file. */
#undef HAVE_SYS_ENDIAN_H

I have tested that on FreeBSD 8.2-RELEASE (i386) to build NetBSD 5.2 for i386 and it work smile

Last edited by xoom4 (2011-07-28 12:07:37)

Re: NetBSD 5.1 Crosscompile on FreeBSD 8.2 failed

Hi xoom4, it worked perfectly! Thanks a lot! smile