Jump to content

SYSTEM C INSTALLATION IN LINUX AND WINDOWS 8


KARTHIKEYAN

Recommended Posts

hai ...
 
                  i had been trying to install systemc 2.0 in red hat linux in my pc ...
                  i downloaded system c 2.0 file from accellera.
                  i found that it works with GNU compiler ,so i downloaded GNU c++ compiler 2.95.2 and run in linux...i found these message while approaching (error meniond as image below)

I followed these steps for installing GCC compiler...i creatd test file and run it in linux  mentiond in(8&9)...but i found missing something in first four points... i didnt figure out these points(1 to 4)....can anyone help me regarding these installation and my error in it?????????

 

insatallation steps found in (http://www.tldp.org/...FS-HOWTO-7.html)

  1. Reboot the computer into the LFS system
  2. Remount the LFS partition in read-write mode
  3. Mount the partition that contains the gcc-2.95.2 and gcc-install directories
  4. Create a symlink that links /usr/src/gcc-2.95.2 to the usr/src/gcc-2.95.2 directory that contains the gcc source files.
  5. Go to the gcc-install directory
  6. Install the package by running make install
  7. Go to the /root directory
  8. Compile+link test.c by running gcc test.c -o test
  9. Compile+link test2.c by running g++ test2.c -o test2
  10. Run both programs
  11. If both programs run without errors or crashing than the compilers and linkers seem to be working
  12. Remove the /usr/src/gcc-2.95.2 symlink

Screenshot.png

 

thanks and regards

R.KARTHIKEYAN

Link to comment
Share on other sites

I would strongly recommend using the current version of SystemC 2.3.1. That should install "out of the box" just by following the INSTALL and README files in the installation.

 

The steps you're quoting (1 to 4) are very specific to someone's setup, and not general. Also gcc 2.95.2 is about 10 years old - most modern linux distributions are up to about gcc 4.7 or later.

 

I don't know what version of linux you're running, but there's a good chance that your install will already have gcc and/or g++ installed. Try typing

g++ --version

at the command line.

 

If it doesn't work, use the package manager for your distribution.

 

On Fedora / RedHat you would type

yum install g++

 

On Ubuntu /Debian you would use apt-get

 

regards

Alan

Link to comment
Share on other sites

  • 5 weeks later...

cant install on the latest Ubuntu, no gmake comand found, please help!!!

 

Coroutine package for processes: QuickThreads
   Disable async_request_update   : no
   Phase callbacks (experimental) : no
   Additional settings            :
      
---------------------------------------------------------------------
dukenukem@ubuntu:~/systemc-2.3.1/objdir$ gmake
No command 'gmake' found, did you mean:
 Command 'qmake' from package 'qtchooser' (main)
 Command 'mmake' from package 'mmake' (universe)
 Command 'guake' from package 'guake' (universe)
 Command 'vmake' from package 'hdf4-tools' (universe)
 Command 'cmake' from package 'cmake' (main)
 Command 'jmake' from package 'dist' (universe)
 Command 'fmake' from package 'freebsd-buildutils' (universe)
 Command 'tmake' from package 'tmake' (main)
 Command 'make' from package 'make' (main)
 Command 'pmake' from package 'bmake' (universe)
 Command 'omake' from package 'omake' (universe)
 Command 'imake' from package 'xutils-dev' (main)
 Command 'bmake' from package 'bmake' (universe)
gmake: command not found
dukenukem@ubuntu:~/systemc-2.3.1/objdir$ 
 
 
 
what do i do now?
Link to comment
Share on other sites

Try just make instead of gmake

Alan

Hi Alan thanks for that, it looks like it installed correctly and ran the make command in the examples folder and it looks like everything is ok

 

PASS: 2.1/scx_mutex_w_policy/test.sh
 
        SystemC 2.3.1-Accellera --- Jan 10 2015 11:21:03
        Copyright © 1996-2014 by all Contributors,
        ALL RIGHTS RESERVED
PASS: 2.1/specialized_signals/test.sh
 
        SystemC 2.3.1-Accellera --- Jan 10 2015 11:21:03
        Copyright © 1996-2014 by all Contributors,
        ALL RIGHTS RESERVED
PASS: 2.3/sc_rvd/test.sh
 
        SystemC 2.3.1-Accellera --- Jan 10 2015 11:21:03
        Copyright © 1996-2014 by all Contributors,
        ALL RIGHTS RESERVED
PASS: 2.3/sc_ttd/test.sh
 
 
and so on....
 
but when I go into one of my own example it still cant find the systemc.h file as seen below, after trying to add the environment variable path, can you please tell me what I'm doing wrong.
 
 
 
dukenukem@ubuntu:~/Desktop/lab1/flipflop$ export SYSTEMC_HOME=/usr/local/systemc-2.3/
dukenukem@ubuntu:~/Desktop/lab1/flipflop$ sudo gedit /etc/environment
[sudo] password for dukenukem: 
 
(gedit:10957): IBUS-WARNING **: The owner of /home/dukenukem/.config/ibus/bus is not root!
 
(gedit:10957): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
 
(gedit:10957): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
dukenukem@ubuntu:~/Desktop/lab1/flipflop$ sudo gedit /etc/environment
 
(gedit:11006): IBUS-WARNING **: The owner of /home/dukenukem/.config/ibus/bus is not root!
dukenukem@ubuntu:~/Desktop/lab1/flipflop$ make
/usr/bin/g++ -I/usr/local/SystemC-2.3.0/include -I. -c flipflop.cpp sc_main.cpp
In file included from flipflop.cpp:4:0:
flipflop.h:8:28: fatal error: systemc.h: No such file or directory
 #include <systemc.h>       
                            ^
compilation terminated.
sc_main.cpp:6:21: fatal error: systemc.h: No such file or directory
 #include <systemc.h>
                     ^
compilation terminated.
make: *** [flipflop.o] Error 1
dukenukem@ubuntu:~/Desktop/lab1/flipflop$ 
 
 
the environment variable path i tried to add was this 
SYSTEMC_HOME=”/usr/local/systemc-2.2/”
 
but still no cigar
 
 
 
 
 
 
Link to comment
Share on other sites

actually the make file contain the path for the environment variable as can be seen bellow, so there should be no need to add it

 

#
CC=/usr/bin/g++
ARCH := $(shell arch)
SYSTEMC_HOME=/usr/local/SystemC-2.3.1
 
# 64bit or 32bit libaries to link to
LINUXLIB := $(shell if [ ${ARCH} = "i686" ]; \
                    then \
                         echo lib-linux; \
                    else \
                         echo lib-linux64; \
                    fi)
 
INCLUDES = -I$(SYSTEMC_HOME)/include -I.
 
LIBRARIES = -L. -L$(SYSTEMC_HOME)/$(LINUXLIB) -lsystemc -lm
 
RPATH = -Wl,-rpath=$(SYSTEMC_HOME)/$(LINUXLIB)
 
PROGRAM = flipflop.x
SRCS    =  flipflop.cpp sc_main.cpp
OBJS    =  flipflop.o sc_main.o
 
all : $(PROGRAM)
 
$(OBJS) : $(SRCS)
        $(CC) $(INCLUDES) -c $(SRCS)
 
$(PROGRAM) : $(OBJS)
        $(CC) $(INCLUDES) $(LIBRARIES) $(RPATH) -o $(PROGRAM) $(OBJS)
 
clean:
        @rm -f $(OBJS) $(PROGRAM) *.cpp~ *.h~
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...