LinuxQuestions.org
Help answer threads with 0 replies.
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 09-02-2009, 01:55 AM   #1
Shyami86
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Rep: Reputation: 0
undefined reference while compiling sim-profile.c in Simplescalar tool


Hi.. I installed SimpleScalar simulator as per http://www.kth.se/student/program-kurser/kurshemsidor/kurser-ict/ecs/IS2202/VT09-1/2.7064?l=en_UK" installation instructions. Everything went fine but the sim-profile.c program which is the profiling simulator program doesn't compile!

When I do the following :

root@surya-laptop:/home/surya/simplescalar/simplesim-3.0# ../bin/sslittle-na-sstrix-gcc sim-profile.c

I get the following errors!

/tmp/ccTr2F8a1.o: In function `sim_reg_options':
sim-profile.c:106: undefined reference to `opt_reg_header'
sim-profile.c:106: undefined reference to `opt_reg_uint'
sim-profile.c:106: undefined reference to `opt_reg_flag'
sim-profile.c:106: undefined reference to `opt_reg_flag'
sim-profile.c:106: undefined reference to `opt_reg_flag'
sim-profile.c:106: undefined reference to `opt_reg_flag'
sim-profile.c:106: undefined reference to `opt_reg_flag'
/tmp/ccTr2F8a1.o:sim-profile.c:106: more undefined references to `opt_reg_flag' follow
/tmp/ccTr2F8a1.o: In function `sim_reg_options':
sim-profile.c:106: undefined reference to `opt_reg_string_list'
/tmp/ccTr2F8a1.o: In function `bind_to_seg':
sim-profile.c:255: undefined reference to `ld_data_base'
sim-profile.c:255: relocation truncated to fit: GPREL ld_data_base
sim-profile.c:255: undefined reference to `ld_data_base'
sim-profile.c:255: relocation truncated to fit: GPREL ld_data_base
sim-profile.c:255: undefined reference to `ld_data_size'
sim-profile.c:255: relocation truncated to fit: GPREL ld_data_size
sim-profile.c:255: undefined reference to `ld_data_base'
sim-profile.c:255: relocation truncated to fit: GPREL ld_data_base
sim-profile.c:255: undefined reference to `ld_data_size'
sim-profile.c:255: relocation truncated to fit: GPREL ld_data_size
sim-profile.c:255: undefined reference to `ld_brk_point'
sim-profile.c:255: relocation truncated to fit: GPREL ld_brk_point
sim-profile.c:255: undefined reference to `ld_stack_base'
sim-profile.c:255: relocation truncated to fit: GPREL ld_stack_base
sim-profile.c:255: undefined reference to `ld_stack_base'
sim-profile.c:255: relocation truncated to fit: GPREL ld_stack_base
sim-profile.c:255: undefined reference to `ld_text_base'
sim-profile.c:255: relocation truncated to fit: GPREL ld_text_base
sim-profile.c:255: undefined reference to `ld_text_base'
sim-profile.c:255: relocation truncated to fit: GPREL ld_text_base
sim-profile.c:255: undefined reference to `ld_text_size'
sim-profile.c:255: relocation truncated to fit: GPREL ld_text_size
sim-profile.c:255: undefined reference to `_panic'
/tmp/ccTr2F8a1.o: In function `sim_reg_stats':
sim-profile.c:298: undefined reference to `sim_num_insn'
sim-profile.c:298: relocation truncated to fit: GPREL sim_num_insn
sim-profile.c:298: undefined reference to `sim_num_insn'
sim-profile.c:298: relocation truncated to fit: GPREL sim_num_insn
sim-profile.c:298: undefined reference to `stat_reg_sqword'
sim-profile.c:298: undefined reference to `stat_reg_sqword'
sim-profile.c:298: undefined reference to `sim_elapsed_time'
sim-profile.c:298: relocation truncated to fit: GPREL sim_elapsed_time
sim-profile.c:298: undefined reference to `stat_reg_int'
sim-profile.c:298: undefined reference to `stat_reg_formula'
sim-profile.c:298: undefined reference to `stat_reg_dist'
sim-profile.c:298: undefined reference to `md_op2name'
sim-profile.c:298: undefined reference to `md_op2name'
sim-profile.c:298: undefined reference to `md_op2format'
sim-profile.c:298: undefined reference to `md_op2format'
sim-profile.c:298: undefined reference to `mystrdup'
sim-profile.c:298: undefined reference to `stat_reg_dist'
sim-profile.c:298: undefined reference to `stat_reg_dist'
sim-profile.c:298: undefined reference to `md_amode_str'
sim-profile.c:298: undefined reference to `md_amode_str'
sim-profile.c:298: undefined reference to `stat_reg_dist'
sim-profile.c:298: undefined reference to `stat_reg_dist'
sim-profile.c:298: undefined reference to `sym_ntextsyms'
sim-profile.c:298: relocation truncated to fit: GPREL sym_ntextsyms
sim-profile.c:298: undefined reference to `ld_prog_fname'
sim-profile.c:298: relocation truncated to fit: GPREL ld_prog_fname
sim-profile.c:298: undefined reference to `sym_loadsyms'
sim-profile.c:298: undefined reference to `sym_ntextsyms'
sim-profile.c:298: relocation truncated to fit: GPREL sym_ntextsyms
sim-profile.c:298: undefined reference to `sym_ntextsyms'
sim-profile.c:298: relocation truncated to fit: GPREL sym_ntextsyms
sim-profile.c:298: undefined reference to `sym_textsyms'
sim-profile.c:298: relocation truncated to fit: GPREL sym_textsyms
sim-profile.c:298: undefined reference to `sym_ntextsyms'
sim-profile.c:298: relocation truncated to fit: GPREL sym_ntextsyms
sim-profile.c:298: undefined reference to `stat_reg_dist'
sim-profile.c:298: undefined reference to `sym_ndatasyms'
sim-profile.c:298: relocation truncated to fit: GPREL sym_ndatasyms
sim-profile.c:298: undefined reference to `ld_prog_fname'
sim-profile.c:298: relocation truncated to fit: GPREL ld_prog_fname
sim-profile.c:298: undefined reference to `sym_loadsyms'
sim-profile.c:298: undefined reference to `sym_ndatasyms'
sim-profile.c:298: relocation truncated to fit: GPREL sym_ndatasyms
sim-profile.c:298: undefined reference to `sym_ndatasyms'
sim-profile.c:298: relocation truncated to fit: GPREL sym_ndatasyms
sim-profile.c:298: undefined reference to `sym_datasyms'
sim-profile.c:298: relocation truncated to fit: GPREL sym_datasyms
sim-profile.c:298: undefined reference to `sym_ndatasyms'
sim-profile.c:298: relocation truncated to fit: GPREL sym_ndatasyms
sim-profile.c:298: undefined reference to `stat_reg_dist'
sim-profile.c:298: undefined reference to `stat_reg_sdist'
sim-profile.c:298: undefined reference to `stat_find_stat'
sim-profile.c:298: undefined reference to `_fatal'
sim-profile.c:298: undefined reference to `_fatal'
sim-profile.c:298: undefined reference to `_panic'
sim-profile.c:298: undefined reference to `stat_reg_sdist'
sim-profile.c:298: undefined reference to `ld_reg_stats'
sim-profile.c:298: undefined reference to `mem_reg_stats'
/tmp/ccTr2F8a1.o: In function `sim_init':
sim-profile.c:495: undefined reference to `regs_init'
sim-profile.c:495: undefined reference to `mem_create'
sim-profile.c:495: undefined reference to `mem_init'
/tmp/ccTr2F8a1.o: In function `profile_mstate_obj':
sim-profile.c:512: undefined reference to `sim_print_stats'
/tmp/ccTr2F8a1.o: In function `sim_load_prog':
sim-profile.c:525: undefined reference to `ld_load_prog'
sim-profile.c:525: undefined reference to `md_reg_obj'
sim-profile.c:525: undefined reference to `md_reg_obj'
sim-profile.c:525: undefined reference to `dlite_mem_obj'
sim-profile.c:525: undefined reference to `dlite_mem_obj'
sim-profile.c:525: undefined reference to `dlite_init'
/tmp/ccTr2F8a1.o: In function `sim_main':
sim-profile.c:642: undefined reference to `dlite_check'
sim-profile.c:642: relocation truncated to fit: GPREL dlite_check
sim-profile.c:642: undefined reference to `dlite_active'
sim-profile.c:642: relocation truncated to fit: GPREL dlite_active
sim-profile.c:642: undefined reference to `__check_break'
sim-profile.c:642: undefined reference to `sim_num_insn'
sim-profile.c:642: relocation truncated to fit: GPREL sim_num_insn
sim-profile.c:642: undefined reference to `dlite_main'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `verbose'
sim-profile.c:642: relocation truncated to fit: GPREL verbose
sim-profile.c:642: undefined reference to `sim_num_insn'
sim-profile.c:642: relocation truncated to fit: GPREL sim_num_insn
sim-profile.c:642: undefined reference to `myfprintf'
sim-profile.c:642: undefined reference to `md_print_insn'
sim-profile.c:642: undefined reference to `sim_num_insn'
sim-profile.c:642: relocation truncated to fit: GPREL sim_num_insn
sim-profile.c:642: undefined reference to `sim_num_insn'
sim-profile.c:642: relocation truncated to fit: GPREL sim_num_insn
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
/tmp/ccTr2F8a1.o:sim-profile.c:642: more undefined references to `mem_translate' follow
/tmp/ccTr2F8a1.o: In function `sim_main':
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `md_lr_masks'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
/tmp/ccTr2F8a1.o:sim-profile.c:642: more undefined references to `mem_translate' follow
/tmp/ccTr2F8a1.o: In function `sim_main':
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `mem_newpage'
sim-profile.c:642: undefined reference to `mem_translate'
sim-profile.c:642: undefined reference to `extractl'
sim-profile.c:642: undefined reference to `extractl'
sim-profile.c:642: undefined reference to `extractl'
sim-profile.c:642: undefined reference to `extractl'
sim-profile.c:642: undefined reference to `mem_access'
sim-profile.c:642: undefined reference to `mem_access'
sim-profile.c:642: undefined reference to `sys_syscall'
sim-profile.c:642: undefined reference to `_panic'
sim-profile.c:642: undefined reference to `md_op2flags'
sim-profile.c:642: undefined reference to `md_op2flags'
sim-profile.c:642: undefined reference to `md_op2flags'
sim-profile.c:642: undefined reference to `md_op2flags'
sim-profile.c:642: undefined reference to `md_op2flags'
/tmp/ccTr2F8a1.o:sim-profile.c:642: more undefined references to `md_op2flags' follow
/tmp/ccTr2F8a1.o: In function `sim_main':
sim-profile.c:642: undefined reference to `_panic'
sim-profile.c:642: undefined reference to `stat_add_sample'
sim-profile.c:642: undefined reference to `stat_add_sample'
sim-profile.c:642: undefined reference to `_panic'
sim-profile.c:642: undefined reference to `stat_add_sample'
sim-profile.c:642: undefined reference to `md_op2flags'
sim-profile.c:642: undefined reference to `md_op2flags'
sim-profile.c:642: undefined reference to `md_op2flags'
sim-profile.c:642: undefined reference to `md_op2flags'
sim-profile.c:642: undefined reference to `_panic'
sim-profile.c:642: undefined reference to `stat_add_sample'
sim-profile.c:642: undefined reference to `stat_add_sample'
sim-profile.c:642: undefined reference to `sym_bind_addr'
sim-profile.c:642: undefined reference to `sym_ntextsyms'
sim-profile.c:642: relocation truncated to fit: GPREL sym_ntextsyms
sim-profile.c:642: undefined reference to `_panic'
sim-profile.c:642: undefined reference to `stat_add_sample'
sim-profile.c:642: undefined reference to `sym_bind_addr'
sim-profile.c:642: undefined reference to `sym_ndatasyms'
sim-profile.c:642: relocation truncated to fit: GPREL sym_ndatasyms
sim-profile.c:642: undefined reference to `_panic'
sim-profile.c:642: undefined reference to `stat_add_sample'
sim-profile.c:642: undefined reference to `stat_add_sample'
sim-profile.c:642: undefined reference to `_panic'
sim-profile.c:642: undefined reference to `stat_add_samples'
sim-profile.c:642: undefined reference to `dlite_check'
sim-profile.c:642: relocation truncated to fit: GPREL dlite_check
sim-profile.c:642: undefined reference to `dlite_active'
sim-profile.c:642: relocation truncated to fit: GPREL dlite_active
sim-profile.c:642: undefined reference to `sim_num_insn'
sim-profile.c:642: relocation truncated to fit: GPREL sim_num_insn
sim-profile.c:642: undefined reference to `sim_num_insn'
sim-profile.c:642: relocation truncated to fit: GPREL sim_num_insn
sim-profile.c:642: undefined reference to `__check_break'
sim-profile.c:642: undefined reference to `sim_num_insn'
sim-profile.c:642: relocation truncated to fit: GPREL sim_num_insn
sim-profile.c:642: undefined reference to `dlite_main'
sim-profile.c:642: undefined reference to `sim_num_insn'
sim-profile.c:642: relocation truncated to fit: GPREL sim_num_insn
sim-profile.c:642: undefined reference to `sim_num_insn'
sim-profile.c:642: relocation truncated to fit: GPREL sim_num_insn
sim-profile.c:642: undefined reference to `sim_num_insn'
sim-profile.c:642: relocation truncated to fit: GPREL sim_num_insn
sim-profile.c:642: undefined reference to `sim_num_insn'
sim-profile.c:642: relocation truncated to fit: GPREL sim_num_insn
/home/surya/simplescalar/sslittle-na-sstrix/lib/libc.a(fmain.o): In function `main':
fmain.c:118: undefined reference to `MAIN__'

It clearly cannot link to the header files included in the program. But I don't know how to rectify this!! Please help me..

The Makefile has the following:

CC = gcc
OFLAGS = -O -g -Wall
MFLAGS = `./sysprobe -flags`
MLIBS = `./sysprobe -libs` -lm
ENDIAN = `./sysprobe -s`
MAKE = make
AR = ar qcv
AROPT =
RANLIB = ranlib
RM = rm -f
RMDIR = rm -f
LN = ln -s
LNDIR = ln -s
DIFF = diff
OEXT = o
LEXT = a
EEXT =
CS = ;
X=/

If I run the command

./sysprobe -libs

I get a space as output! Is that got to do something with the problem??
Kindly share your thoughts....
 
Old 09-04-2009, 01:14 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
I could not replicate the error, but for you the link stage is failing. Either some of the object files are missing (which would mean errors before the ones you listed here), or the Makefile has been changed.

Before the errors, it should have echoed a compile line that looks something like this:

Code:
gcc -o sim-profile `./sysprobe -flags` -DDEBUG -O -g -Wall   sim-profile.o main.o syscall.o memory.o regs.o loader.o endian.o dlite.o symbol.o eval.o options.o stats.o eio.o range.o misc.o machine.o libexo/libexo.a `./sysprobe -libs` -lm
Don't worry about the output of "./sysprobe -libs". The output of "./sysprobe -flags" would look something like this (this will vary depending on the processor you have):

Code:
-DBYTES_LITTLE_ENDIAN -DWORDS_LITTLE_ENDIAN -DFAST_SRL -DFAST_SRA -DGZIP_PATH="/bin/gzip"
However, the sysprobe will not affect the linking. The main thing to check is whether the link line is correct, and whether all of the '.o' files were built by the makefile. The 'options.o' file is the one that contains the symbols you are missing.
 
Old 09-04-2009, 07:43 AM   #3
Shyami86
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hi.. I have an Ubuntu 8.04... I compiled using the command

/home/surya/simplescalar/bin/sslittle-na-sstrix-gcc -o simprop sim-profile.c

But I got only the lines I mentioned in the previous post.. I didn't get the first code you mentioned. The sysprobe -flags gave the same output as you mentioned in the second code.

Now I tried compiling using:
gcc -o simprop `./sysprobe -flags` -DDEBUG -O -g -Wall sim-profile.o main.o syscall.o memory.o regs.o loader.o endian.o dlite.o symbol.o eval.o options.o stats.o eio.o range.o misc.o machine.o libexo/libexo.a `./sysprobe -libs` -lm

I don't get any errors.. But I don't think it's really compiling sim-profile.c! Coz i added some junk lines into the program and ran the command and it still doesn't show any errors!? What doea that command actually mean!?
I get errors when I try using the sslittle-na-sstrix-gcc in /home/surya/simplescalar/bin for compilation!I have all those object files..

Can u do me a favor? Do you have a perfectly working version of the simplescalar toolset? Would you mind mentioning the urls from where you picked up the simplesim,tools,utilities and the steps for installation and also the errors you rectified on your way to successful installation of the tool? It's too much but I'm a newbie not jus to the forum but to C and Linux!! Kindly help.. Thank you..

Last edited by Shyami86; 09-04-2009 at 08:01 AM. Reason: added info
 
Old 09-04-2009, 08:54 AM   #4
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Okay, a few basics about compilation.

The steps for compiling a C language project are these:

1. Compile the C source code (.c files) into relocatable object binary files (.o files).
2. Link these relocatable object binary files together to give an executable.

The line I gave you was the second stage (from the makefile). The reason that the junk lines have no effect is that it is using the object file you already had from earlier (ie, it is not recompiling the source code, merely linking the object files together).

You can sometimes do both steps in one just by running gcc on the source file. However, this only works if the source file contains the entire codebase for the project (which is not true in this case).

The other important concept is the makefile. Make is a program to automate the compilation process, by checking files that have changed and recompiling/linking as appropriate. It uses an instruction file called the 'makefile'.

The sim-profile program you are building is a complex one, consisting of many source files. So it already has a makefile. You build the program by running the make command, as detailed in the instructions you were given:

Code:
Building the simulators
Un-pack the simulator package.
$ cd $IDIR
$ tar xvfz simplesim-3v0d-with-cheetah.tar.gz
$ cd simplesim-3.0
$ make config-pisa
$ make
This make command will run the many gcc commands that are required to build the executables.

Just follow the steps in the installation instructions. Most of this is not Linux specific, it would be the same working with C programs on any platform.

When you come to trying out the sslittle-na-sstrix-gcc compiler, you are testing it on a small C program (eg the hello world that is in the instructions). If you want to try it on more complex programs (with multiple source files), you will need to understand the two stages of the compilation process.

Last edited by neonsignal; 09-04-2009 at 09:06 AM.
 
Old 09-05-2009, 12:18 AM   #5
Shyami86
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hey.. it was definitely a revelation... I really understood what to do now! Thanks a lot for your help....
Great that you found my post :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
undefined reference to `yywrap' compiling PAM Mahonri Debian 5 12-30-2011 06:00 PM
PGPlot in 'C' compiling: undefined reference to `MAIN_` (ubuntu 8.10) SuperNomad Programming 3 02-28-2009 12:33 PM
Undefined errno reference while compiling loadable module kesher Linux - Software 3 04-10-2006 01:22 AM
Undefined reference to WxGtk libraries when compiling Xchm Darwish Linux - Software 0 09-03-2005 11:11 PM
undefined reference to `cfb_fillrect' and more when compiling kernel KR-data Linux - Software 0 09-03-2005 01:56 PM

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

All times are GMT -5. The time now is 04:30 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