Elliptica_ID_Reader fails to compile on macOS
Trying to compile Elliptica_ID_Reader (git hash ) on macOS Ventrua (M1) I get an error:
/Users/rhaas/Cactus/configs/sim/scratch/build/Elliptica_ID_Reader/Elliptica_ID_Reader_1.0/src/physics_lib.h:111:28: note: format string is defined here
111 | fprintf(file,"%-30s = %s\n",phys->par,par___temp);\
| ^~
cp: illegal option -- u
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-aclpsvXx] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-aclpsvXx] source_file ... target_directory
make[4]: *** [/Users/rhaas/Cactus/configs/sim/scratch/build/Elliptica_ID_Reader/Elliptica_ID_Reader_1.0/lib/libelliptica_id_reader.so] Error 64
due to passing incorrect options to the cp
command somewhere in its Makefile.
This seems to point to an assumption of using GNU tools and running on Linux. Both of which are invalid on macOS (at best it’s a BSD derivative user land wise).
Only POSIX shell commands and GNU Make features must be used.
As a side note: the makefile is forcibly setting .SILENT
. Ideally it should inherit its setting from the main Cactus makefile which sets it based on the VERBOSE
option (and propagates the decision to sub-makes using the MAKEFLAGS
variable which GNU makes respects).
Addendum: It is actually worse. Build.sh uses
exec >/dev/null # redirect stdout to null to avoid makefile prints
which just throws away all stdout of make. This should not be done.
Comments (6)
-
reporter -
reporter - changed milestone to ET_2023_05
-
I removed the culprit flag that caused the incompatibly with macOS. Please let me know if it now goes smooth on macOS. Additionally, I commented out the redirection of the makefile outputs. Thanks for the info!
-
- changed milestone to ET_2023_11
-
reporter Fixed as of git hash 5b24862 "Added DFLAGS for the compilation." of Elliptica_ID_Reader
-
- removed milestone
- Log in to comment
Allowed
cp
options are listed on the OpenGroup’s (POSIX) website: https://pubs.opengroup.org/onlinepubs/009695399/utilities/cp.htmlIn addition to POSIX and GNU make, one can also use
$(PERL)
and$(AWK)
which Cactus detect, though I doubt they are useful for whatevercp
might have done.