Created attachment 1276488 [details] Patch to fix the bug Description of problem: When a script calls gROOT->Macro to read another script and that script defines a global variable, this variable is only accessible in the same scope of the calling script, not lower scopes (e.g. inside a loop). Version-Release number of selected component (if applicable): root-6.08 How reproducible: always Steps to Reproduce: 1. Using a script test.C which looks like: { gROOT->Macro("setcolours.C"); { cout << setgreen << "OK" << setblack << endl; } } and a macro setcolours.C which looks like: { const char setgreen[] = "\033[32m"; const char setblack[] = "\033[39;49m"; } 2. root -q test.C Actual results: The setgreen and setblack variables, which are defined via gROOT->Macro("setcolours.C") should be visible, but they are not. Removing the curly brackets around the cout line makes the script work, but, of course, you still can't use these variables in a loop. This is a regression compared to root-6.06 and definitely a bug. Expected results: It should just write "OK" in green. Additional info: I have reported this upstream https://sft.its.cern.ch/jira/browse/ROOT-8773 and Axel Naumann has confirmed and fixed the bug in the git tree. I've attached a patch based on his fix. The only change is the path of the TClingCallbacks.cxx, which was changed between root-6.08 and the current git commit. The problem seems to be in all versions of root-6.08. Fedora 25/26, RHEL 7.3, CentOS 7 etc.
root-6.08.06-5.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4880048a1c
root-6.08.06-5.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c39ad1072b
root-6.08.06-5.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1544bb535d
root-6.08.06-5.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-13bcac36bb
root-6.08.06-5.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-13bcac36bb
root-6.08.06-5.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c39ad1072b
root-6.08.06-5.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4880048a1c
root-6.08.06-5.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1544bb535d
I've tested it on fedora 26 and it works. Thanks for another quick response.
root-6.08.06-7.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4880048a1c
root-6.08.06-7.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c39ad1072b
root-6.08.06-7.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-13bcac36bb
root-6.08.06-7.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1544bb535d
root-6.08.06-7.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4880048a1c
root-6.08.06-7.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1544bb535d
root-6.08.06-7.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-13bcac36bb
root-6.08.06-7.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c39ad1072b
root-6.08.06-7.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
root-6.08.06-7.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
root-6.08.06-7.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
root-6.08.06-7.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.