the-lambda-way / bruteforce-enigma

A tool for cracking and bruteforcing Enigma ciphers.
MIT License
19 stars 3 forks source link

error compiling with make on apple silicon Sonoma 14.2.1 #13

Open godfriedt opened 2 months ago

godfriedt commented 2 months ago
[crxunch@mac] bruteforce-enigma % make crack_enigma     
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
Building build/bruteforce.o .../usr/bin/time: illegal option -- -
usage: time [-al] [-h | -p] [-o file] utility [argument ...]
make: *** [build/bruteforce.o] Error 1
the-lambda-way commented 1 month ago

Hi, I encountered this problem before on macOS (see Issue #5) and thought I had fixed it, but I guess Macs don't use the GNU time command at all. I don't have a Mac to test on, so

The error message "usr/bin/time illegal option" means that you are trying to use an option with the time command that is not supported on macOS. The time command on macOS is a BSD-like command that does not accept all of the same options as the GNU time command.

If you need to use an option that is not supported by the macOS time command, you can use the gtime command instead. The gtime command is a GNU-compatible time command that is available on macOS through Homebrew. To install gtime, open Terminal and run the following command:

brew install gtime

I don't know how to make the time command work across the three major OSes. If you figure out a good cross-platform solution, please let me know.