Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#35992 closed submission (fixed)

Gate 6.2 (new port)

Reported by: mojca (Mojca Miklavec) Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: gate

Description

I would like to see Gate 6.2 included in MacPorts.

This is slightly related to Geant4 (#32716). Gate needs version 9.5.p01. I have written a preliminary Portfile here which needs a bit of help from experts to get linker flags work properly (and of course an updated Geant4). I'll post updates here as I proceed.

PortSystem          1.0
PortGroup           cmake 1.0

name                gate
version             6.2
categories          science
maintainers         gmail.com:mojca.miklavec.lists
license             TODO
description         GATE description
long_description    GATE is dedicated to numerical simulations in medical imaging and radiotherapy. \
                    It currently supports simulations of Emission Tomography (PET and SPECT), \
                    Computed Tomography (CT) and Radiotherapy experiments. 
homepage            http://www.opengatecollaboration.org
platforms           darwin

distfiles           gate_v6_2_tar_gz_15277.gz
master_sites        http://www.opengatecollaboration.org/sites/opengatecollaboration.org/files/gate_release/2012/08/

checksums           rmd160  3fb8ec0fc7b78761e9eb0f39605ef84f1c485d42 \
                    sha256  d8c0dcbb74e734a60bae868ba1ce4d334919695e2b59099d87933ec425c7f98a

patchfiles          patch-compileerrors.diff

worksrcdir          gate_v${version}
configure.dir       ${workpath}/build
build.dir           ${configure.dir}

post-extract {
    file mkdir ${configure.dir}
}

configure.post_args ${worksrcpath}

depends_lib         port:geant4 \
                    port:clhep
# clhep implied with geant4

configure.args-append -DGATE_USE_OWN_CLHEP=OFF
--- source/digits_hits/include/GateMaps.hh.orig
+++ source/digits_hits/include/GateMaps.hh
@@ -117,7 +117,7 @@ inline GateMap<Tkey,Tvalue>::GateMap(size_t n, GateMap<Tkey,Tvalue> *mapArray[])
   for (size_t i=0; i<n ; i++){
     GateMap<Tkey,Tvalue>* mapElement = mapArray[i];
     for (iterator iter = mapElement->begin(); iter != mapElement->end(); iter++)
-      insert(*iter);
+      this->insert(*iter);
   }
 }
 
--- source/general/include/GateUIcmdWithAVector.hh.orig
+++ source/general/include/GateUIcmdWithAVector.hh
@@ -118,14 +118,14 @@ template<typename vContentType>
 G4String GateUIcmdWithAVector<vContentType>::ConvertToString
 (std::vector<vContentType> vec)
 {
-  char st[100];
+  //char st[100];
   //LF
   //std::ostrstream os(st,100);
-  std::ostringstream os(st,100);
+  std::ostringstream os;
   //LF
   for (G4int i=0; i<vec.size(); i++) os << vec[i] << " "; 
   os << '\0';
-  G4String vl = st;
+  G4String vl = os.str();
   G4cout << "GateUIcmdWithAVector::ConvertToString : " << vl << G4endl;
   return vl;
 }

Compilation currently fails with

Undefined symbols for architecture x86_64:
  "vtable for CLHEP::HepVector", referenced from:
      GateSourcePencilBeam::GateSourcePencilBeam(G4String) in GateSourcePencilBeam.cc.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "vtable for CLHEP::HepSymMatrix", referenced from:
      GateSourcePencilBeam::GateSourcePencilBeam(G4String) in GateSourcePencilBeam.cc.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "CLHEP::HepVector::HepVector(int)", referenced from:
      GateSourcePencilBeam::GateSourcePencilBeam(G4String) in GateSourcePencilBeam.cc.o
  "CLHEP::HepVector::operator=(CLHEP::HepVector const&)", referenced from:
      GateSourcePencilBeam::GateSourcePencilBeam(G4String) in GateSourcePencilBeam.cc.o
  "CLHEP::HepVector::~HepVector()", referenced from:
      GateSourcePencilBeam::GateSourcePencilBeam(G4String) in GateSourcePencilBeam.cc.o
      GateSourcePencilBeam::~GateSourcePencilBeam() in GateSourcePencilBeam.cc.o
      GateSourcePencilBeam::GenerateVertex(G4Event*) in GateSourcePencilBeam.cc.o
  "CLHEP::HepSymMatrix::HepSymMatrix(int, int)", referenced from:
      GateSourcePencilBeam::GateSourcePencilBeam(G4String) in GateSourcePencilBeam.cc.o
  "CLHEP::HepSymMatrix::operator=(CLHEP::HepSymMatrix const&)", referenced from:
      GateSourcePencilBeam::GateSourcePencilBeam(G4String) in GateSourcePencilBeam.cc.o
  "CLHEP::HepSymMatrix::~HepSymMatrix()", referenced from:
      GateSourcePencilBeam::GateSourcePencilBeam(G4String) in GateSourcePencilBeam.cc.o
      GateSourcePencilBeam::~GateSourcePencilBeam() in GateSourcePencilBeam.cc.o
  "CLHEP::RandMultiGauss::fire()", referenced from:
      GateSourcePencilBeam::GenerateVertex(G4Event*) in GateSourcePencilBeam.cc.o
  "CLHEP::RandMultiGauss::RandMultiGauss(CLHEP::HepRandomEngine*, CLHEP::HepVector const&, CLHEP::HepSymMatrix const&)", referenced from:
      GateSourcePencilBeam::GenerateVertex(G4Event*) in GateSourcePencilBeam.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Gate] Error 1

Attachments (2)

Gate.Portfile (1.9 KB) - added by mojca (Mojca Miklavec) 12 years ago.
Portfile for Gate 6.2
patch-compileerrors.diff (1.9 KB) - added by mojca (Mojca Miklavec) 12 years ago.
Patches for Gate 6.2

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by mojca (Mojca Miklavec)

Attachment: Gate.Portfile added

Portfile for Gate 6.2

Changed 12 years ago by mojca (Mojca Miklavec)

Attachment: patch-compileerrors.diff added

Patches for Gate 6.2

comment:1 Changed 12 years ago by mojca (Mojca Miklavec)

I attached a port that works for me (there are some minor pending issues - some files should not be installed), but I need to upload Geant4 9.5 update before the port can be tested.

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

Gate is now available as a git repository under

  • http://git.opengatecollaboration.org/git/opengate-public.git

Citing:

The GATE public remote repository holds two remote branches named 'master' and 'develop'. The remote 'master' branch is the main branch where the source code reflects a production-ready state (i.e. corresponding to the current GATE version V6.2). The remote 'develop' branch is the branch where the source code reflects a state with the latest delivered development changes for the next release.

We now need a working Geant4 9.5/9.6 ...

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

Cc: cristiano.fontana@… removed
Owner: changed from macports-tickets@… to mojca@…
Status: newassigned

I added an experimental port to my personal folder in SVN (svn: ​https://svn.macports.org/repository/macports/users/mojca, trac: ​browser:users/mojca/ports) - it needs a working Geant 4.9.5 or 4.9.6 and definitely needs more polishing, but comments and improvements are welcome.

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 11 years ago by mf2k (Frank Schima)

We have the appropriate geant ports now. It looks like gate is up to version 7 now though.

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

Thanks for noticing the release of version 7 (not that it's clear from git which version that should be; the README doesn't really help).

I need to:

  • figure out how to change Gate so that it will work with the new root5 port
  • check whether Gate can finally be compiled against the built-in CLHEP (comments in commit messages suggest that might work since mid-april)
  • figure out which commit to take for the best approximation of version 7 (I don't see any tags being used)
  • test whether it works with Geant4 10.0 already (low priority)

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

Any help with that is most welcome of course.

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

Resolution: fixed
Status: assignedclosed

Committed in r120009.

Note: See TracTickets for help on using tickets.