Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OS X: cp: illegal option -- u #64

Closed
hughperkins opened this issue Jul 2, 2017 · 9 comments
Closed

Mac OS X: cp: illegal option -- u #64

hughperkins opened this issue Jul 2, 2017 · 9 comments
Assignees
Labels

Comments

@hughperkins
Copy link

On Mac OS X, branch 'master':

When I do:

git clone https://libfuse/sshfs
cd sshfs
mkdir build
cd build
meson ..
ninja

What I expect to happen:

build finished ok

What actually happens:

(root) ~/git-local/sshfs/build (master|…1) $ ninja
[1/3] Generating test_scripts with a custom command.
FAILED: test/conftest.py test/pytest.ini test/test_sshfs.py test/util.py 
cp -fPu --preserve=mode ../test/conftest.py ../test/pytest.ini ../test/test_sshfs.py ../test/util.py /Users/hugh2/git-local/sshfs/build/test
cp: illegal option -- u
@Nikratio
Copy link
Contributor

Nikratio commented Jul 8, 2017

Thanks for the report! GNU cp has a -u flag that means:

       -u, --update
              copy only when the SOURCE file is newer than the destination file or when the
              destination file is missing

Could you check if MacOS' cp has something similar?

@Nikratio Nikratio self-assigned this Jul 8, 2017
@Nikratio Nikratio added the bug label Jul 8, 2017
@hughperkins
Copy link
Author

Doesnt appear to. So you should always copy on mac perhaps. or use python perhaps.

screen shot 2017-07-09 at 8 52 56 am

@hughperkins
Copy link
Author

why closed?

@hughperkins
Copy link
Author

ah I see. you closed via a commit. cool :-) Thanks! :-)

@komali2
Copy link

komali2 commented Sep 13, 2017

Hey man, sorry to say that due to this + libfuse/libfuse#204 , you are stuck between a rock and a hard place if you try to from-scratch install sshfs on OSX.

  1. We are forced to use 2.x because no fuse3

  2. We don't have the commit that fixes this issue (ninja doesn't run.)

Will report back if this prevents actual usage, instead of just testing.

@Nikratio
Copy link
Contributor

I don't understand. If you have to use sshfs 2.x, and can't use Ninja/Meson, then you shouldn't see this problem in the first place (because it exists only in the Meson configuration).

reidwagner pushed a commit to reidwagner/sshfs that referenced this issue Sep 30, 2017
Not supported on OS X, and not strictly necessary.

Fixes: libfuse#64.
Nikratio added a commit that referenced this issue Oct 25, 2017
Not supported on OS X, and not strictly necessary.

Fixes: #64.
@siddsach
Copy link

I had the same issue and keep getting the error @hughperkins posted when i run the ninja command. I tried using sshfs 2.x, but still get this error, but I'm using meson and ninja. If I shouldn't use ninja/meson, how should i install, because the instructions to install only provide a method using those packages.

@Nikratio
Copy link
Contributor

Take a look at the instructions that come in the SSHFS 2.x tarball.

@tormodwill
Copy link

tormodwill commented Feb 17, 2021

command: ['cp', '-fP', '--preserve=mode',
                        '@INPUT@', meson.current_build_dir() ]

--preserve=mode
Yes, works for linux. For BSD : no go. Suggest that the following parameter should be used for BSD / OSX :
-fp . Please note that this is the small letter p ( p for papa ). The --preserve=mode was not working for me under OSX / BSD, so i removed it. Before edit : the compile would not run. After edit : The compile would run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants