[build2] [bug] Crash - Buffer Overrun when using different (unsupported?) directory layout

Klaim - Joël Lamotte mjklaim at gmail.com
Tue Feb 20 13:49:45 UTC 2018


On Tue, Feb 20, 2018 at 1:08 PM, Boris Kolpackov <boris at codesynthesis.com>
wrote:

>
> It is not yet documented precisely so the best way for now is to try
> to mimick existing projects. But in short:
>
> 1. The build/ subdirectory signifies the project root. It must contain
>    bootstrap.build and may contain root.build.
>
> 2. All source code belonging to the project should be under the project
>    root (naturally).
>
> [...]
>
> It appears a lot of people don't realize what a monumental task it is
> to design and implement a single sane C++ project layout that is capable
> of handling modern requirements (out of source builds, subprojects,
> amalgamation, etc). Let a lot several such sane layouts. And we are not
> even talking about insane layouts like the ones you've presented ;-).
>
>
Well they are insane if you are using build2 from the start of your library
project, I guess.
Otherwise, trying to plug build2 in a project already having one or several
build systems
supported is not that obvious to me (and apparently others?)
to do without having to do a totally separate repo
than the original one (as you do with your dependencies), which is why I
attempted to see
if it would work by just having a build2 specific directory in the original
repo.

But I understand the complexities that imply.


> So, in short, build2 will only ever support single, "true" layout that
> all the existing projects/examples are using. Life is hard enough as it
> is.
>


It shouldn't be a problem, really, at least for me, to require reasonable
layout constraints.
The main problem I had was probably lack of documentation or clear feedback
from the tools
that the layout was the source of most of my issues.

Maybe a quick layout check, with a warning that could clarify why the rest
of the operations
attempted to an invalid layout will fail, could be possible and cheap to
implement?
Not sure but it seems just checking the first assumption you listed and
that each source path
manipulated is in the tree as expected would be possible. But maybe it
would be expensive.

I think I only lost time because of not understanding the layout
requirements.
As soon as you know, things get simple, as expected.

Joël
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.build2.org/archives/users/attachments/20180220/d96a09ea/attachment.html>


More information about the users mailing list