Message: Re: Error with GNUMakefile Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Note Re: Error with GNUMakefile 

Forum: Installation and Configuration
Re: None Error with GNUMakefile (Ish Mukul)
Re: None Re: Error with GNUMakefile (John Allison)
Re: Question Re: Error with GNUMakefile (Neil Fazel)
Re: Note Re: Error with GNUMakefile (Ben Morgan)
Re: Question Re: Error with GNUMakefile (Neil Fazel)
Date: 14 Mar, 2014
From: Ben Morgan <Ben Morgan>

On Wed, 12 Mar 2014 17:12:56 GMT, Neil Fazel wrote:
> Hi Ben,
>     Thanks for the information. Right now I'm able to build using cmake whereas 
> gmake fails, so I'm motivated to switch. You mentioned that one can have a "build 
> directory that is configured to use Geant4 9.6, one using 10.0, ...". How does 
> one do that? I tried it, but replacing
> cmake -DGeant4_DIR=path_to_Geant4_installation/lib[64]/Geant4.10.0.0/ ../exampleXYZ
> with
> cmake -DGeant4_DIR=path_to_Geant4_installation/lib[64]/Geant4.9.6/ ../exampleXYZ
> before rebuilding wasn't enough to switch from 4.10 back to 4.9, i.e. the code was 
> still linked with 4.10. 
> (A thought: for 4.10, I source 
> path_to_Geant4_installation/Geant4.10/bin/
> Is there something similar for 4.9?)

I suspect that if by "still linked with 10" (NB the "4" is part of the name, not a version!) you mean that running the application still uses the 10.0 libraries, it's because you sourced that script. This sets LD_LIBRARY_PATH which overrides all other paths for libraries. Note that when building with CMake, you can run the application direct from the build directory without installing it, or setting any environment variables. It's only when you install that you (may) need to source that script (there is one for version 9.6 as well).

If you want to ensure a given application uses a specific set of libraries, you'll need to look at the CMake rpath settings, documented here. However, note that using RPATH is not a hard guarantee as it is always overidden by LD_LIBRARY_PATH.

> When installing using cmake, 'make install' attempted to install in /usr/local/bin/, 
> which is not a user directory (no write permission). It seems I need to set 
> CMAKE_INSTALL_PREFIX; does that require editting CMakeLists.txt or CMakeCache.txt?

You can set that on the command line, i.e. using cmake -DCMAKE_INSTALL_PREFIX=/your/preferred/prefix ...args..., or you can run ccmake in the build directory and change it in the resulting interface.



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

1 None: Re: Error with GNUMakefile   (Neil Fazel - 14 Mar, 2014)
 Add Message Add Message
to: "Re: Error with GNUMakefile"

 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 ]