From 4cfa34b1e101adcd050a476307b7680db8afcd8e Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Fri, 3 Jul 2026 16:23:00 +0200 Subject: Configuration: fixed portability issues, add jq and updated GCC Summary: this commit will not affect your analysis: only the version of GCC has been updated for portability and jq (a JSON parser) has been added. Until now, several portability issues existed in Maneage, causing problems mostl on macOS, but some also some on GNU/Linux. They are listed below along with the fix. With this commit, the problems mentioned above have been fixed: - 'pkg-config' on macOS needed some manual steps for a successful installation. The cause was its improper checks on the macOS "carbon" library. So we now manually fix this check within the code to fix the problem. This was found and fixed by Martin Wiesmann. - Apple chip variants like M1 Pro, M1 Max, M1 Ultra, M2 Pro, etc could not be properly recognized as a macOS system since we expected a single word. This was solved by using pattern matching instead. Found and fixed by Martin Wiesmann. - macOS's sha512sum wraps the 128-character hex hash across two output lines (80 + 48 chars) and the command that we used to read the output would only captured the first 80 characters, so checksums never matched. The solution was to merge the lines before the check. Found and fixed by Martin Wiesmann. - When a checksum failed, the script exited with an error but left the bad '.unchecked' file on disk. On the next run, the download script saw the file already existed and skipped downloading entirely. As a result, the corrupt file was passed to the checksum check again, failing forever. The fix was to remove the file when we confirmed a bad download. Found and fixed by Martin Wiesmann. - When the server of a file returns a HTML output instead of the file we want, the download script could not detect and would assume that the download was successful. Therefore, it would always crash with a checksum error. The fix was to check the first few bytes of the output and consider it failed if we detect ' /dev/null; then c=$$(git merge-base HEAD maneage) v=$$(git describe --always --long $$c) d=$$(git show -s --format=%aD $$v | awk '{print $$2, $$3, $$4}') + +# No 'maneage' branch found else - echo - echo "WARNING: no 'maneage' branch found! Without it, the latest merge of " - echo "this project with Maneage can't be reported in the paper (which is bad " - echo "for your readers; that includes yourself in a few years). Please run " - echo "the commands below to fetch the 'maneage' branch from its own server " - echo "and remove this warning (these commands will not affect your project):" - echo " $ git remote add origin-maneage http://git.maneage.org/project.git" - echo " $ git fetch origin-maneage" - echo " $ git branch maneage --track origin-maneage/maneage" - echo + +# Only print a warning if a PDF is to be created. + if [ x$(pdf-build-final) = xyes ]; then + echo + printf "WARNING: no 'maneage' branch found! Without it, " + printf "the latest merge of this project with Maneage can't " + printf "be reported in the paper (which is bad for your " + printf "readers; that includes yourself in a few years). " + printf "Please run the commands below to fetch the " + printf "'maneage' branch from its own server and remove " + printf "this warning (these commands will not affect your " + printf "project):\n" + printf " $ git remote add origin-maneage " + printf "http://git.maneage.org/project.git\n" + printf " $ git fetch origin-maneage\n" + printf " $ git branch maneage --track " + printf "origin-maneage/maneage\n" + echo + fi v="\textcolor{red}{NO-MANEAGE-BRANCH (see printed warning to fix this)}" d="\textcolor{red}{NO-MANEAGE-DATE}" fi -- cgit v1.2.1