[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: Sat, 02 Aug 2014 11:28:47 +0200

On 02/08/2014 10:01, Thomas Mueller wrote:
> from François Revol and my original post:
> 
> On 01/08/2014 11:40, Thomas Mueller wrote:
>>> I tried to configure to build tools from NetBSD-current amd64
>>> host but was blocked by Unsupported build platform: netbsd
> 
>> It's not "artificial", it's just because it wasn't tested.
> 
> It's artificial in that the failure is due to the Haiku scripts
> rather than any fault of the NetBSD-hosted cross-build tools.
> 
> Better if the Haiku scripts would warn about possible pitfalls
> associated with an unsupported host platform, make suggestions if
> possible, and let the user proceed at his/her own risk.

We all know people don't read warnings.

> If Haiku can be cross-compiled from OpenBSD, NetBSD ought to have a
> fair chance too.

It does, since you tried anyway :)

Making configure explicitly fail with a reason avoids people reporting
things not building without mentioning their platform, hiding the real
cause of the failure.

> On the question of flex or lex, I checked for both NetBSD and
> FreeBSD, and flex and lex, in /usr/bin/, look to be the same thing,
> hard-linked.  I also checked the man page,  and can't find a
> difference between flex and lex as implemented on FreeBSD and NetBSD.
> Maybe using flex would be safer?

flex is a reimplementation of lex, and most OSes now just use it instead
of the original, but still provide it as "lex" as well for
compatibility. It should just work.

>> It should be in build/jam/ just like the template IIRC. Anyway, you
>> don't need it.
> 
> I see toward the end of Jamrules file, it looks like UserBuildConfig
> should be in $HAIKU_OUTPUT_DIR or HAIKU_BUILD_RULES_DIR.  Maybe this
> is wrong?

The later being build/jam in the sources directory. So either should do yes.

> 
> If there is use for a UserBuildConfig, it might be different for
> different "generated" configurations.  Or maybe setting
> SUPPORTED_PLATFORMS has no effect anyway?

This variable has nothing to do with netbsd.
IIRC it indicates, for each target, which platform it can be built for,
that is, either "haiku", "beos" (but that's not supported anymore) or
"host" meaning the host platform regardless.

> 
> Anyway, thanks for the suggestions.  I intend to make the
> modifications and try again, keeping copies of the original files
> just to be safe.

If you got the sources with a git clone you don't have to, just edit
them and use git diff to see your own modifications to the files.

You'll want to read some git tutorials as well to see how to commit them
and make a proper patch.

> Modifications should have no adverse effect on a subsequent
> cross-build from FreeBSD.
> 
> I intend to report back on my results.

Please do.

François.


Other related posts: