[haiku-development] [haiku] Can't build (jam) anyboot-image because of artificial barrier

  • From: "Thomas Mueller" <mueller6723@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 01 Aug 2014 09:40:13 +0000

I tried to configure to build tools from NetBSD-current amd64 host but was 
blocked by 
Unsupported build platform: netbsd

but got around that by making a script nbconfigure, starting with configure 
script but adding 

case "${platform}" in
        Darwin) HOST_PLATFORM=darwin ;;
        FreeBSD)        HOST_PLATFORM=freebsd
                                SFDISK_BINARY=sfdisk-linux
                                if [ "$HAIKU_HOST_USE_32BIT" = 1 ] ; then
                                        echo Unsupported platform: FreeBSD 
${platformMachine}
                                        exit 1
                                fi      ;;
        Haiku)  HOST_PLATFORM=haiku_host ;;
        Linux)  HOST_PLATFORM=linux ;;
        OpenBSD) HOST_PLATFORM=openbsd ;;
        NetBSD) HOST_PLATFORM=netbsd ;;
        SunOS)  HOST_PLATFORM=sunos ;;
        CYGWIN_NT-*) HOST_PLATFORM=cygwin ;;
        *)              echo Unsupported platform: ${platform}
                        exit 1 ;;
esac

and

                        case $HOST_PLATFORM in
                                freebsd|openbsd|netbsd) MAKE=gmake;;
                                *)                                      
MAKE=make;;
                        esac

Lines with "netbsd" were my modifications.

After the first modification, building the cross-tools failed apparently 
because of incompatibility with BSD make, just as building jam failed with 
"make" but succeeded with "gmake".

Then I successfully built the cross-tools using gcc-aux, which includes Ada as 
well as C and C++, for both x86_gcc2 and X86 hybrid, and x86_64.

But when I go to haiku/haiku.nbgenerated directory and try to build the 
anyboot-image with

jam -q @anyboot-image 

I get

Unsupported host platform: netbsd 

I grep'ed recursively on "supported" and "SUPPORTED", found 
SUPPORTED_PLATFORMS, but how do I add netbsd to that list, or disable the 
filter that blocks me?

After modifying "configure" and successfully building the cross-tools, I ought 
to have a fair chance to see if I can build the anyboot-image (also boot floppy 
image if possible).

I put UserBuildConfig in nbgenerated directory:

HAIKU_BUILD_FEATURE_SSL = 1 ;
SUPPORTED_PLATFORMS= haiku netbsd ;

I would of course not use this latter line if building from FreeBSD or Linux.

Is this the wrong way?  Should UserBuildConfig be in another directory?  
Documentation is not very clear.

I looked through the Jamrules, UserBuildConfig (ReadMe and sample); modifying 
the Jamrules and included files directory would be too error-prone, so there 
ought to be a different way to make the system see netbsd as a supported 
patform.

Earlier, with FreeBSD, using gcc-4.7.3 from FreeBSD ports, I fell short on 
building the cross-tools, succeeding with x86gcc2 but not x86 (gcc4); 
generated.nodl/build directory was empty so I could not use this to build 
x86_gcc2 anyboot image.

But I feel like I ought to get the chance with cross-tools successfully built 
from NetBSD.

Tom


Other related posts: