Message: Re: Compiling application doesn't build executable Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Compiling application doesn't build executable 

Forum: Installation and Configuration
Re: None Compiling application doesn't build executable (Bethany)
Re: None Re: Compiling application doesn't build executable (Ben Morgan)
Date: 28 Feb, 2013
From: Bethany <Bethany>

Hi Ben, Thanks for the reply. Due to other computer issues I've only just now been able to try to get this to work again. I realized that when I put in the cmake command as instructed in the directions, it was instead in fact compiling G4 folders and files, which was weird. I deleted those, and everything else in the build directory to try to start fresh. I also updated the CMakeLists.txt file slightly (attached). Now when I run cmake, I still get a similar output:

$ cmake -DGeant4_DIR=/net/local/dm-ice/geant4/geant4.9.6.p01-install/lib64/Geant4-9.6.1/ ~/g4work/simulations/DMIceSim

-- Found ROOT 5.30/05 in /net/local/software/RHEL_6.0_amd64/i3ports/v3/root-v5.30.05

-- Configuring done

-- Generating done

-- Build files have been written to: /home/breilly/g4work/simulations/DMIceSim

But, according to the instructions (and when I run with an example), the build files should be written to DMIceSim-build. I don't know why they are instead being written to DMIceSim?

So, since I can't run "make" in the -build folder, I try to run it in DMIceSim. It seems to work, but I get all this mess when it tries to link the simulation:

DMIAnalysisManager.cc:(.text+0xc68): undefined reference to `TTree::TTree(char const*, char const*, int)'

DMIAnalysisManager.cc:(.text+0xc78): undefined reference to `TObject::operator delete(void*)'

CMakeFiles/dmicesimm.dir/src/DMIAnalysisManager.cc.o: In function

`__static_initialization_and_destruction_0(int, int)':

DMIAnalysisManager.cc:(.text+0x133e): undefined reference to `TVersionCheck::TVersionCheck(int)'

CMakeFiles/dmicesimm.dir/src/DMIAnalysisManager.cc.o: In function `TObject::operator new(unsigned long)':

DMIAnalysisManager.cc:(.text._ZN7TObjectnwEm[TObject::operator new(unsigned long)]+0x14): undefined reference to `TStorage::ObjectAlloc(unsigned long)'

CMakeFiles/dmicesimm.dir/src/CopperRodParameterisation.cc.o: In function `__static_initialization_and_destruction_0(int, int)':

CMakeFiles/dmicesimm.dir/src/DMISensitiveDetector.cc.o: In function `__static_initialization_and_destruction_0(int, int)':

DMIEventAction.cc:(.text+0x1e82): undefined reference to `TVersionCheck::TVersionCheck(int)'

CMakeFiles/dmicesimm.dir/src/DMIDetectorConstruction.cc.o: In function `DMIDetectorConstruction::ConstructDMIce()':

DMIDetectorConstruction.cc:(.text+0x2e7c): undefined reference to `Form(char const*, ...)'

(greatly reduced in amount of lines)

followed by:

collect2: ld returned 1 exit status

make[2]: *** [dmicesimm] Error 1

make[1]: *** [CMakeFiles/dmicesimm.dir/all] Error 2

make: *** [all] Error 2

It seems upset with some of the Root variables I use? But, for instance, for TTree, I include the header file for that in each of the .cc files that seems to complain about it. And if it didn't know what a TTree was, wouldn't it complain before reaching the linking phase? I don't know many specifics about what the linking phase of compiling is, and I'm confused by these error outputs.

Any advice would be much appreciated. Thank you! ~Bethany

On Mon, 25 Feb 2013 23:07:07 GMT, Ben Morgan wrote:

> Hi Bethany,
> 
> Some brief comments below,
> 
> For an application built against an install or even uninstalled build of
> Geant4, you shouldn't be seeing reports on Geant4 targets being built.
> Where is your Geant4 build/install directory in relation to the
> source/build directories of your application? It looks like there is
> some blending or otherwise.
> 
> The only thing I can see here is that you have absolute paths and also a
> reference by the look of things to a 9.5.p01 install. Whether these have
> an effect I don't know.
> 
> Cheers,
> 
> Ben.
> 

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2013/02/28/11.45-39924-CMakeLists.rtf

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Compiling application doesn't build executable   (Ben Morgan - 01 Mar, 2013)
2 None: Re: Compiling application doesn't build executable   (Bethany - 01 Mar, 2013)
 Add Message Add Message
to: "Re: Compiling application doesn't build executable"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]