diff options
author | Raul Infante-Sainz <infantesainz@gmail.com> | 2022-06-09 17:15:33 +0200 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2022-06-10 23:21:20 +0200 |
commit | 502abf6870882f31b312c42773cd11779a8c72fc (patch) | |
tree | 0ae67d513106e56364802925770e0e2596fc6024 /reproduce/software/shell | |
parent | ab811d0952ac93ce608c81ab2cc44d67c7b02dbe (diff) |
Configuration: num Apple M1 cores, ImageMagick dep. on GhostScript
Until now, we never had the opportunity of testing Maneage in a macOS
laptop with an Apple M1 CPU (tested on macOS Monterey; version 12.3). The
way of getting the number of cores for this type of CPU is different from
other macOSs. It was therefore necessary to change the parameters of the
'sysctl' for properly accounting this CPU.
Furthermore, until now, GhostScript and ImageMagick were built
independently. However, they were not linked. As a consequence, when trying
to obtain an image with the program 'convert' (that belongs to
ImageMagick'), it complains about not having some fonts. This can be fixed
by letting 'ImakeMagick' know that 'GhostScript' libraries are available.
With this commit, GhostScript has been set as a dependency of ImageMagick,
and ImageMagick is configured with the '--with-gslib' flag. Furthermore, to
read the number of M1 CPU cores, we distinguish between the Apple M1 and
all other CPU types. However, Maneage still does not successfully build all
the software until the end of the configure step. There are other problems
that need to be fixed for Apple's M1.
Diffstat (limited to 'reproduce/software/shell')
-rwxr-xr-x | reproduce/software/shell/configure.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/reproduce/software/shell/configure.sh b/reproduce/software/shell/configure.sh index 7f5f9c4..b946c3b 100755 --- a/reproduce/software/shell/configure.sh +++ b/reproduce/software/shell/configure.sh @@ -274,8 +274,17 @@ elif [ x$on_mac_os = xyes ]; then if [ x$hw_byteorder = x1234 ]; then byte_order="Little Endian"; elif [ x$hw_byteorder = x4321 ]; then byte_order="Big Endian"; fi - address_size_physical=$(sysctl -n machdep.cpu.address_bits.physical) - address_size_virtual=$(sysctl -n machdep.cpu.address_bits.virtual) + # On macOS, the way of obtaining the number of cores is different + # between Intel or Apple M1 CPUs. Here we disinguish between Apple M1 + # or others. + maccputype=$(sysctl -n machdep.cpu.brand_string) + if [ x"$maccputype" = x"Apple M1" ]; then + address_size_physical=$(sysctl -n machdep.cpu.thread_count) + address_size_virtual=$(sysctl -n machdep.cpu.logical_per_package) + else + address_size_physical=$(sysctl -n machdep.cpu.address_bits.physical) + address_size_virtual=$(sysctl -n machdep.cpu.address_bits.virtual) + fi address_sizes="$address_size_physical bits physical, " address_sizes+="$address_size_virtual bits virtual" else |