Xgraph [dialog.o] error

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.

Problem:

The possible error you may get is [dialog.o] error,

Solution:

  1. Open the file dialog.c which is available under the folder xgraph-12.1/ (this is in my case)
  2. 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)
  3. save the file and at the prompt give ./configure
  4. give the command make

If there are no errors, xgraph will work now..

Comments

  1. I got the following error while patching sip 2.26 to ns 2.26



    tclcl-mappings.h: In static member function ‘static int TclObjectHelper::dispatch_(void*, Tcl_Interp*, int, char**)’:
    tclcl-mappings.h:51: error: incomplete type ‘Tcl’ used in nested name specifier
    tclcl-mappings.h:52: error: invalid use of undefined type ‘struct Tcl’
    tclcl-mappings.h:41: error: forward declaration of ‘struct Tcl’
    tclcl-mappings.h:57: error: invalid use of undefined type ‘struct Tcl’
    tclcl-mappings.h:41: error: forward declaration of ‘struct Tcl’
    make: *** [Tcl.o] Error 1
    tclcl-1.0b13 make failed! Exiting ...

    ReplyDelete
  2. i got the following error while patching SIP in ns2.27 and my OS ubuntu 8.10


    make: Nothing to be done for `all'.
    otcl-1.8 has been installed successfully.
    ============================================================
    * Build Tclcl-1.15
    ============================================================
    No .configure file found in current directory
    Continuing with default options...
    checking build system type... i686-pc-linux-gnu
    checking host system type... i686-pc-linux-gnu
    checking target system type... i686-pc-linux-gnu
    checking for gcc... gcc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for g++... no
    checking for c++... no
    checking for gpp... no
    checking for aCC... no
    checking for CC... no
    checking for cxx... no
    checking for cc++... no
    checking for cl.exe... no
    checking for FCC... no
    checking for KCC... no
    checking for RCC... no
    checking for xlC_r... no
    checking for xlC... no
    checking whether we are using the GNU C++ compiler... no
    checking whether g++ accepts -g... no
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for string.h... (cached) yes
    checking for main in -lXbsd... no
    checking for socket in -lsocket... no
    checking for gethostbyname in -lnsl... yes
    checking for dcgettext in -lintl... no
    checking for getnodebyname in -ldnet_stub... no
    checking that g++ can handle -O2... no
    checking standard STL is available... no
    checking for ranlib... ranlib
    checking for snprintf... yes
    checking for ANSI C header files... (cached) yes
    checking for strtoq... yes
    checking for strtoll... yes
    checking size of long... 4
    checking for __int64_t... no
    checking for long long... yes
    checking for int64_t... yes
    checking which kind of 64-bit int to use... int64_t
    checking for tcl.h... -I../tcl8.4.18/generic
    checking for tclInt.h... -I../tcl8.4.18/generic
    checking for libtcl8.4... -L../tcl8.4.18/unix -ltcl8.4
    checking for init.tcl... ../tcl8.4.18/library
    checking for http.tcl... ../tcl8.4.18/library/http
    checking Tcl http.tcl library... yes
    checking for tclsh8.4.18... no
    checking for tclsh8.4... /home/karthik/ns-allinone-2.27/bin/tclsh8.4
    checking for tk.h... -I../tk8.4.18/generic
    checking for libtk8.4... -L../tk8.4.18/unix -ltk8.4
    checking for tk.tcl... ../tk8.4.18/library
    checking for otcl.h... -I../otcl-1.13
    checking for libotcl1.13... -L../otcl-1.13 -lotcl
    checking for X11 header files
    checking for X11 library archive
    checking for XOpenDisplay in -lX11... yes
    checking for XShmAttach in -lXext... yes
    checking for zlib.h... no
    checking for libz1.1.3... no
    No explicit static compilation flag; setting V_STATIC to ""
    checking for dlopen in -ldl... yes
    checking for a BSD-compatible install... /usr/bin/install -c
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating config.h
    config.status: config.h is unchanged
    rm -f tcl2c++
    g++ -o tcl2c++ tcl2c++.o
    make: g++: Command not found
    make: *** [tcl2c++] Error 127
    tclcl-1.15 make failed! Exiting ...
    See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
    karthik@karthik-laptop:~/ns-allinone-2.27$

    ReplyDelete
  3. I am trying to run dsr.tcl... simulation shows a "Segmentation fault" but animation is simulated (under NAM window) correctly. also xgraph gives a error "unknown line type" - any suggestions ?

    ReplyDelete
  4. Nilesh Shahane27 May 2011 at 18:10

    Thank You!
    I am using ns2.34 on Fedora 13 and your solution worked for me.
    Thanks again.

    ReplyDelete
  5. i got the following errors to run the command make install

    /usr/bin/install -c xgraph '/usr/local/bin'
    /usr/bin/install: cannot create regular file `/usr/local/bin/xgraph': Permission denied
    make[1]: *** [install-binPROGRAMS] Error 1
    make[1]: Leaving directory `/home/ns/xgraph-12.1.orig'
    make: *** [install-am] Error 2

    any suggestion

    ReplyDelete

Post a Comment

Popular Posts