[build2] Executable ELF files not installed with executable file mode

Boris Kolpackov boris at codesynthesis.com
Sun Sep 16 15:06:08 UTC 2018


Matthew Krupcale <mkrupcale at matthewkrupcale.com> writes:

> The install operation appears to use the config.install.mode mode on
> every target file installed,

It is a bit more elaborate (and not yet completely documented) than
this: a target type (library, executable) may specify a custom mode with
install.mode. If it is not specifies, then the default is taken
from the directory's .mode value where the target is installed which
itself can be overridden with config.install.*.mode.



> I think it would be appropriate to install executables such as ELF
> files (shared libraries and programs) and scripts with executable file
> mode.

Yes, this normally happens automatically. I think it doesn't work for
you because you've overridden all the installation locations explicitly
but did not specify the desired mode for them:

config.install.root=/usr
config.install.exec_root=/usr
config.install.bin=/usr/bin
config.install.sbin=/usr/sbin
config.install.include=/usr/include
config.install.lib=/usr/lib64
config.install.man=/usr/share/man
config.install.pkgconfig=/usr/lib64/pkgconfig

You either need to add something like:

config.install.bin.mode=755

Or, perhaps better, rely on the default locations and modes[1] and
only tweak what's different:

config.install.lib=exec_root/lib64

[1] https://build2.org/build2/doc/build2-build-system-manual.xhtml#intro-operations-install



More information about the users mailing list