Re: [Gems-users] using non native compiler for simics/gems


Date: Fri, 13 Jul 2007 16:28:40 -0400 (EDT)
From: Shantanu Gupta <shangupt@xxxxxxxxx>
Subject: Re: [Gems-users] using non native compiler for simics/gems
I used:

Gems 1.4
Simics 3.0.28
OS Fedora core 4
GCC 4.0.2

Native compiler was used that came along with my linux distribution.

-Shantanu

On Fri, 13 Jul 2007, Dan Gibson wrote:

I'm glad its working now, even if the fix was mostly trial and error.

Just out of curiosity (and so it'll be in the thread), which linux
distribution are you using?

Regards,
Dan

Shantanu Gupta wrote:
I finally got it to work. But I ended up using a native compiler (GCC
4.0.2) on one of the machines. I don't know what problems were there with
using non-native compiler.

Some of the things that I did (which helped me to get everything working):

1) Removed unnecessary environment variables from the shell. I found out
that some of them were interefering with gems installation.

2) Moved libgcc and libstdc++ files in /simics3/x86-linux/sys/lib to some
other place.

3) Started with a fresh install of simics and ruby and made appropriate
changes to the gems makefiles

-Shantanu

On Wed, 11 Jul 2007, Dan Gibson wrote:


Every now and then I run into problems that are fixed by a re-install of
Simics and GEMS... admittedly I don't run with Simics 3 (except to test
Simics 3 "compatibility"). I think there are remnants of the build
process that aren't clobbered by Ruby's 'make clean', which go away when
one re-installs.

Sorry I can't offer a more surgical option...

Regards,
Dan

Shantanu Gupta wrote:

On Wed, 11 Jul 2007, Dan Gibson wrote:



What happens when you try >load-module ruby at the Simics console?



Thanks for your reply Dan. I get the following error:

Error loading module 'ruby': Failed to load module 'ruby'
('/x/shangupt/gems/simics_3_workspace/x86-linux/lib/ruby.so'): "undefined
symbol: ruby_session_set"

I also ran 'nm' and 'objdump' to verify that ruby.so does NOT have
ruby_session_set variable defined.



Have you copied the libgcc and libstc into the Simics library tree? I'm not
sure that trick works with Simics 3.x, but its worth a try... the details
are listed in the GEMS Wiki, under the 2.2.x setup if I remember correctly.



Yes, I have tried that approach. I copied the replacement files from my
gcc-3.4.1 installation to the simics library tree. It gives the exact same
problem. It seems that working with 2.2.x is much more transparent.

Currently I am giving a shot to gcc-3.2.2, just for kicks. I am not very
hopeful. I am afraid that I might not be tackling with the real root of
this problem.

Shantanu



Shantanu Gupta wrote:

 I did some more runs with different machines/compiler set-up, but with no
luck. I have tried GCC 4.0.3 and 3.4.1 as non native compilers, and I read
that both have worked with Gems in the past.

I am using Gems 1.4 with Simics 3.0.28 on a P4 machine. I do not get any
problems with the compilation. But, when I try loading the ruby module, I
get the undefined symbol error. An updated dump of ldd on ruby.so:

$ lib > ldd ruby.so
         linux-gate.so.1 =>  (0x00499000)
         libz.so.1 => /usr/lib/libz.so.1 (0x003f2000)
         libstdc++.so.6 => /opt/gcc-3.4.1/lib/libstdc++.so.6 (0x00ae3000)
         libsimics-common.so => not found
         libm.so.6 => /lib/libm.so.6 (0x00405000)
         libgcc_s.so.1 => /opt/gcc-3.4.1/lib/libgcc_s.so.1 (0x00ec0000)
         libc.so.6 => /lib/libc.so.6 (0x004b6000)
         /lib/ld-linux.so.2 (0x0049a000)


On Tue, 10 Jul 2007, shangupt@xxxxxxxxx wrote:



 For cases when the native compiler is not used for GEMS (as discussed
heavily in thread -
https://lists.cs.wisc.edu/archive/gems-users/2006-October/msg00168.shtml). How
can I make the compiler for Simics consistent with that used by Gems ?

I understand that I have to modify the LDFLAGS and MODULE_LDFLAGS in
all the makefiles withing Gems. But in addition to that, do I have to
change something for Simics installation in order for it to use the non
native compiler ?

Currently I have tried GCC 4.1.1 (as native) and 3.3.6 (as non-native)
and with both I get the error of following sort:

Error loading module 'ruby': Failed to load module 'ruby'
('/packages/GEMS/simics-3-workspace/x86-linux/lib/ruby.so'): "undefined
symbol: ruby_session_set"

I am not sure if I have done the integration of non-native compiler
correctly. My ruby.so file gives following with ldd (when using GCC
3.3.6 non native)

$> ldd ruby.so

./ruby.so: /opt/gcc-3.3.6/lib/libgcc_s.so.1: version `GCC_4.2.0' not
found (required by /usr/lib/libstdc++.so.6)
       linux-gate.so.1 =>  (0x0060f000)
       libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00bbf000)
       libz.so.1 => /usr/lib/libz.so.1 (0x00e58000)
       libsimics-common.so => not found
       libm.so.6 => /lib/libm.so.6 (0x00773000)
       libgcc_s.so.1 => /opt/gcc-3.3.6/lib/libgcc_s.so.1 (0x0052f000)
       libc.so.6 => /lib/libc.so.6 (0x00cca000)
       /lib/ld-linux.so.2 (0x80000000)

Any suggestions are welcome. Thanks,

_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.






 _______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.








_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.



--
http://www.cs.wisc.edu/~gibson [esc]:wq!

_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.





_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.



--
http://www.cs.wisc.edu/~gibson [esc]:wq!

_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.




[← Prev in Thread] Current Thread [Next in Thread→]