LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-18-2012, 04:09 AM   #1
vardhan22
LQ Newbie
 
Registered: Nov 2011
Posts: 20

Rep: Reputation: Disabled
Systemc installation erroor


Hi,

i am a new user of systemc and during installation process, on using "make", i am getting this error.

Making all in src
make[1]: Entering directory `/home/amritesh/Downloads/systemc-2.2.0/objdir/src'
Making all in sysc
make[2]: Entering directory `/home/amritesh/Downloads/systemc-2.2.0/objdir/src/sysc'
Making all in kernel
make[3]: Entering directory `/home/amritesh/Downloads/systemc-2.2.0/objdir/src/sysc/kernel'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/amritesh/Downloads/systemc-2.2.0/objdir/src/sysc/kernel'
Making all in qt
make[3]: Entering directory `/home/amritesh/Downloads/systemc-2.2.0/objdir/src/sysc/qt'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/amritesh/Downloads/systemc-2.2.0/objdir/src/sysc/qt'
Making all in communication
make[3]: Entering directory `/home/amritesh/Downloads/systemc-2.2.0/objdir/src/sysc/communication'
g++ -I. -I. -I../../../../src/sysc/communication -I../../../../src -Wall -DSC_INCLUDE_FX -O3 -c -o sc_signal.o `test -f '../../../../src/sysc/communication/sc_signal.cpp' || echo '../../../../src/sysc/communication/'`../../../../src/sysc/communication/sc_signal.cpp
In file included from ../../../../src/sysc/datatypes/bit/sc_bv_base.h:50:0,
from ../../../../src/sysc/datatypes/bit/sc_lv_base.h:56,
from ../../../../src/sysc/communication/sc_signal.cpp:102:
../../../../src/sysc/datatypes/bit/sc_bit_proxies.h:716:16: error: reference ‘m_obj’ cannot be declared ‘mutable’ [-fpermissive]
../../../../src/sysc/datatypes/bit/sc_bit_proxies.h:1193:18: error: reference ‘m_left’ cannot be declared ‘mutable’ [-fpermissive]
../../../../src/sysc/datatypes/bit/sc_bit_proxies.h:1194:18: error: reference ‘m_right’ cannot be declared ‘mutable’ [-fpermissive]
../../../../src/sysc/datatypes/bit/sc_bit_proxies.h:1196:18: error: reference ‘m_refs’ cannot be declared ‘mutable’ [-fpermissive]
In file included from ../../../../src/sysc/communication/sc_signal.cpp:102:0:
../../../../src/sysc/datatypes/bit/sc_lv_base.h: In member function ‘sc_dt::sc_logic_value_t sc_dt::sc_lv_base::get_bit(int) const’:
../../../../src/sysc/datatypes/bit/sc_lv_base.h:309:88: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
make[3]: *** [sc_signal.o] Error 1
make[3]: Leaving directory `/home/amritesh/Downloads/systemc-2.2.0/objdir/src/sysc/communication'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/amritesh/Downloads/systemc-2.2.0/objdir/src/sysc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/amritesh/Downloads/systemc-2.2.0/objdir/src'
make: *** [all-recursive] Error 1


can anybody please help me in resolving this problem?
 
Old 03-18-2012, 04:32 AM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
...did you run the confiigure first? I do not know THIS package, but if you want to build/compile anything, there has to be a configuration file. From there on (the feedback of the configure tool) you can figure out what your system (still) needs to adhere to for the software to run...

Good luck

Thor
 
Old 03-18-2012, 04:45 AM   #3
vardhan22
LQ Newbie
 
Registered: Nov 2011
Posts: 20

Original Poster
Rep: Reputation: Disabled
I did all these :

$ mv systemc-2.2.0.tgz systemc-2.2.0.tar
$ tar xvf systemc-2.2.0.tar

$ cd systemc-2.2.0
$ sudo mkdir /usr/local/systemc
$ mkdir objdir
$ cd objdir
$ export CXX=g++
$ sudo ../configure --prefix=/usr/local/systemc

Step 2: Patch.

Using new versions of GCC such as GCC 4.4, we will fail to compile because 2 lines of code were left out of systemc-2.2.0/src/sysc/utils/sc_utils_ids.cpp.

Method 1: You can just just open the file and add these includes at the of the file:
#include "cstdlib"
#include "cstring"
#include "sysc/utils/sc_report.h"
using namespace std;

Step 3: Compile
$ make -
this is where i am getting this error.
 
Old 03-18-2012, 05:02 AM   #4
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Quote:
sudo mkdir /usr/local/systemc
For starters, dont compile anything outside your home folder. It makes for a cleaner deploy that way. Make a folder IN your home folder (say "makefolder") and work in there. I suspect you not to have system rights to compile anywhere else...
In short, these are the steps I (usually) take:

- download to a /download folder
- copy to a make folder untar configure and make in there, as a regular (non-root) user, you're alloed to do that
- enter su - (hyphen is important) and supply the root pass
- navigate to the home folder (most distros I use put you in the /root folder after you log in as super user) and there (as root)
- supply the "make install" command, after that I issue an exit...

I suspect this to be the case...

By the way, is that a C variant? I did a lookup and Arch (my distro) does not have it in the "shop" - if it is a C variant, is there a good reason to use it? If so, look in the repo for a compiled/prepped/suitable version first before compiling anything...

Good luck

Thor

Last edited by ButterflyMelissa; 03-18-2012 at 05:10 AM.
 
Old 03-18-2012, 05:15 AM   #5
vardhan22
LQ Newbie
 
Registered: Nov 2011
Posts: 20

Original Poster
Rep: Reputation: Disabled
This time i did it in my home folder same thing happened.
 
Old 03-18-2012, 11:42 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Which version of Ubuntu are you using ? ?

Post #3 : ""$ export CXX=g++"" Means g++ version 4.6, if Ubuntu 11.10.
( Can be checked with the command : g++ --version ).

Please try : export CXX=g++-4.4
( The package g++-4.4 must be installed.)

.
 
Old 03-18-2012, 11:52 AM   #7
vardhan22
LQ Newbie
 
Registered: Nov 2011
Posts: 20

Original Poster
Rep: Reputation: Disabled
please help me
 
Old 03-18-2012, 01:05 PM   #8
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Quote:
please help me
Dont panic try to supply the answers to knudfl's questions. In order for us to help you, we need some info. During this thread, you may need to run some stuff (in the console) and post the feedback here. Remember, we're basically blind here

Thor
 
Old 03-18-2012, 02:47 PM   #9
vardhan22
LQ Newbie
 
Registered: Nov 2011
Posts: 20

Original Poster
Rep: Reputation: Disabled
The error was, some variables were could not be declared mutable, i delete mutable, and got it installed

now, i am able to run simple systemc program like "hello world".

will it cause any problem if i do big projects?
 
Old 03-18-2012, 03:02 PM   #10
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Congrats!!! Glad you're on the roll...

Quote:
will it cause any problem if i do big projects?
I dont know, honestly...I never used systemc before. I use what's in the repo: GCC, but, chances are you're in bizzness

Thanks for posting your solution here!

Thor
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help in systemc-2.2.0 maamoon Linux - Software 9 09-20-2009 07:29 AM
Newbie,Makefile and....SystemC salmanmanekia Linux - Newbie 3 07-28-2009 03:59 PM
can't install systemc 2.1.1 on amd athlon64 bit with ubuntu breezy tmcgarr Linux - Software 1 09-16-2007 09:59 PM
SystemC Installation Issues?? aragorn_great Programming 8 11-21-2005 08:25 AM
Boot erroor - L 99 99 99 99 99 99 99 ......... aspartat Linux - Software 2 10-12-2005 05:20 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration