How to run the tutorials

I 'm totally new to root and have problem even running some basic scripts, I think I might have set up root improperly causing me these errors. But then again I’m not sure.

When I try to run;

TF1 f1(“func1”,“sin(x)”,0,10)

I receive
Error: Can’t call TF1::draw() in current scope (tmpfile):1:
Possible candidates are…
(in TF1)
(in TFormula)
*** Interpreter error recovered ***
I’ve already read all the setup guides on the website, and still can’t understand what I’m doing wrong.

All C/C++ identifiers are case sensitive … “draw” is not the same as “Draw”.

ROOT User’s Guide - Chapter 6. A Little C++
ROOT User’s Guide - Chapter 7. CINT the C++ Interpreter

I’m typing these lines in the bash, named root.exe,

TF1 f1(“func1”,“sin(x)”,0,10)

and I get this error.

Error in TGHScrollBar::TGHScrollBar: arrow_.xpm not found
Error in TGVScrollBar::TGVScrollBar: arrow_
.xpm not found

*** Break *** bus error

Did you run (in the “xterm” in which you plan to run “root”, but before you actually run “root”):
[bash]$ source /path/to/your/ROOT/installation/bin/
[csh]$ source /path/to/your/ROOT/installation/bin/thisroot.csh

this is what I get

root [63] /Users/appleapple/root/bin/
Syntax Error: /Users/appleapple/root/bin/ (tmpfile):1:
*** Interpreter error recovered ***
root [64]

You need to execute the command that I’ve shown BEFORE you run “root”.

I am getting “command not found”,

and these;
TF1 f1(“func1”,“sin(x)”,0,10)

still cause a crash

What command (you should have got the name if the missing command)?

This seems to be an endless thread. Please send a screen dump of your xterm (terminal) session, so we can see what you are really doing.

Or try /Users/appleapple/root/bin/thisroot.csh (if you are using csh or tcsh)

You missed “source” in the beginning :exclamation: [-X

Ooops! You’re right. So try:

This (with sh or bash):

. /Users/appleapple/root/bin/thisroot.shNote the . (dot) at the beginning

Or this (with csh or tcsh):

Cheers, Bertrand.

So I ran this code, . /Users/appleapple/root/bin/

and this is the screenshot of the error.,DcvR9eI#1,DcvR9eI#0

I’m not sure if this code means the same as the other one I tried but here is another screenshot
Thanks for all the help

In the first screenshot, I do NOT see that you run “source /…/bin/thisroot.[c]sh” BEFORE you run “root”.

I thought I was supposed to run . /Users/appleapple/root/bin/ on the bash, first screenshot is the root.exe terminal.

when i run . /Users/appleapple/root/bin/ on the root.exe, it returns unknown interpreter command

The first three lines of your terminal screenshot should look like:
Last login: … on ttys…
Anl-MacBook-Pro:~ appleapple$ source /Users/appleapple/root/ROOTSYS/bin/
Anl-MacBook-Pro:~ appleapple$ root

Another screenshot of the same error. Could I have missed a step while setting up root that is causing this problem?

It seems to me that you did not compile ROOT yourself, but you took ROOT binaries from somewhere and these binaries were created on a system which is “newer” than yours. Either you compile ROOT yourself on your system, or you need to “upgrade” your system (the first “offending” system library, visible in your screenshot, is the “/usr/X11/lib/libpng12.0.dylib” -> you need a newer version of it).

cd root ./configure make

this is what i did which is on the website,
isn’t this what I was supposed to follow,

I have updated x11, I will keep updated

This is weird then.
Maybe you should report the exact version of your operating system, compiler, … (Xcode? X11User? XQuartz?)

Try (inspect absolute paths of all libraries reported by “ldd”):
root-config --bindir
ldd root-config --bindir/root
ldd root-config --bindir/root.exe
root-config --libdir
ldd root-config --libdir/
root-config --etcdir

BTW. There’s one thing I don’t understand. If you built your ROOT as you show in your last post, how come it resides in “/Users/appleapple/root/ROOTSYS/[bin|lib]”? It should be in “/Users/appleapple/root/[bin|lib]” (no “/ROOTSYS/” in the middle).