Elliptica_ID_Reader fails to compile on macOS

Issue #2708 new
Roland Haas created an issue

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)

  1. Alireza R.

    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!

  2. Log in to comment