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

  • From: "Thomas Mueller" <mueller6723@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 05 Aug 2014 05:36:30 +0000

> Besides, it looks like the statement is malformed. IIRC you must have
> spaces around =, and you must end it with ;

This shows how new I am to jam.  Syntax differs substantially from makefiles, 
both GNU make and BSD make.

I've also wondered about the jam equivalent of "make clean".

From FreeBSD, I succeeded building x86_gcc2 but failed on x86 (gcc4).  It looks 
like I would not be able to jam for x86_gcc2 only (nothing in build 
subdirectory) but would have to start over.

That build of cross-tools ended in failure (gcc4 part).

The last line of the log (from NetBSD) regards HAVE_FUNOPEN and FOPENCOOKIE, 
also HAVE_QSORT_R or HAVE___QSORT:

# One of the following must be defined:
# * HAVE_FUNOPEN / HAVE_FOPENCOOKIE
#
# One of the following can be defined:
# * HAVE_QSORT_R / HAVE___QSORT ?
switch $(HOST_PLATFORM) {
        case linux :
                DEFINES += HAVE_STRCHRNUL HAVE_QSORT_R HAVE_FOPENCOOKIE ;
        case haiku_host :
                DEFINES += HAVE_FOPENCOOKIE ;
        case freebsd :
                DEFINES += HAVE_FUNOPEN ;
        case darwin :
                DEFINES += HAVE_FUNOPEN HAVE_QSORT_R ;
        case * :
                Exit $(SUBDIR)/Jamfile: "Please add a case for your platform"
                        "($(HOST_PLATFORM))!" ;
}

I see "man funopen" and "man qsort" in section 3, but no fopencookie; also 
openbsd is absent in the above cited lines.

I also checked these man pages for OpenBSD, in this case at www.openbsd.org 
website.

NetBSD, FreeBSD and OpenBSD both had funopen and qsort; FreeBSD also had 
qsort_r showing in man page.

So maybe

    case netbsd :
        DEFINES += HAVE_FUNOPEN HAVE___QSORT ;
# openbsd presumably like netbsd
and
    case freebsd:
        DEFINES += HAVE_FUNOPEN HAVE_QSORT_R ;

I noticed openbsd listed in the Jamfile and included files.

Has OpenBSD been successfully used to build Haiku, as far as you know?

OpenBSD can't read my hard drive for lack of GPT support.  DragonFlyBSD can't 
read FreeBSD and NetBSD partitions, and NetBSD and FreeBSD can't read DragonFly 
partitions, even if they're all ffs aka UFS. 

So I don't use OpenBSD or DragonFly, too incompatible.

Fixing build/jam/BuildSetup and src/build/libsolv/Jamfile, it appears that the 
lines in build/jam/HelperRules are not the culprit for stopping a build from 
NetBSD.

I changed the lines to

                case * :
                {
                        if ! ( $(platform) in $(otherPlatforms) ) {
                        ECHO "Unsupported $(platformKind) platform:" " 
$(platform)" ;
                        ECHO "But we\'ll try anyway" ;
                        $(varPrefix)_PLATFORM_HAIKU_COMPATIBLE = true ;
                        }
                }

and this message didn't show.  Maybe otherPlatforms was set from BuildSetup ?

Big reason for using NetBSD is bug in FreeBSD re(4) Ethernet driver, same bug 
in OpenBSD and DragonFly, but OK with NetBSD, Linux and Haiku R1Alpha4.

USB wi-fi adapter in FreeBSD sometimes connects, sometimes doesn't, and when it 
does, it can go down any time without warning.

Now I feel like I have something to work on.  Thanks for pointers!

> I should probably put all this in an article for the next one trying to
> add a supported platform...

> François.

Excellent idea!

Tom


Other related posts: