Skip to content

Add a new installation method for local installation under Linux

Ammar Nejati requested to merge a.newInstallMethod into main

A new installation method is implemented for local installation under Linux. This is performed by the command make install_local or ninja install_local (as opposed to the default make install or ninja install) and installs the BornAgain executable and BornAgain libraries to the system folders.

This was a request by Georg Brandl (31 Jan 2024).

To set the directories, GNUInstallDirs is used as the standard (issue #949 (closed)).

Minor improvements made to the CMake scripts.

==============================================

When building BornAgain 21.1 for our RPM repository, I notice that during the make install step, I get the following output:

[  861s] Linux Package: package root = '/usr',  framework dir = '/usr/lib64/', main executable = '/home/abuild/rpmbuild/BUILD/bornagain-v21.1/redhat-linux-build/bin/bornagain'
[  861s] Linux Package: Qt root dir = '/usr'
[  861s] Linux Package: Qt major version = '6'
[  861s] Linux Package: Qt plugins dir = '/usr/lib64/qt6/plugins'
[  861s] Linux Package: External dependencies:
...
[  861s] Linux Package: Copying external libraries to ''...
[  861s] Linux Package: External libraries in '/usr/lib64/':
...
[  861s] Linux Package: Copying Qt plugins from '/usr/lib64/qt6/plugins' to '/usr/plugins'...
[  861s] /usr/bin/mkdir: cannot create directory '/usr/plugins': Permission denied
...
[  861s] Linux Package: Done.

It seems that the install procedure wants to vendor external libraries and create a "package" of some sort?

This is unnecessary for us. BornAgain is built and installed in the build environment, and there is no need to vendor any libraries. Is there a way to disable this step?

... the systems we build on, on our OBS server, are exactly the same Rocky or Fedora that the package will be installed on later. They have all the dependencies, and there can be no mismatch.

Closes issues #938 (closed), #949 (closed), #950 (closed), #1023 (closed)

Edited by Ammar Nejati

Merge request reports

Loading