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

  • From: François Revol <revol@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 04 Aug 2014 14:03:45 +0200

On 04/08/2014 06:13, Thomas Mueller wrote:
>> What you want to change is what I pointed last time.
> 
>>> I am new to jam, more familiar with make (BSD and GNU variants).
>>
>>> I noticed no man page; documentation was in HTML (GNU info is my
>>> least favorite).
> 
>> The BeOS tradition is to use HTML. Most ported packages now propose
>> manpages because that's what is installed, and sometimes HTML, but we
>> didn't really work on having man fully functional AFAIK. At least I
>> remember it failing.
> 
>> François.
> 
> HTML is good for me, but HTML viewer is not included in BSD base systems.
> 
> Linux base system is not well-defined among the many distributions.

Oh, you mean the man for jam ?
I thought you were talking about the documentation in the image.

There it is:
http://www.perforce.com/resources/documentation/jam

> I made the changes, but failed for a different reason:
> 
> Starting build of type regular ... 
> warning: unknown rule SUPPORTED_PLATFORMS=

That's probably the things you left in UserBuildConfig, please remove this.

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

> WebKit build feature not available for x86_gcc2 
> Gutenprint support not available on x86 
> qrencode support not available on x86 
> /home/nbarlene/haiku/haiku/src/build/libsolv/Jamfile: Please add a case for 
> your platform (netbsd)! 
> 
> WebKit, Gutenprint and qrencode errors look like something that
> would
> fail equally buiding from NetBSD, FreeBSD, Linux or possibly even
> native Haiku.

No, those are external prebuilt packages.
The notice here is because some are only built with gcc2, some other
only with gcc4. It's meant for.

> 
> I can't see where configure script stores what to build (jam).

It does not.

You decide what to build by passing jam targets, just as with make.

Like:

jam -q haiku-image

(-q stops on the first error)

> Is there any way to tell jam to skip these packages,

No, they are required for the image.

> or do I have to rerun nbconfigure in another "generated" directory?

No, you must add netbsd to the list in the Jamfile along with the
required compile flags.

That's because libsolv is required to build the host packaging tools.

> My configure command was
> 
> ../nbconfigure --build-cross-tools x86_gcc2 ../../buildtools
> --build-cross-tools x86 --use-xattr-ref --include-gpl-addons
> --include-3rdparty
> 
> Maybe the latter two or three parts were overambitious?

GPL add-ons are just few and shouldn't cause trouble.

The last one doesn't have any impact on your setup.

> 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.

As long as configure exited with "Successfully built crosstools"
everything should be fine.

> 
> The last line of the log 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.

Again, that's because none knew what to put here, because it was is not
(yet) supported, because it has not been tested yet.

> 
> I guess I need to add
> 
>     case netbsd :
>         DEFINES += HAVE_FUNOPEN

That looks almost correct...
except for the missing ; at the end, jam requires this to end a statement.
It's probably why it didn't like "SUPPORTED_PLATFORMS=".

> or possibly change "case freebsd" to "case freebsd, netbsd" : syntax that I 
> believe works in C and C++,
> but am not sure about jamfiles.

Please do not touch other cases, it's not like there are 30 common lines.

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

François.

Other related posts: