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

MacOS problem with bin/create-links-in #58

Open
mslinn opened this issue Aug 20, 2017 · 2 comments
Open

MacOS problem with bin/create-links-in #58

mslinn opened this issue Aug 20, 2017 · 2 comments

Comments

@mslinn
Copy link

mslinn commented Aug 20, 2017

My old version of MacOS does not support the readlink -f option. I do not know if newer versions of MacOS support this option.

$ bash -xv bin/create-links-in /usr/local/bin
#!/bin/sh
set -e
+ set -e
#set -x

TARGET_DIR=$1
+ TARGET_DIR=/usr/local/bin
BIN_DIR=`dirname $0`
dirname $0
++ dirname bin/create-links-in
+ BIN_DIR=bin

if [ -z "$TARGET_DIR" ]; then
  echo "Please specify a target directory."
  exit
fi
+ '[' -z /usr/local/bin ']'

ln -s $(readlink -f $BIN_DIR/perf-java-top) $TARGET_DIR
readlink -f $BIN_DIR/perf-java-top
++ readlink -f bin/perf-java-top
readlink: illegal option -- f
usage: readlink [-n] [file ...]
+ ln -s /usr/local/bin
ln: ./bin: File exists
@knalli
Copy link

knalli commented Aug 20, 2017

I've been faced with this also just at the same time ;)

First: No idea which version you are using exactly, but the current version of macOS (10.12) includes a readlink which also cannot handle -f. So not only issue for older systems, so far.

Second: Although the pr #59 would fix this here, there are several other places which are using readlink -f (https://github.com/jvm-profiling-tools/perf-map-agent/search?utf8=%E2%9C%93&q=readlink+-f&type=)

@mslinn
Copy link
Author

mslinn commented Aug 20, 2017

If the fix works for everyone, great, I hope my PR gets adopted. I expect my approach could be used to fix all the other readlink problems you have encountered. I'm not going to take that on, however.

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

Successfully merging a pull request may close this issue.

2 participants