Skip to main content

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 from this blog

Installing TexLive 2019 in Ubuntu 18.04

Installation of TexLive 2019 in Linux (Ubuntu 18.04 LTS)
TeX (Tech)

Installation of TexLive 2019

Please watch the video for full installation



I used .iso file to download, the Total size is 3.3GB for Linux,

and i used the torrent file to download, it took me just 20 min to download the entire .iso file

Extract the .iso file to a folder and open a terminal

$] sudo ./install-tl
(it goes into a terminal mode, which is faster compared to the GUI Mode)

$] sudo ./install-tl -gui
after the installation, set the PATH, MANPATH and INFOPATH as suggested by LATEX

export PATH=$PATH:/usr/local/texlive/2019/bin/x86_64-linux
export MANPATH=/usr/local/texlive/2019/texmf-dist/doc/man
export INFOPATH=/usr/local/texlive/2019/texmf-dist/doc/info

put these lines in to the /home/pradeepkumar/.bashrc

$] gedit /home/pradeepkumar/.bashrc
We have installed TexLive 2019 and texstudio.

To install texstudio

$] sudo apt install texstudio
The look and feel of TexStudio looks like this image.


texlive, it install everyt…

Implementing a new system call in Kernel version 2.6.32

A system call is used by application or user programs to request service from the operating systems. Since the user programs does not have direct access to the kernel whereas the OS has the direct access. OS can access the hardware through system calls only.The following files has to be modified for implementing a system call/usr/src/linux-2.6.32.5/arch/x86/kernel/syscall_table_32.S/usr/src/linux-2.6.32.5/arch/x86/include/asm/unistd_32.h/usr/src/linux-2.6.32.5/include/linux/syscalls.h/usr/src/linux-2.6.32.5/MakefileNew set of files to be createdCreate a new directory newcall/ inside the path “/usr/src/linux-2.6.32.5/” Create new files Makefile, newcall.c and put them in the /usr/src/linux-2.6.32.5/newcall/ folder Create new user files (in any folder of Linux) to test the system call
testnewcall.c, testnewcall.h (created in /home/pradeepkumar) syscall_table_32.S Find the file /usr/src/linux-2.6.32.5/arch/x86/kernel/syscall_table_32.S and add the following line at the end
"…

Electrical Machine Design (equations)

FactorsDC Machine Transformers Induction Machines Synchronous MachinesOutput EquationPa=CoD2Ln, where Pa=P/h for generators, Pa=P for motorsFor Single Phase
Q=2.22 f Bm Ai Kw Aw d10-3
For Three Phase
Q=3.33 f Bm Ai Kw Aw d 10-3Q=CoD2 L ns
KVA Input Q=
HP * 0.746 / Cos f * hQ=CoD2 L ns
KVA Input Q=
HP * 0.746 / Cos f * h
For Turbo alternators
Q=1.11Bavac KwsVa2 L 10-3/nsOutput CoefficientCo=Bav ac* 10-3where Bav-magnetic loading and ac - electric loadingDNACo=11 Kws Bav ac 10-3Co=11 Kws Bav ac 10-3 Choice of Magnetic LoadingFlux Density in Teeth Frequency of Flux Reversals Size of machineDNAMagnetizing current, Flux Density, Iron lossIron loss, Stability, Voltage Rating, Parallel Operation, Transient ShortCircuit current Choice of Electric LoadingTemperature rise,
speed of machine, Voltage, Armature reaction, CommutationDNAOverload Capacity, Copper losses, Temperature rise, Leakage ReactanceCopper loss, Synchronous reactance, Temperature rise, Stray Load losses,
Voltage rating Flux …