Install.sh overhaul - #367
Open
bonachea wants to merge 24 commits into
Open
Conversation
c_sizeof only allows interoperable types
Due to copy-pasta we were printing the wrong value for CFLAGS
Add a new section for library dependencies, and add the version and source
Realpath is not available by default on macOS, but perl is and we already require perl (through GASNet) so use perl instead. This usually eliminates the need for Homebrew coreutils package, because suitable GNU Make is also available by default. run-fpm.sh was already relying on bash-isms, so be explicit that it requires bash.
Homebrew provides GNU Make in the `make` package (not `coreutils`, as previously claimed), and the provided binary is called `gmake`, not `make`. This has probably never been encountered because modern distros of both Linux and macOS already include a `/usr/bin/make` by default. However when probing for make, check for `gmake` first, because it's more likely to give us a newer version when available on macOS.
GASNet is a required dependency, and we prefer the install script to install its own copy (or re-use one in the prefix); asking just encourages users to try and manually install GASNet themselves, which basically saves nothing and they are likely to get it wrong. fpm doesn't ask permission to download required dependencies (e.g. Assert), so stop asking permission to download GASNet.
This GASNet configure option is now also recognized by Caffeine install with the following behaviors: * Defaults to --disable-debug (i.e. optimized mode) * Controls the default setting for ASSERTIONS, unless explicitly overridden in CPPFLAGS/FFLAGS. As a result, **Caffeine ASSERTIONS now default to disabled**, which is a change in behavior. * Default Fortran optimization to -O0 in debug mode, otherwise -O3 as before.
Add jobs to cover --disable-debug builds Add command to check ident strings
The previous logic didn't generate the intended error message when an expected compiler wasn't found, it just exited without a message due to set -e
Ensure we pass CC to GASNet via full canonical path, and update the mismatch error message to be more informative. Also expand C++ compiler detection to handle Macports clang++, which can have a name like clang++-mp-23
Only rewrite flang(-[1-9][0-9])? to flang-new when the resulting file exists and shares a real path.
Excise most uses of `realpath`: canonical pathnames are only necessary when we need to compare two executables for equality. Some compiler wrappers (and possibly other tools) can change behavior when you unwrap a basename symlink, so stop doing that: we should no longer invoke the result of `realpath`. New function `abspath` returns a non-canonical absolute pathname for a (possibly relative) pathname, without removing symlinks. Don't use `command -v` because it will pick up shell functions and we're always looking for on-disk executables. Use `type -P` instead to check for executables in $PATH. Both `type -P` and `which` can return relative paths (when there are relative paths in $PATH), so don't rely on either to retrieve absolute paths, new function `abswhich` does that. Remove unnecessary/redundant variables FPM_FC and FPM_CC
Setting FC=flang-new for the benefit of fpm should now always be handled by the install script as appropriate. The only exception is flang versions before 20, where the only executable was named flang-new
* Relocate and simplify pkg-config file generation * Additional new pkg-config fields to provide more information * Generate threadmode-codemode variant of the .pc file * Add the gasnet pkg-config dependency, and remove the redundant flags that will be inherited from the gasnet.pc file
This was previously defaulting to empty when neither CAF_IMAGES nor GASNET_PSHM_NODES was set, leading to a warning from GASNet at run time.
Also prohibit `run-fpm.sh install`, which does not complete a full install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Performs some overdue cleanup on the
./install.shscript to improve robustness and maintainability, in preparation for future feature expansion.Highlights:
--{enable,disable}-debugoption, mirroring the GASNet option, to control production vs debugging mode--enable-debugto restore assertion checking.caffeine*.pcfiles)See individual commit messages for more details.
Fixes #241