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

eicrecon-init.sh not correctly configured in Docker on Mac #1115

Closed
kkauder opened this issue Nov 16, 2023 · 10 comments
Closed

eicrecon-init.sh not correctly configured in Docker on Mac #1115

kkauder opened this issue Nov 16, 2023 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@kkauder
Copy link
Contributor

kkauder commented Nov 16, 2023

Environment: (where does this bug occur, have you tried other environments)

  • Which branch (often main for latest released): main
  • Which version (or HEAD for the most recent on git): HEAD
  • Any specific OS or system where the issue occurs? In Docker+Mac, can't replicate in singularity, can't test docker/linux
  • Any special versions of ROOT or Geant4? No

Steps to reproduce: (give a step by step account of how to trigger the bug)

source /opt/detector/setup.sh
git clone git@github.com:eic/drich-dev.git
cd drich-dev
git clone git@github.com:eic/EICrecon.git
mv EICrecon eicrecon # sigh...
source environ.sh
./build eicrecon 
## Take a lunch break, compilation is slow with Rosetta2
source prefix/bin/eicrecon-this.sh

Expected Result: (what do you expect when you execute the steps above)

No output / correct execution

Actual Result: (what do you get when you execute the steps above)

ERROR: must "cd where/root/is" before calling ". bin/thisroot.sh" for this version of "qemu-x86_64"!
ERROR: must "cd where/root/is" before calling ". bin/thisroot.sh" for this version of "qemu-x86_64"!

Proposed Fix: #1111 (review)

@wdconinc
Copy link
Contributor

thisroot.sh seems to detect your shell as qemu-x86_64. Please report to ROOT. We can apply the fix to ROOT that they suggest.

@wdconinc
Copy link
Contributor

I'll try to run the inverse qemu emulation to see if I can reproduce, but don't get your hopes up :-)

@wdconinc
Copy link
Contributor

The only other issue in ROOT that refers to qemu was reported by me :-\ and it's different.

@wdconinc
Copy link
Contributor

Can reproduce on linux, docker, qemu within docker run --rm -it --platform linux/arm64 ghcr.io/eic/jug_dev:master-nightly.

ROOT uses cut -d '' -f1 /proc/$$/cmdline to determine the shell, which gets you the qemu binfmt interpreter, both in your case qemu-x86_64 (with some prefix path that get chopped later) and in my case /usr/libexec/qemu-binfmt/aarch64-binfmt-P (same thing really). If ROOT could use field 2 cut -d '' -f2 /proc/$$/cmdline it would find the correct shell and then it would just source thisroot.sh fine (of course, that wouldn't work without qemu).

@wdconinc
Copy link
Contributor

wdconinc commented Nov 16, 2023

~~For the upstream ROOT bug report, you can probably use the docker image rootproject/root:6.28.04-fedora37 (which is arm64). https://hub.docker.com/r/rootproject/root/tags ~~

Edit: Nevermind, that image is a conda install which doesn't install thisroot.sh.

@kkauder
Copy link
Contributor Author

kkauder commented Nov 16, 2023

That was a hell of a deep delve. Should I close the PR? While fixing it in root (which can take time) is better, my patch shouldn't hurt. That said, the bug itself probably only, if at all, manifests if you change root installations, be it inside eic-shell or outside AND in a weird shell. The outside part is hardest to predict off-hand, and it's unlikely to be a scenario for eic-recon often in the near future, but it's a consideration for jana2 maybe.

@wdconinc
Copy link
Contributor

Keep the PR open; it's the appropriate workaround now that we have identified what the cause it. We can merge it when you have submitted the issue to ROOT, and we'll keep track of that issue in EICrecon so we can back out the workaround again once a ROOT fix is available.

@wdconinc
Copy link
Contributor

@kkauder Can you post the link you the ROOT issue please?

@kkauder
Copy link
Contributor Author

kkauder commented Nov 21, 2023

github-merge-queue bot pushed a commit that referenced this issue Dec 5, 2023
…sh" (#1111)

### Briefly, what does this PR introduce?
Small fix to `pushd` and `popd` around `source thisroot.sh`

### What kind of change does this PR introduce?
- [x] Bug fix (issue #1115 )
- [ ] New feature (issue #__)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
No.

### Does this PR change default behavior?
It shouldn't.
@wdconinc
Copy link
Contributor

wdconinc commented Dec 7, 2023

Fixed by #1111

@wdconinc wdconinc closed this as completed Dec 7, 2023
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

No branches or pull requests

3 participants