Garfield installation issue

Hi,
the square brackets are meant to indicate optional arguments. If you are happy with the default settings you can just type:
cmake $GARFIELD_HOME

One more thing: from what I can see in the screenshot you sent, you set the environment variable $GARFIELD_HOME to /home/ahmer/Desktop/garfield, but then you cloned the repository to /home/ahmer/Desktop/garfield/garfield-2 and created your build directory in /home/ahmer/Desktop/garfield. I’m not sure if this is what you intended to do, but if it is, you need to modify the argument of the cmake command:

cmake /home/ahmer/Desktop/garfield/garfield-2

can u tell me that what is the procedure to install garfield++. i want to install it on my laptop .kindly help me

or

hi i also wants to download garfield ++ for simulation.can u please guide me that how to install it the procedure that will help me
it would be a great favour for me
thanks

Hi,
did you try the installation instructions on the website (links posted above)?

yes but i make the garfield-2 because of error to cloned it. and by following to paper you sent to me i make the directory build in garfield.

i’m getting this error.

yes i have and aldo install root file cmake .kindly tell me how to install it and how to properly do procedures

Ok, so you cloned the repository to the directory /home/ahmer/Desktop/garfield/garfield/garfield-2. If that is what you want, please do the following:

  1. Source the thisroot.sh script. I’m assuming your root installation is located in /home/ahmer/Desktop/root. If this is not the case, please adapt the path accordingly.
    source /home/ahmer/Desktop/root/bin/thisroot.sh
  2. Set the environment variable GARFIELD_HOME to point to the directory that contains the Garfield++ source tree.
    export GARFIELD_HOME=/home/ahmer/Desktop/garfield/garfield/garfield-2
  3. Follow the usual instructions for building the project:
cd $GARFIELD_HOME
mkdir build
cd build
cmake ..
make
make install
. $GARFIELD_HOME/build/setup.sh

Or maybe you’d prefer your Garfield++ source directory to be /home/ahmer/Desktop/garfield (which I think is what you wanted in the first place)? Then please first clean out /home/ahmer/Desktop/garfield:

rm -rf /home/ahmer/Desktop/garfield/Build
rm -rf /home/ahmer/Desktop/garfield/garfield
rm -rf /home/ahmer/Desktop/garfield-2
rm -rf /home/ahmer/Desktop/garfield-v2
rm /home/ahmer/Desktop/garfield-v2.tar.gz

Then redo the git clone step

git clone https://gitlab.cern.ch/garfield/garfieldpp.git $GARFIELD_HOME

and follow the standard installation instructions.

Hi,
can you provide a bit more details? At which point during the installation did you get stuck?

thank you for your time hschindl. i’ll do and let you know. and my root is definitely on the Desktop as you were saying. i have to source the thisroot.sh before cmake.

i removed all the filed and directories to install and un tar the file again but now it is again giving error which should not be there. i export the file as shown.

then i again make same directories ans source the thisroot.sh but on the other hand now again git clone making issue that directory is not empty. last time when i did it the issue was resolved this way.

i export this in bashrc as you told thats why issue is coming or i did something wrong?

The problem is that you (1) keep changing paths and (2) try git cloning into a non-empty directory (which is not what I asked you to do). Let’s try to start from scratch, delete everything in /home/ahmer/Desktop/garfield/, and do a fresh clone. So, please, do the following:

rm -rf /home/ahmer/Desktop/garfield/
export GARFIELD_HOME=/home/ahmer/Desktop/garfield/
git clone https://gitlab.cern.ch/garfield/garfieldpp.git $GARFIELD_HOME
cd $GARFIELD_HOME
mkdir build
cd build
source /home/ahmer/Desktop/root/bin/thisroot.sh
cmake $GARFIELD_HOME
make
make install
source $GARFIELD_HOME/build/setup.sh
1 Like

oo… thanks dear i’ll do this according to your guidance.

thanks to you again hschindl. i came very far at last but i want to inteface it with geant4. but here its saying that geant4 not found but its already installed on my machine. how to interface geant4 with garfield so that itself find the geant4.!