Hello,
If you're trying to compile on a different machine because of the error
you had before (that is physical memory not found) I'll suggest not to
continue. The error you had before, I think, has nothing to do with
compilation. I had the same error before.
The "Physical memory object not found" error was in my case, and probably
in your case also, a mismatch in the name of the physical memory object
given by simics and the name of looked up by Ruby. More precisely Ruby
always checks the presence of a physical memory object by looking for an
object name "phys_mem0". If Simics has a physical memory object but it
by chance did not name it as "phys_mem0" ruby gives this error. This
was the case when I was using the cashew configuration for the sunfire.
In file $GEMS/ruby/module/ruby.c the line which reads
phys_mem0 = SIM_get_object("phys_mem0"); (in my distribution this is line 258)
looks for the Simics physical memory object. If the returned value (thus
phys_mem0 is NULL the error you have is printed on the terminal. In my case
the actual name of the simics physical memory object was "phys_mem" instead
of "phys_mem0". So I added the following lines just below the code I point
above:
if( phys_mem0 = NULL)
phys_mem0 = SIM_get_object("phys_mem");
If you would like to know what name simics has chosen for the physical
memory object type list-objects in the simics prompt and look in the
second coloumn for a name which has the pattern similar to phys_mem or
phys_mem0. You should call the SIM_get_object with the physical memory
object name you find in this listing instead of calling it with
"phys_mem0" (as I did above with the if code).
Hope this helps,
Derin Harmanci.
Quoting Ranjith Subramanian <ranjith@xxxxxxxxxx>:
> I tried building and loading ruby on an Intel nocona core but I get the
> error: "undefined symbol: ctrl_exception_start". I've installed
> simics3.0.19 and gems.1.3.
>
> I think my specification of CC in Makefile.common is incorrect. I
> modified $GEMS/common/Makefile.common as follows:
> CC_VERSION=3.4.4
>
> ifeq ($(HOST_TYPE),amd64-linux)
> #CC = /s/gcc-3.4.1/bin/g++
> CC = /usr/bin/g++
> OPT_FLAGS = -m64 -march=nocona -fPIC
> # OPT_FLAGS = -m64 -march=opteron -fPIC
> LDFLAGS += -ggdb -g3
> # LDFLAGS += -ggdb -g3 -Wl,-R/s/gcc-3.4.1/lib64
> # MODULE_LDFLAGS += -Wl,-R/s/gcc-3.4.1/lib64
> SPECIAL_FLAGS += -DGEMS_64_BIT
> else
>
> and I modified $GEMS/ruby/modules/Makefile as
> # add -m64 and library paths if needed
> CC_VERSION=3.4.4
> HOST_TYPE = $(shell $(CALC_HOST))
> ifeq ($(HOST_TYPE),x86-linux)
> MODULE_LDFLAGS += -m32
> # if using a non-native compiler, specify runtime paths to libstdc++
> and other system libraries
> # MODULE_LDFLAGS += -Wl,-R/s/gcc-$(CC_VERSION)/lib
> else
> ifeq ($(HOST_TYPE),amd64-linux)
> MODULE_LDFLAGS += -m64
> #gcc-$(CC_VERSION)/lib64
> else
>
> I'm not sure what should replace -R/s/gcc-$(CC_VERSION)/lib. Since I'm
> using the native compiler I decided to comment it out. Is this correct?
>
> ***
> bash-3.00$ ./simics -stall
> Checking out a license... done: academic license.
>
> simics> read-configuration ../../../../chkpt/cashew.conf
> simics> instruction-fetch-mode instruction-fetch-trace
> [cpu0 info] Note that on this cpu, instruction-fetch-trace is
> implemented using instruction-cache-access-trace with a suitable cache
> line size.
> simics> istc-diable
> unknown command 'istc-diable'.
> simics> istc-disbale
> unknown command 'istc-disbale'.
> simics> istc-disable
> Turning I-STC off and flushing old data
> simics> dstc-disable
> Turning D-STC off and flushing old data
> simics> load-module ruby
> Error loading module 'ruby': Failed to load module 'ruby'
> ('/tmp/ranji/gems/wkspc/x86-linux/lib/ruby.so'): "undefined symbol:
> ctrl_exception_start"
> simics>
>
>
> The final few lines of ouput when I built RUBY with the MOSI_SMP_bcast
> protocol
>
> ***
> === Building module "ruby" ===
> ls:
>
/tmp/ranji/gems/wkspc/modules/../../ruby/x86-linux/generated/MOSI_SMP_bcast/obj/*.o:
> No such file or directory
> ls:
>
/tmp/ranji/gems/wkspc/modules/../../ruby/x86-linux/generated/MOSI_SMP_bcast/obj/*.o:
> No such file or directory
> make[2]: Entering directory
> `/tmp/ranji/gems/wkspc/x86-linux/obj/modules/ruby'
> module_id.c
> DEP module_id.d
> DEP ruby.d
> make[2]: Leaving directory
> `/tmp/ranji/gems/wkspc/x86-linux/obj/modules/ruby'
> ls:
>
/tmp/ranji/gems/wkspc/modules/../../ruby/x86-linux/generated/MOSI_SMP_bcast/obj/*.o:
> No such file or directory
> ls:
>
/tmp/ranji/gems/wkspc/modules/../../ruby/x86-linux/generated/MOSI_SMP_bcast/obj/*.o:
> No such file or directory
> make[2]: Entering directory
> `/tmp/ranji/gems/wkspc/x86-linux/obj/modules/ruby'
> Using the Simics 3.0 API for ruby module
> CC ruby.o
> /tmp/ranji/gems/wkspc/modules/ruby/ruby.c:108: warning: 'mm_id' defined
> but not used
> CC module_id.o
> CCLD ruby.so
> mod_ruby_commands.py
> make[2]: Leaving directory
> `/tmp/ranji/gems/wkspc/x86-linux/obj/modules/ruby'
> make[1]: Leaving directory `/tmp/ranji/gems/wkspc'
> Ruby: Moving simics module
> make BUILD_FLAGS=-DSIMICS movemodule
> make[1]: Entering directory `/tmp/ranji/gems/ruby'
> ../scripts/prepare_simics_home.sh ../simics/home/MOSI_SMP_bcast amd64-linux
> make[1]: Leaving directory `/tmp/ranji/gems/ruby'
> Ruby: my work is done here...
>
> ***
>
> Any help will be greatly appreciated.
>
> Ranjith
> _______________________________________________
> 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.
>
>
|