If you are installing ns2 allinone package in fedora or ubuntu or any other linux, all the packages will be installed successfully. Occasionally the recent releases of linux flavors failed to install xgraph.
The possible error you may get is [dialog.o] error,
- Open the file dialog.c which is available under the folder xgraph-12.1/ (this is in my case)
- Find out the function getline() (will be at two places), usually line number 780 and 891 or 889, replace getline() function to newgetline() (at the both the places)
- save the file and at the prompt give ./configure
- give the command make
If there are no errors, xgraph will work now..