Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#39701 closed defect (fixed)

root: can't open file '/opt/local/lib/python/genreflex/genreflex.py': [Errno 2] No such file or directory

Reported by: mojca (Mojca Miklavec) Owned by: mattiafrancescomoro@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: maintainer haspatch Cc: g5pw (Aljaž Srebrnič)
Port: root

Description

The file /opt/local/bin/genreflex tries to call /opt/local/lib/python/genreflex/genreflex.py and some weird combinations of Geant4 examples fail to compile.

I see r101881, but perhaps this wasn't enough?

Attachments (1)

root.diff (3.2 KB) - added by cjones051073 (Chris Jones) 11 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 11 years ago by cjones051073 (Chris Jones)

Looks like the content of the genreflex script has been changed since that patch was submitted (that was working at the time).

Chris-Jones-Macbook-Pro ~ > more /opt/local/bin/genreflex
#!/bin/bash
if [ "x${ROOTSYS}" = "x" ]; then
    THIS=$(dirname $0)
    ROOTSYS=$(cd ${THIS}/..;pwd); export ROOTSYS
fi
python ${ROOTSYS}/lib/genreflex/genreflex.py "$@"

so the lines in the root Portfile

reinplace "s|/opt/local/lib/root|${mypysitedir}|g" ${destroot}${prefix}/bin/genreflex
reinplace "s|python/genreflex/genreflex.py|genreflex/genreflex.py|g" ${destroot}${prefix}/bin/genreflex}}}

are no longer working. Should be relatively easily fixable, but I won't have time to do so for a few days. If you need a fix sooner, please be my guest to take a look yourself.

Chris

comment:2 Changed 11 years ago by cjones051073 (Chris Jones)

Hi,

I found a moment to look into this, sorry for the delay.

Could you try building root with the Portfile patch I am about to attached ? This for me fixes the issue, in as far as I can now run genreflex

macmini ~/Projects/MacPorts/portfiles > genreflex
--->> genreflex: ERROR: No input file specified
Usage:
  genreflex headerfile1.h [headerfile2.h] [options] [preprocesor options]
Try "genreflex --help" for more information.

Beyond that I am not sure how to test.. So if you could test this against Geant4 to confirm it works, before I submit it for inclusion, that would be great ?

Chris

Changed 11 years ago by cjones051073 (Chris Jones)

Attachment: root.diff added

comment:3 Changed 11 years ago by mojca (Mojca Miklavec)

Thank you. This seems to do it. It throws an interesting warning, but it's totally unrelated.

--->> genreflex: WARNING: While trying to retrieve compiler version, found unknown compiler /usr/bin/llvm-g++-4.2
--->> genreflex: INFO: Parsing file .../work/geant4.9.6.p02/examples/extended/persistency/P02/include/ExP02Classes.hh with GCC_XML OK
--->> genreflex: INFO: Generating Reflex Dictionary
--->> genreflex: INFO: Using typedef G4MaterialPropertyVector to select class G4PhysicsOrderedFreeVector
--->> genreflex: INFO: Replacing selection name "std::map<G4String, G4MaterialPropertyVector*>" with "std::map<G4String, G4PhysicsOrderedFreeVector*>"
class std::vector<G4Element*>
...

comment:4 Changed 11 years ago by mojca (Mojca Miklavec)

I forgot to ask: should I commit this patch?

comment:5 Changed 11 years ago by cjones051073 (Chris Jones)

Please commit the patch (would it be better though if I submitted it as a proper update request first though, just for the book keeping ?)

Regarding the warning... interesting indeed. Just wondering, but are you perhaps building geant4 with a different compiler to that used by ROOT. That is the only thing I can come up with....

Chris

comment:6 Changed 11 years ago by cjones051073 (Chris Jones)

I had another though regarding the warning.

Did you install root with one of the python variants enabled ? It could be the python version you are using (system one ? or a macports version ?) was built with a different compiler to ROOT/geant, and this is causing it.

Could you try installing ROOT with one of the python variants active, then 'port select' that python version so it is your default. Say

 > sudo port install root +python27
 > sudo port select python python27

Then in a new shell (to pick up the above) try and rebuild Geant4 ?

cheers Chris

Last edited 11 years ago by cjones051073 (Chris Jones) (previous) (diff)

comment:7 Changed 11 years ago by mojca (Mojca Miklavec)

Keywords: maintainer haspatch added
Resolution: fixed
Status: newclosed

Why would you submit a separate update request if you already submitted a patch to a bug report? The bookkeeping is "commit fixes this bug".

I'm building both with the default compiler, I didn't try to change it. Maybe this comes from Python.

I'm willing to try this out if a minimal example is found that doesn't require rebuilding the whole Geant4, otherwise it's simply way too much waiting and testing for fixing something that I'm not even using (and not even sure if it's a serious problem). It is also possible that Python was installed before I upgraded the Xcode version.

I committed r108558. Thanks again.

comment:8 in reply to:  7 ; Changed 11 years ago by cjones051073 (Chris Jones)

Replying to mojca@…:

Why would you submit a separate update request if you already submitted a patch to a bug report? The bookkeeping is "commit fixes this bug".

fair enough.

I'm building both with the default compiler, I didn't try to change it. Maybe this comes from Python.

I'm willing to try this out if a minimal example is found that doesn't require rebuilding the whole Geant4, otherwise it's simply way too much waiting and testing for fixing something that I'm not even using (and not even sure if it's a serious problem). It is also possible that Python was installed before I upgraded the Xcode version.

I committed r108558. Thanks again.

OK, if the warning doesn't worry you too much, then I won't either... ;)

comment:9 in reply to:  8 Changed 11 years ago by mojca (Mojca Miklavec)

Replying to jonesc@…:

OK, if the warning doesn't worry you too much, then I won't either... ;)

That particular example is broken anyway. (Unless it's broken because of that?) See http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1502

So currently building the examples would end up with MacPorts figuring out that Geant4 needs to be rebuilt to try to fix a missing library. Probably it would keep cycling like that forever.

Note: See TracTickets for help on using tickets.