How can I change pathnames on a Mac OS for a code that runs on ROOT?

In summary, to install the code on your computer, you will need to edit the Makefile and source code files to update the paths to reflect the installation on your system. This includes changing the ROOTSYS variable and updating any #include statements that refer to paths on the sender's computer. Once all paths are correct, you should be able to compile the code successfully.
  • #1
Marioqwe
68
4
Hello,

I need to install a code on my computer that runs on ROOT and the guy that sent it to me told me that I may have to change some pathnames that are specific to his computer in order for it to work. Now, I do not know how to do that and whenever I cd to the location where I put the Makefile and the folder with the code, I get a bunch of errors.

Code:
make: /bin/root-config: Command not found
make: /bin/root-config: Command not found
Compiling components...
g++ -Wall -fPIC -g -W  -c /Users/mariosolano/desktop/Test_Beam_Code/src/Main.C -o /Users/mariosolano/desktop/Test_Beam_Code/bin/Main.o
/Users/mariosolano/desktop/Test_Beam_Code/src/Main.C:4:19: error: TROOT.h: No such file or directory
/Users/mariosolano/desktop/Test_Beam_Code/src/Main.C:5:26: error: TApplication.h: No such file or directory
In file included from /Users/mariosolano/desktop/Test_Beam_Code/src/Amalgamation.h:12,
                 from /Users/mariosolano/desktop/Test_Beam_Code/src/Main.C:8:
/Users/mariosolano/desktop/Test_Beam_Code/src/TestBeamDataSummary.h:8:17: error: TH1.h: No such file or directory
In file included from /Users/mariosolano/desktop/Test_Beam_Code/src/TestBeamDataSummary.h:10,
                 from /Users/mariosolano/desktop/Test_Beam_Code/src/Amalgamation.h:12,
                 from /Users/mariosolano/desktop/Test_Beam_Code/src/Main.C:8:
/Users/mariosolano/desktop/Test_Beam_Code/src/TestBeamEvent.h:10:21: error: TObject.h: No such file or directory
In file included from /Users/mariosolano/desktop/Test_Beam_Code/src/Main.C:8:
/Users/mariosolano/desktop/Test_Beam_Code/src/Amalgamation.h:15:17: error: TH2.h: No such file or directory
In file included from /Users/mariosolano/desktop/Test_Beam_Code/src/Main.C:10:
/Users/mariosolano/desktop/Test_Beam_Code/src/EventDisplay.h:10:21: error: TCanvas.h: No such file or directory
/Users/mariosolano/desktop/Test_Beam_Code/src/EventDisplay.h:11:22: error: TGraph2D.h: No such file or directory
In file included from /Users/mariosolano/desktop/Test_Beam_Code/src/EventDisplay.h:14,
                 from /Users/mariosolano/desktop/Test_Beam_Code/src/Main.C:10:
/Users/mariosolano/desktop/Test_Beam_Code/src/Algorithm.h:5:24: error: TStopwatch.h: No such file or directory
In file included from /Users/mariosolano/desktop/Test_Beam_Code/src/Clipboard.h:14,
                 from /Users/mariosolano/desktop/Test_Beam_Code/src/Analysis.h:8,
                 from /Users/mariosolano/desktop/Test_Beam_Code/src/Main.C:11:
/Users/mariosolano/desktop/Test_Beam_Code/src/TestBeamTrack.h:11:26: error: Math/Point3D.h: No such file or directory
/Users/mariosolano/desktop/Test_Beam_Code/src/TestBeamTrack.h:13:27: error: Math/Vector3D.h: No such file or directory
/Users/mariosolano/desktop/Test_Beam_Code/src/TestBeamTrack.h:15:21: error: TMinuit.h: No such file or directory
In file included from /Users/mariosolano/desktop/Test_Beam_Code/src/TestBeamTrack.h:21,
                 from /Users/mariosolano/desktop/Test_Beam_Code/src/Clipboard.h:14,
                 from /Users/mariosolano/desktop/Test_Beam_Code/src/Analysis.h:8,
                 from /Users/mariosolano/desktop/Test_Beam_Code/src/Main.C:11:

This is part o the error and I am pretty sure that most of what follows are recurring errors. But anyhow, how can I change the pathnames? I am using a Mac OS.
 
Technology news on Phys.org
  • #2
The paths in your code are likely referring to the installation of ROOT on the sender's computer, so you'll need to update them to reflect the paths on your computer. To do this, you'll need to edit the Makefile and the source code files to make sure all the paths are correct. In the Makefile, you may need to change the ROOTSYS variable to the path where ROOT is installed on your system. You can also look for other variables that refer to the location of the source code or other files and make sure those are correct as well. Once you've updated the Makefile, you'll need to update the source code files to reflect the correct paths. Look for any #include statements that refer to paths on the sender's computer and replace them with the correct paths on your system. You can also use a text editor or IDE to search for specific file names if you're having trouble locating them in the code. Once you've updated all the paths, you should be able to compile the code without any errors. Good luck!
 

1. How do I change the pathnames on Mac OS?

To change the pathnames on Mac OS, you can use the "cd" command in the Terminal application. This command allows you to navigate to different directories and change the current working directory. You can also use the "mv" command to rename files or directories, which will also change the pathname.

2. Can I change the pathnames of multiple files at once on Mac OS?

Yes, you can use the "mv" command with the "-t" option to move multiple files to a new directory while also changing their pathnames. For example, "mv -t new_directory file1 file2" will move both file1 and file2 to the new_directory and change their pathnames accordingly.

3. Is it possible to revert back to the original pathnames on Mac OS?

If you have not permanently changed the pathnames, you can use the "mv" command with the "-i" option to prompt for confirmation before overwriting any existing files. This will allow you to revert back to the original pathnames if you accidentally changed them. However, if you have permanently changed the pathnames, you will need to manually rename the files or directories back to their original names.

4. Are there any limitations to changing pathnames on Mac OS?

There may be limitations if you are trying to change the pathnames of system files or directories that are required for the operating system to function properly. It is recommended to only change the pathnames of personal files or directories to avoid any potential issues.

5. Can I change the pathnames of files on external drives or network drives using Mac OS?

Yes, you can change the pathnames of files on external drives or network drives using the same methods as you would for files on your local hard drive. However, keep in mind that the pathnames may change if you move the external drive or if the network drive is accessed from a different computer with a different file system.

Similar threads

  • Programming and Computer Science
Replies
14
Views
1K
  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
2
Views
317
  • Programming and Computer Science
Replies
16
Views
3K
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
2
Views
742
  • Computing and Technology
Replies
24
Views
7K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
18
Views
4K
  • Programming and Computer Science
Replies
6
Views
3K
Replies
16
Views
2K
Back
Top