Open VincentVanlaer opened 1 month ago
I've just started chipping away at this and started off with the error
mkdir -p build
make/gen-folder-deps "make" const utils math mtx auto_diff num interp_1d interp_2d chem eos forum > build/depend
fatal: No names found, cannot describe anything.
make: *** [make/version.mk:2: data/version_number] Error 128
make: *** Deleting file 'data/version_number'
for both make
and ./install
, which emanates from git tag
. I couldn't for the life of me fetch any tags so I just tagged the HEAD
commit on your build-system
branch and that got the build going.
I'll see how far I get with the SDK (the build feels faster) and then give it a try with my system libraries, which includes GCC 14.2.1, and then the ifort build on the local cluster. It'll take me at least 2-3 weeks to work through but is my MESA priority.
Main commit message
Reasons for replacing the previous build system were:
build
in the repository root, making cleaning build files equivalent to deleting this folderFor the details of the implementation, see the newly added documentation (Developing -> Build system).
Some further notable changes:
pymesa
does not work with the new build system, as the new system does not provide a way to build shared libraries for every module.Draft status
Draft status of this PR will be removed once a decision has been mode about #712 and #723, after which I will rebase.
Reviewing this PR
I recommend to first take a test drive of the new system, especially if you use some special setup (e.g. a non-sdk build). Install instructions haven't changed. I have written relatively detailed documentation on how the new system works, which I recommend reviewers of this PR to read before diving into the Makefiles and scripts. Let me know if something is unclear or missing in the documentation! The first few commits are just #712 and #723, so those can be skipped (if #712 and #723 don't end up being merged, it is an easy change to add the files back). The other commits are truly part of this PR, with the first two introducing the new build system. The other commits are porting of individual modules.
Remarks
$MESA_DIR/lib
and$MESA_DIR/include
. Once all modules have been ported, this will no longer be needed for a normal install, except for the data files. Internally, the different modules that have been ported don't use those files.git describe --tags
which generates (in my opinion) nicer version numbers than just using the commit hash. However, this requires the version tags to be on the main branch (currently running this command onmain
givesr15140-2084-ge29ed74d
rather than something liker24.08.1-NNNN-ge29ed74d
).pymesa
currently doesn't work. This is because I think it would make more sense to build one single shared library after the main build as a separate step, rather than a bunch of little libraries which need to be able to refer to each other. I intend to do this anyway for the output of the star/binary module, such that building the actually star binary can proceed faster, and allow for things such as experimenting with link-time optimization.Future iterations
I have thought about some future iterations of the build system after this, but I have not implemented those things since otherwise I would keep iterating forever on this build system trying to design the perfect build system. Hence, writing this down to at least have it documented somewhere.
I have probably forgotten some things I wanted to mention, but this should be most of it.