Machine SUIF build problem

View: New views
4 Messages — Rating Filter:   Alert me  

Machine SUIF build problem

by Soumyaroop Roy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello there,

I am trying to install machine suif on debian linux but I am stuck
with a build problem. I probed into the problem and realized that the
problem lies in the generation of machine_ir.h file from the hoof
specification machine_ir.hoof. For the definition of the class
"InstrList", it generates the following (lines 71-75):
------------------------
  private:
    suif_list<Instr* > _instrs;
    public:
        list<Instr*>& instrs() { return _instrs; }
        InstrList* to_instr_list();
------------------------
whereas, I suppose, it should generate:
------------------------
  private:
    list<Instr* > _instrs; // list instead of suif_list
    public:
        list<Instr*>& instrs() { return _instrs; }
        InstrList* to_instr_list();
------------------------

Since the templates suif_list and list are visible in a mutually
exclusive manner, the above results in compile errors. I am using gcc
2.95.4 following the discussion in this thread:
http://suif.stanford.edu/pipermail/suif-talk/2003-February/001252.html

I would appreciate it if somebody could give me tips to fix this
gracefully. Could there be a problem with my SUIF (basesuif 2.2)
installation (the "smgn" binary)?

regards,
Soumyaroop.

--
Soumyaroop Roy
Ph.D. Student
Department of Computer Science and Engineering
University of South Florida, Tampa
http://www.csee.usf.edu/~sroy

"If you haven't pissed off anybody, you haven't taken a decision" -
Lavi Lev, Former Ex. VP of Cadence Design Systems
_______________________________________________
To unsubscribe, send mail to suif-talk-unsubscribe@...
or visit http://suif.stanford.edu/mailman/listinfo/suif-talk

Re: Machine SUIF build problem

by Richard Pennington :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

soumyaroop roy wrote:

> Hello there,
>
> I am trying to install machine suif on debian linux but I am stuck
> with a build problem. I probed into the problem and realized that the
> problem lies in the generation of machine_ir.h file from the hoof
> specification machine_ir.hoof. For the definition of the class
> "InstrList", it generates the following (lines 71-75):
> ------------------------
>   private:
>     suif_list<Instr* > _instrs;
>     public:
>         list<Instr*>& instrs() { return _instrs; }
>         InstrList* to_instr_list();
> ------------------------
> whereas, I suppose, it should generate:
> ------------------------
>   private:
>     list<Instr* > _instrs; // list instead of suif_list
>     public:
>         list<Instr*>& instrs() { return _instrs; }
>         InstrList* to_instr_list();
> ------------------------
>
> Since the templates suif_list and list are visible in a mutually
> exclusive manner, the above results in compile errors. I am using gcc
> 2.95.4 following the discussion in this thread:
> http://suif.stanford.edu/pipermail/suif-talk/2003-February/001252.html
>
> I would appreciate it if somebody could give me tips to fix this
> gracefully. Could there be a problem with my SUIF (basesuif 2.2)
> installation (the "smgn" binary)?
>
> regards,
> Soumyaroop.
>
I have no idea why you have suif_list instead of list in your header
file. In my build, I have list in both places. My .hoof file (and the
.nw version) both have list as well.

I grep'd through my sources and could find nothing that looked like
suif_list, except as the name of a header file.

I'm building under Fedora with gcc 4.1.1.

To build, I followed the instructions here:
http://mail.ustc.edu.cn/~jsji/research/tools/SUIF2.html

So far, I've had good success: I've modified create_suif_hello_world a
little bit and was able to run the result (with the x86 code generator):
[~/test] ms% ls
create_suif_hello_world.cpp  dependencies                 machdriver*
                Makefile
create_suif_hello_world.o    hello_world.o                main.c
                Makefile.deps
[~/test] ms% create_suif_hello_world
[
     {FileSetBlock}[
  ... snipped
[~/test] ms% ./machdriver
Warning in padding.cpp(419)[transforms]
Warning: Skipping StructPaddingPass because Target Info Block is unavailable
[~/test] ms% ./hello_world
hello world[~/test] ms%

I had to make a couple of small changes to Machine SUIF because of the
missing target information block, but it worked.

-Rich
_______________________________________________
To unsubscribe, send mail to suif-talk-unsubscribe@...
or visit http://suif.stanford.edu/mailman/listinfo/suif-talk

Re: Machine SUIF build problem

by Soumyaroop Roy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Richard,

Thank you for pointing me to the SUIF and MachineSUIF installation
instructions page. The built process went quite smoothly on my debian
GNU/Linux (Ubuntu) system with gcc 4.1.1. This also fixes one of my
earlier build problems when I was trying with gcc 2.95.4:
http://www.nabble.com/suif-2-installation-problem---eh_frame-p13601271.html

Hopefully, this thread will be helpful to future SUIF/Machine SUIF users.

God bless both of you (i.e., you and Jinsong Ji, who made the
instructions page)!

regards,
Soumyaroop.

On Nov 24, 2007 5:00 AM, Richard Pennington <rich@...> wrote:

>
> soumyaroop roy wrote:
> > Hello there,
> >
> > I am trying to install machine suif on debian linux but I am stuck
> > with a build problem. I probed into the problem and realized that the
> > problem lies in the generation of machine_ir.h file from the hoof
> > specification machine_ir.hoof. For the definition of the class
> > "InstrList", it generates the following (lines 71-75):
> > ------------------------
> >   private:
> >     suif_list<Instr* > _instrs;
> >     public:
> >         list<Instr*>& instrs() { return _instrs; }
> >         InstrList* to_instr_list();
> > ------------------------
> > whereas, I suppose, it should generate:
> > ------------------------
> >   private:
> >     list<Instr* > _instrs; // list instead of suif_list
> >     public:
> >         list<Instr*>& instrs() { return _instrs; }
> >         InstrList* to_instr_list();
> > ------------------------
> >
> > Since the templates suif_list and list are visible in a mutually
> > exclusive manner, the above results in compile errors. I am using gcc
> > 2.95.4 following the discussion in this thread:
> > http://suif.stanford.edu/pipermail/suif-talk/2003-February/001252.html
> >
> > I would appreciate it if somebody could give me tips to fix this
> > gracefully. Could there be a problem with my SUIF (basesuif 2.2)
> > installation (the "smgn" binary)?
> >
> > regards,
> > Soumyaroop.
> >
> I have no idea why you have suif_list instead of list in your header
> file. In my build, I have list in both places. My .hoof file (and the
> .nw version) both have list as well.
>
> I grep'd through my sources and could find nothing that looked like
> suif_list, except as the name of a header file.
>
> I'm building under Fedora with gcc 4.1.1.
>
> To build, I followed the instructions here:
> http://mail.ustc.edu.cn/~jsji/research/tools/SUIF2.html
>
> So far, I've had good success: I've modified create_suif_hello_world a
> little bit and was able to run the result (with the x86 code generator):
> [~/test] ms% ls
> create_suif_hello_world.cpp  dependencies                 machdriver*
>                 Makefile
> create_suif_hello_world.o    hello_world.o                main.c
>                 Makefile.deps
> [~/test] ms% create_suif_hello_world
> [
>      {FileSetBlock}[
>   ... snipped
> [~/test] ms% ./machdriver
> Warning in padding.cpp(419)[transforms]
> Warning: Skipping StructPaddingPass because Target Info Block is unavailable
> [~/test] ms% ./hello_world
> hello world[~/test] ms%
>
> I had to make a couple of small changes to Machine SUIF because of the
> missing target information block, but it worked.
>
> -Rich
>



--
Soumyaroop Roy
Ph.D. Student
Department of Computer Science and Engineering
University of South Florida, Tampa
http://www.csee.usf.edu/~sroy

"If you haven't pissed off anybody, you haven't taken a decision" -
Lavi Lev, Former Ex. VP of Cadence Design Systems
_______________________________________________
To unsubscribe, send mail to suif-talk-unsubscribe@...
or visit http://suif.stanford.edu/mailman/listinfo/suif-talk

Parent Message unknown Re: Machine SUIF build problem

by Richard Pennington :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

soumyaroop roy wrote:

> Hi Richard,
>
> I am running into another problem now. When I run the c2suif script,
> it gives me the error:
> suifint: undefined symbol: __7LStringPCc
>
> I looked up the suif forum archive -
> http://suif.stanford.edu/pipermail/suif-talk/2003-December/001541.html,
> which indicates that the problem is with the gcc compiler version.
>
> Did you happen to face this problem? Correction to my last email: I am
> using gcc 4.1.3.
>
> Soumyaroop.
>

Hi Soumyaroop,

Sorry to have misled you. I should have been more clear about the c2suif
part.

When I first started looking at SUIF as a compiler back-end, I saw three
huge show stoppers:

1. It compiled only with a very old version of gcc (2.X).
2. No one seemed to be doing active development. (The email in the forum
that you link to is from 2003, 4 years ago!)
3. It relied on a proprietary C front end that was available only in
binary form and was also built with the older version of gcc.

I almost gave up on SUIF, but I then found the patch that allowed it to
compile with gcc 4.X. I thought it might be worthwhile to investigate
further.

As I mentioned in my previous email, I started with
create_suif_hello_world.cpp to see if I could at least get something
working with SUIF and Machine SUIF. I was able to compile and execute
the SUIF file created by create_suif_hello_world.cpp after making a few
small modifications to it and to Machine SUIF.

This was a very small step.

I have not tried to use c2suif, because I didn't want to be tied to the
old version of gcc and the proprietary C compiler it used. Instead, I'm
looking at the feasibility of using a different C/C++ front end to
generate SUIF files. I'm trying to use Elsa
http://www.cs.berkeley.edu/~smcpeak/elkhound/

I've only been looking at combining SUIF and Elsa (maybe call it Elsif?)
for about two weeks now and have had a steep learning curve since both
packages are huge and completely unrelated. I think that it will be very
possible to use Elsa as a SUIF front end and I hope to have it
generating real SUIF (for a subset of C) later this week.

There is a lot of work to do to get Elsa fully up to speed with SUIF and
I have limited time (real job, 2 year old son, etc.) so progress will
probably be slow.

-Rich

> On Nov 24, 2007 10:09 AM, soumyaroop roy <sroy@...> wrote:
>> Hello Richard,
>>
>> Thank you for pointing me to the SUIF and MachineSUIF installation
>> instructions page. The built process went quite smoothly on my debian
>> GNU/Linux (Ubuntu) system with gcc 4.1.1. This also fixes one of my
>> earlier build problems when I was trying with gcc 2.95.4:
>> http://www.nabble.com/suif-2-installation-problem---eh_frame-p13601271.html
>>
>> Hopefully, this thread will be helpful to future SUIF/Machine SUIF users.
>>
>> God bless both of you (i.e., you and Jinsong Ji, who made the
>> instructions page)!
>>
>> regards,
>> Soumyaroop.
>>
>>
>> On Nov 24, 2007 5:00 AM, Richard Pennington <rich@...> wrote:
>>> soumyaroop roy wrote:
>>>> Hello there,
>>>>
>>>> I am trying to install machine suif on debian linux but I am stuck
>>>> with a build problem. I probed into the problem and realized that the
>>>> problem lies in the generation of machine_ir.h file from the hoof
>>>> specification machine_ir.hoof. For the definition of the class
>>>> "InstrList", it generates the following (lines 71-75):
>>>> ------------------------
>>>>   private:
>>>>     suif_list<Instr* > _instrs;
>>>>     public:
>>>>         list<Instr*>& instrs() { return _instrs; }
>>>>         InstrList* to_instr_list();
>>>> ------------------------
>>>> whereas, I suppose, it should generate:
>>>> ------------------------
>>>>   private:
>>>>     list<Instr* > _instrs; // list instead of suif_list
>>>>     public:
>>>>         list<Instr*>& instrs() { return _instrs; }
>>>>         InstrList* to_instr_list();
>>>> ------------------------
>>>>
>>>> Since the templates suif_list and list are visible in a mutually
>>>> exclusive manner, the above results in compile errors. I am using gcc
>>>> 2.95.4 following the discussion in this thread:
>>>> http://suif.stanford.edu/pipermail/suif-talk/2003-February/001252.html
>>>>
>>>> I would appreciate it if somebody could give me tips to fix this
>>>> gracefully. Could there be a problem with my SUIF (basesuif 2.2)
>>>> installation (the "smgn" binary)?
>>>>
>>>> regards,
>>>> Soumyaroop.
>>>>
>>> I have no idea why you have suif_list instead of list in your header
>>> file. In my build, I have list in both places. My .hoof file (and the
>>> .nw version) both have list as well.
>>>
>>> I grep'd through my sources and could find nothing that looked like
>>> suif_list, except as the name of a header file.
>>>
>>> I'm building under Fedora with gcc 4.1.1.
>>>
>>> To build, I followed the instructions here:
>>> http://mail.ustc.edu.cn/~jsji/research/tools/SUIF2.html
>>>
>>> So far, I've had good success: I've modified create_suif_hello_world a
>>> little bit and was able to run the result (with the x86 code generator):
>>> [~/test] ms% ls
>>> create_suif_hello_world.cpp  dependencies                 machdriver*
>>>                 Makefile
>>> create_suif_hello_world.o    hello_world.o                main.c
>>>                 Makefile.deps
>>> [~/test] ms% create_suif_hello_world
>>> [
>>>      {FileSetBlock}[
>>>   ... snipped
>>> [~/test] ms% ./machdriver
>>> Warning in padding.cpp(419)[transforms]
>>> Warning: Skipping StructPaddingPass because Target Info Block is unavailable
>>> [~/test] ms% ./hello_world
>>> hello world[~/test] ms%
>>>
>>> I had to make a couple of small changes to Machine SUIF because of the
>>> missing target information block, but it worked.
>>>
>>> -Rich
>>>
>>
>>
>>
>> --
>> Soumyaroop Roy
>> Ph.D. Student
>> Department of Computer Science and Engineering
>> University of South Florida, Tampa
>> http://www.csee.usf.edu/~sroy
>>
>> "If you haven't pissed off anybody, you haven't taken a decision" -
>> Lavi Lev, Former Ex. VP of Cadence Design Systems
>>
>
>
>

_______________________________________________
To unsubscribe, send mail to suif-talk-unsubscribe@...
or visit http://suif.stanford.edu/mailman/listinfo/suif-talk
LightInTheBox - Buy quality products at wholesale price!