mnemonic icon indicating copy to clipboard operation
mnemonic copied to clipboard

Command `make install` does not work On MacOS

Open sinistersnare opened this issue 6 years ago • 5 comments

Running

$ git clone $MNEMONIC
$ cd mnemonic
$ sudo make install
find: illegal option -- t
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
       find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]
install -m 0755 -v ./target/release/mn /usr/local/bin/mn
install: ./target/release/mn -> /usr/local/bin/mn
cp /mn.1 /usr/local/share/man/man1/mn.1
cp: /mn.1: No such file or directory
make: *** [install] Error 1

I thought this had to do with the Cargo build, but it seems to be about install the manpages.

Anyways, I think I will use this to replace my usage of MacOS Notes.App, thanks for making it!

sinistersnare avatar Jan 23 '19 21:01 sinistersnare

Very interesting! It turns out that MacOS uses the BSD implementation of the find command, so my use of the --type flag wasn't valid. I've updated the makefile to use only the -path flag, which should be supported by both programs. Can you let me know if this solves the issue and correctly installs the man page?

And yes, the makefile currently does not build the binary, just installs it to the users path. Would it be better to add building the binary as part of the makefile? I wasn't sure of best practice there.

In any event, thanks for the feedback and glad you like it.

codesections avatar Jan 23 '19 21:01 codesections

Closing this as resolved. Let me know if it isn't and I'll reopen.

codesections avatar Jan 24 '19 17:01 codesections

▶ find -path "./target/release/build/mn-*/out"
find: illegal option -- p

Looks like not even -path is working.

sinistersnare avatar Jan 24 '19 19:01 sinistersnare

Hmm, I'll have to take another look at this. Thanks for the testing.

codesections avatar Jan 24 '19 19:01 codesections

I have updated the makefile to not use find at all. Does the current version work on a mac?

codesections avatar Jan 25 '19 14:01 codesections