bugfix: build.sh cross-compile on NetBSD host

67 views
Skip to first unread message

Nishimura Toru

unread,
Sep 5, 2013, 9:32:13 AM9/5/13
to min...@googlegroups.com
Hi,

Minix3 cross-compile fails when it's tried on NetBSD host.  The fix was found
a plain one-liner.

===================================================================
RCS file: tools/compat/RCS/configure,v
retrieving revision 1.1
diff -r1.1 tools/compat/configure
1872c1872
< #ifdef __minix
---
> #if defined(__minix) || defined(__NetBSD__)
===================================================================

With the fix above, "build.sh ... distribution" is now successful for me;

make distribution started at:  Thu Sep  5 22:07:42 JST 2013
make distribution finished at: Thu Sep  5 22:29:34 JST 2013
===> Successful make distribution
===> build.sh ended:      Thu Sep  5 22:29:34 JST 2013
===> Summary of results:
         build.sh command:    ./build.sh -m i386 -u -U -T /home/nisimura/Minix-HEAD/tools -D /home/nisimura/Minix-HEAD/build/i386/root -R /home/nisimura/Minix-HEAD/build/i386/release -O /home/nisimura/Minix-HEAD/build/i386/obj distribution
         build.sh started:    Thu Sep  5 22:07:42 JST 2013
         MINIX version:       3.2.1
         MACHINE:             i386
         MACHINE_ARCH:        i386
         Build platform:      NetBSD 6.0.1 i386
         HOST_SH:             /bin/sh
         TOOLDIR path:        /home/nisimura/Minix-HEAD/tools
         DESTDIR path:        /home/nisimura/Minix-HEAD/build/i386/root
         RELEASEDIR path:     /home/nisimura/Minix-HEAD/build/i386/release
         Updated makewrapper: /home/nisimura/Minix-HEAD/tools/bin/nbmake-i386
         Successful make distribution
         build.sh ended:      Thu Sep  5 22:29:34 JST 2013
===> .





Lionel Sambuc

unread,
Sep 5, 2013, 10:09:47 AM9/5/13
to min...@googlegroups.com
Hi,


I am testing your patch, and I will submit it as soon as I have
reproduced your result.

You can see the patch I am testing here:
http://git.minix3.org/?p=minix-lionel.git;a=commitdiff;h=eabd2931520ec87efb33b58f876d8a3e53516714

Do not hesitate to comment about it, this is your patch.

Thank you for this contribution!


Regards,

Lionel
> --
> You received this message because you are subscribed to the Google Groups
> "minix3" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to minix3+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Nishimura Toru

unread,
Sep 5, 2013, 12:09:59 PM9/5/13
to min...@googlegroups.com
Thank you for the prompt response.

A bit more about the problem.  Without the fix mentioned earlier
configure generates incorrect "nbtool_config.h" in tools/compat/
directory.  Because it contains the wrong set of #define lines, it
ends up with compile errors; the first one will be "getopt_long.c"

Toru Nishimura / ALKYL Technology

Antoine LECA

unread,
Sep 5, 2013, 1:52:11 PM9/5/13
to min...@googlegroups.com
Nishimura Toru wrote:
> Minix3 cross-compile fails when it's tried on NetBSD host. The fix was
> found a plain one-liner.
>
> ===================================================================
> RCS file: tools/compat/RCS/configure,v
> retrieving revision 1.1
> diff -r1.1 tools/compat/configure
> 1872c1872
> < #ifdef __minix
> ---
>> #if defined(__minix) || defined(__NetBSD__)
> ===================================================================

I submitted a similar patch (OK, more complex since I also fixed the
text message, patched configure.ac from which this file is derived) in

https://github.com/antoineL/minix/commit/x-netbsd

(which you are welcome to test and comment upon), also part of

https://groups.google.com/d/msg/minix3/7eoCX1CEJpQ/E1p-Sv9WekcJ
https://github.com/antoineL/minix/commits/WRK0408e

but (AFAIK) it is not yet entered in the submission queue.

I was told, or at least I understood, that cross-compiling from NetBSD
hosts was less useful than from Linux and MacOS and FreeBSD, all kind of
hosts are OK to date; in other words, that I was the unique user; so I
welcome you as the 2nd person which is using NetBSD as cross-compilation
base! :-)


Antoine

Nishimura Toru

unread,
Sep 5, 2013, 7:19:06 PM9/5/13
to min...@googlegroups.com
> but (AFAIK) it is not yet entered in the submission queue. 
> I was told, or at least I understood, that cross-compiling from NetBSD
> hosts was less useful than from Linux and MacOS and FreeBSD,

Well, it makes no sense. I have been a NetBSD developer for 10+ years
of MIPS / PPC / ARM and am quite accustomed with build.sh  I'm suspicious
the intent is to exclude the real NetBSD to use. :-)

Nataraj S Narayan

unread,
Sep 6, 2013, 4:49:36 AM9/6/13
to minix3
Hi

I too am most at home with NetBSD, when the Arch linux and PCBSD give me hiccups at the inopportune moments. I find solace on the NetBSD installation. 

Yeah, perhaps a sinister intent to exclude, even when so much has been adopted from NetBSD for minix3.

regards

Nataraj


2013/9/6 Nishimura Toru <tsle...@gmail.com>
--

Lionel Sambuc

unread,
Sep 6, 2013, 4:50:36 AM9/6/13
to min...@googlegroups.com
Hi Nishimura,


Your patch has been merged mainline.


Regards.

Ben Gras

unread,
Sep 6, 2013, 5:12:04 AM9/6/13
to min...@googlegroups.com, nata...@gmail.com
Settle down guys, it's collateral damage from getting things to build Minix at all.

Of course we want to be able to build Minix from as many systems as possible, that's the whole point of adopting the NetBSD build system in the first place.

Thanks for the fix tot he original poster, it's great!
Reply all
Reply to author
Forward
0 new messages