Jump to content

Recommended Posts

Hi all!

I have a problem adding SCV library. I am new to SystemC! I am using 64bit Windows 7 and I have installed Cygwin x86_64. SystemC works with Eclipse but I am unable to add SCV library. When I try to execute

$ ../configure --with-systemc=/cygwin/c/systemc-2.3.1 

it writes out numerous lines and then I get errors

checking for supported C++ compiler... configure: WARNING: gcc 5.4 is not a supported version (i.e. (3.2|3.4|4.1|4.2|4.3|4.4|4.5|4.6|4.7|4.8)).  Beware.
checking for supported operating system... configure: error: cygwin is not supported

Is there any way to get around this problem?

 

Share this post


Link to post
Share on other sites

Yes, please have a look into the configure script and search for "checking for supported operating system". You'll need to add cygwin there. Please note, that cygwin is not officially supported although it may work.

Share this post


Link to post
Share on other sites

Should I change configure.ac or configure file? I tried changing the configure.ac file and it made no difference. Changing configure file made this errors

../configure: line 14: $'\r': command not found
../configure: line 29: syntax error near unexpected token `newline'
'./configure: line 29: `     ;;

even after changing everything back. Only copying old file instead of the changed one would make the error go away.

Share this post


Link to post
Share on other sites

This looks like your editor added Windows line endings while saving the file. Please try again with an editor which can distinguish between different line endings and choose the unix ones.

Share this post


Link to post
Share on other sites

Thank you for your help! I managed to do it using Vim editor in Cygwin although I still cannot make it work because now it can't find all libraries for systemC in systemc-2.3.1 folder.

Share this post


Link to post
Share on other sites

my reply probably got lost. Anyway, I managed to rename folder containing libsystemc.a from lib-cygwin64 to lib-cygwin and it successfully finished configure. Make and make install have these errors

../../../src/scv/scv_init_seed.cpp: In function 'long long unsigned int _scv_default_global_init_seed(long unsigned int)':
../../../src/scv/scv_init_seed.cpp:76:19: error: aggregate '_scv_default_global_init_seed(long unsigned int)::timezone dummy1' has incomplete type and cannot be defined
   struct timezone dummy1;
                   ^
../../../src/scv/scv_init_seed.cpp:77:28: error: 'gettimeofday' was not declared in this scope
   gettimeofday(&tp, &dummy1);
                            ^
make[2]: *** [Makefile:542: libscv_la-scv_init_seed.lo] Error 1
make[2]: Leaving directory '/cygdrive/c/scv-2.0.0/objdir/src/scv'
make[1]: *** [Makefile:440: check-recursive] Error 1
make[1]: Leaving directory '/cygdrive/c/scv-2.0.0/objdir/src'
make: *** [Makefile:484: check-recursive] Error 1

Will this work anyway?

Share this post


Link to post
Share on other sites

I am getting those errors in Cygwin when I execute $ make and $ make install. I tried to use it in eclipse but it wont include scv.h file. Eclipse says

C:/systemc-2.3.1/include/scv.h:44:26: fatal error: scv/scv_util.h: No such file or directory

Share this post


Link to post
Share on other sites

I've lost a little bit track here: Can you check that you are in the correct folder? In doubt, can you please post the history of commands you executed?

Share this post


Link to post
Share on other sites

Firstly, thanks for all the help. I have followed SystemC-2.3.1 INSTALL manual and done everything it said. Then I downloaded scv-2.0.0 and somehow called

$ configure

 and it showed no errors. Then i called

$ make 

and it showed a ton of text and in the end showed errors i copied two posts before.

I called 

$ make install

and it also wrote out a ton of text and printed the same two errors.

I am a bit stuck here. I need to use SCV in Eclipse but i cannot include <scv.h>. Eclipse doesn't see the scv.h file.

Share this post


Link to post
Share on other sites

First "make" has to complete without error before running "make install". Could you please post the output of "make" after fixing gettimeofday?

Share this post


Link to post
Share on other sites

I was finally able to call $ make without it getting any errors. There is an error in scv-2.0.0\src\scv\scv_init_seed.cpp: it should include sys\time.h instead of time.h because struct timezone that could not be found is defined in sys\time.h. Now $ make went trough without errors and $ make install and $ make check showed no errors.

 

How can I connect this library to be used in Eclipse?

Share this post


Link to post
Share on other sites

I did it!

 

If anyone else needs it:

there should be libscv.a and libscv.la in lib-cygwin folder in systemc folder after installation of scv library. So just go to the project you are working on in Eclipse -> Properties -> C/C++ Build -> Settings -> Cygwin C++ Linker and add scv to the libraries list!

 

Thank you, Stephan, for all the help! 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×