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

New bash versions don't like current setup-env.sh #149

Closed
skyreflectedinmirrors opened this issue Sep 7, 2022 · 1 comment · Fixed by #156
Closed

New bash versions don't like current setup-env.sh #149

skyreflectedinmirrors opened this issue Sep 7, 2022 · 1 comment · Fixed by #156
Labels
bug Something isn't working
Milestone

Comments

@skyreflectedinmirrors
Copy link

https://github.com/AMDResearch/omnitrace/blob/2718596e5a6808a9278c3f6c8fddfaf977d3bcb6/cmake/Templates/setup-env.sh.in#L4

On a from-source version of Linux (running GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)), I'm seeing an issue with the current setup-env.sh where it exits with:

"/home/amd/omnitrace does not exist"

Some light debugging, and I've found that this version of bash does not seem to like the code-pattern of:

BASEDIR=$(cd ${BASEDIR}/../.. && pwd)

Not 100% sure why (wasn't able to find any Bash 5 info on this), but:

BASEDIR=$(realpath ${BASEDIR}/../..)

seems to work insteadm

@jrmadsen
Copy link
Collaborator

Yeah, this should work. It’s technically not portable since realpath is a Linux command, not UNIX, e.g. there is no realpath tool on macOS, but since we don’t support macOS and don’t have any plans to do so, I’ll default to it if I can detect the exe exists

@jrmadsen jrmadsen added the bug Something isn't working label Sep 12, 2022
@jrmadsen jrmadsen added this to the v1.6.0 milestone Sep 12, 2022
jrmadsen added a commit that referenced this issue Sep 13, 2022
- Fix setup-env.sh
  - Closes #149 
- omnitrace exe color
- test-install.sh script
- if config variable is updated in config or env, include in generated
config
- metadata for hsa, rocm, and ompt
  - Closes #153 
  - Closes #154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants