Slang browsing enabled for Squeak trunk images

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Slang browsing enabled for Squeak trunk images

David T. Lewis
 
If you are using a Squeak trunk image and have VMMaker loaded, you can
evaluate "VMMaker updateFromServer; initialize". Then open an inspector
on e.g. ObjectMemory or FilePlugin, click the "source" button on the
browser, and select "translate to C" or "translate inlined C".
The translated C code for each method is displayed interactively.
 
Dave

Reply | Threaded
Open this post in threaded view
|

Something wrong while compiling VM

CdAB63
 
Hello,

Today I was preparing a new VM from svn sources (trunk) but then, the
following happened:

gcc -g -O2 -fomit-frame-pointer -DLSB_FIRST=1 -DHAVE_CONFIG_H
-DSQUEAK_BUILTIN_PLUGIN
-I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/bld
-I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/vm
-I/home/casimiro/Softwares/squeak/squeak-svn/platforms/Cross/vm
-I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm -c -o
ADPCMCodecPlugin.o
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:72:
error: expected declaration specifiers or ‘...’ before ‘*’ token
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:72:
error: ‘sqInt’ redeclared as different kind of symbol
/home/casimiro/Softwares/squeak/squeak-svn/platforms/Cross/vm/sqMemoryAccess.h:52:
note: previous declaration of ‘sqInt’ was here
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:73:
error: expected declaration specifiers or ‘...’ before ‘(’ token
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:74:
error: expected declaration specifiers or ‘...’ before ‘(’ token
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:75:
error: expected declaration specifiers or ‘...’ before ‘(’ token
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:80:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘halt’

Reply | Threaded
Open this post in threaded view
|

Re: Something wrong while compiling VM

Eliot Miranda-2
 
and what is line 72?

On Thu, Dec 10, 2009 at 6:10 AM, Casimiro de Almeida Barreto <[hidden email]> wrote:

Hello,

Today I was preparing a new VM from svn sources (trunk) but then, the following happened:

gcc -g -O2 -fomit-frame-pointer -DLSB_FIRST=1 -DHAVE_CONFIG_H -DSQUEAK_BUILTIN_PLUGIN -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/bld -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/vm -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/Cross/vm -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm -c -o ADPCMCodecPlugin.o /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:72: error: expected declaration specifiers or ‘...’ before ‘*’ token
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:72: error: ‘sqInt’ redeclared as different kind of symbol
/home/casimiro/Softwares/squeak/squeak-svn/platforms/Cross/vm/sqMemoryAccess.h:52: note: previous declaration of ‘sqInt’ was here
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:73: error: expected declaration specifiers or ‘...’ before ‘(’ token
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:74: error: expected declaration specifiers or ‘...’ before ‘(’ token
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:75: error: expected declaration specifiers or ‘...’ before ‘(’ token
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:80: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘halt’


Reply | Threaded
Open this post in threaded view
|

Re: Something wrong while compiling VM

David T. Lewis
In reply to this post by CdAB63
 
On Thu, Dec 10, 2009 at 12:10:27PM -0200, Casimiro de Almeida Barreto wrote:

>
> Hello,
>
> Today I was preparing a new VM from svn sources (trunk) but then, the
> following happened:
>
> gcc -g -O2 -fomit-frame-pointer -DLSB_FIRST=1 -DHAVE_CONFIG_H
> -DSQUEAK_BUILTIN_PLUGIN
> -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/bld
> -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/vm
> -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/Cross/vm
> -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm -c -o
> ADPCMCodecPlugin.o
> /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
> /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:72:
> error: expected declaration specifiers or ?...? before ?*? token

Are you are using the new ../platforms/unix/cmake/configure script rather
than ../platforms/unix/config/configure? If you use the old configure script
you will get lots of entertaining error messages.

Dave


Reply | Threaded
Open this post in threaded view
|

Re: Something wrong while compiling VM

CdAB63
In reply to this post by Eliot Miranda-2
 
Em 10-12-2009 15:40, Eliot Miranda escreveu:
>  
>
>
> and what is line 72?
Starting on line 71:

/*** Function Prototypes ***/
static sqInt byteAt(sqInt oop);
static sqInt byteAtput(sqInt oop, int val);
static sqInt byteAtPointer(char * ptr);
static sqInt byteAtPointerput(char * ptr, int val);
static VirtualMachine * getInterpreter(void);
#pragma export on
EXPORT(const char*) getModuleName(void);
#pragma export off
static sqInt halt(void);
static sqInt intAt(sqInt oop);
static sqInt intAtput(sqInt oop, int val);
static sqInt intAtPointer(char * ptr);
static sqInt intAtPointerput(char * ptr, unsigned int val);
static sqInt long32At(sqInt ptr);
static sqInt long32Atput(sqInt ptr, int val);
static sqInt longAt(sqInt oop);
static sqInt longAtput(sqInt oop, sqInt val);
static sqInt longAtPointer(char * ptr);
static sqInt longAtPointerput(char * ptr, sqInt val);
static sqInt msg(char * s);
static sqInt oopAt(sqInt oop);
static sqInt oopAtput(sqInt oop, sqInt val);
static sqInt oopAtPointer(char * ptr);
static sqInt oopAtPointerput(char * ptr, sqInt val);
static usqInt oopForPointer(char * ptr);
static char * pointerForOop(usqInt oop);
#pragma export on
EXPORT(sqInt) primitiveDecodeMono(void);
EXPORT(sqInt) primitiveDecodeStereo(void);
EXPORT(sqInt) primitiveEncodeMono(void);
EXPORT(sqInt) primitiveEncodeStereo(void);
EXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter);
#pragma export off
static sqInt shortAt(sqInt oop);
static sqInt shortAtput(sqInt oop, int val);
static sqInt shortAtPointer(char * ptr);
static sqInt shortAtPointerput(char * ptr, int val);
static sqInt shortUnsignedAtPointer(char * ptr);
static char * sqMemoryBaseAddress(void);

>
> On Thu, Dec 10, 2009 at 6:10 AM, Casimiro de Almeida Barreto
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>
>     Hello,
>
>     Today I was preparing a new VM from svn sources (trunk) but then,
>     the following happened:
>
>     gcc -g -O2 -fomit-frame-pointer -DLSB_FIRST=1 -DHAVE_CONFIG_H
>     -DSQUEAK_BUILTIN_PLUGIN
>     -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/bld
>     -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/vm
>     -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/Cross/vm
>     -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm
>     -c -o ADPCMCodecPlugin.o
>     /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
>     /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:72:
>     error: expected declaration specifiers or ‘...’ before ‘*’ token
>     /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:72:
>     error: ‘sqInt’ redeclared as different kind of symbol
>     /home/casimiro/Softwares/squeak/squeak-svn/platforms/Cross/vm/sqMemoryAccess.h:52:
>     note: previous declaration of ‘sqInt’ was here
>     /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:73:
>     error: expected declaration specifiers or ‘...’ before ‘(’ token
>     /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:74:
>     error: expected declaration specifiers or ‘...’ before ‘(’ token
>     /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:75:
>     error: expected declaration specifiers or ‘...’ before ‘(’ token
>     /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:80:
>     error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘halt’
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Something wrong while compiling VM

CdAB63
In reply to this post by Eliot Miranda-2
 
Em 10-12-2009 15:40, Eliot Miranda escreveu:
 


and what is line 72?

On Thu, Dec 10, 2009 at 6:10 AM, Casimiro de Almeida Barreto <[hidden email]> wrote:

Hello,

Today I was preparing a new VM from svn sources (trunk) but then, the following happened:

gcc -g -O2 -fomit-frame-pointer -DLSB_FIRST=1 -DHAVE_CONFIG_H -DSQUEAK_BUILTIN_PLUGIN -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/bld -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/vm -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/Cross/vm -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm -c -o ADPCMCodecPlugin.o /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:72: error: expected declaration specifiers or ‘...’ before ‘*’ token
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:72: error: ‘sqInt’ redeclared as different kind of symbol

But perhaps the trouble is conflict between current sqInt and sqInt declared in platforms/Cross//vm/sqMemoryAccess.h

/home/casimiro/Softwares/squeak/squeak-svn/platforms/Cross/vm/sqMemoryAccess.h:52: note: previous declaration of ‘sqInt’ was here
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:73: error: expected declaration specifiers or ‘...’ before ‘(’ token
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:74: error: expected declaration specifiers or ‘...’ before ‘(’ token
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:75: error: expected declaration specifiers or ‘...’ before ‘(’ token
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:80: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘halt’



Reply | Threaded
Open this post in threaded view
|

Re: Something wrong while compiling VM

CdAB63
In reply to this post by David T. Lewis
 
Em 10-12-2009 16:47, David T. Lewis escreveu:

>
> On Thu, Dec 10, 2009 at 12:10:27PM -0200, Casimiro de Almeida Barreto wrote:
>    
>> Hello,
>>
>> Today I was preparing a new VM from svn sources (trunk) but then, the
>> following happened:
>>
>> gcc -g -O2 -fomit-frame-pointer -DLSB_FIRST=1 -DHAVE_CONFIG_H
>> -DSQUEAK_BUILTIN_PLUGIN
>> -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/bld
>> -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/vm
>> -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/Cross/vm
>> -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm -c -o
>> ADPCMCodecPlugin.o
>> /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
>> /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:72:
>> error: expected declaration specifiers or ?...? before ?*? token
>>      
> Are you are using the new ../platforms/unix/cmake/configure script rather
> than ../platforms/unix/config/configure? If you use the old configure script
> you will get lots of entertaining error messages.
>    
Oops... I was using platforms/unix/config/configure...
> Dave
>
>
>
>    

Reply | Threaded
Open this post in threaded view
|

Re: Something wrong while compiling VM

CdAB63
In reply to this post by David T. Lewis
 
Em 10-12-2009 16:47, David T. Lewis escreveu:

>
> On Thu, Dec 10, 2009 at 12:10:27PM -0200, Casimiro de Almeida Barreto wrote:
>    
>> Hello,
>>
>> Today I was preparing a new VM from svn sources (trunk) but then, the
>> following happened:
>>
>> gcc -g -O2 -fomit-frame-pointer -DLSB_FIRST=1 -DHAVE_CONFIG_H
>> -DSQUEAK_BUILTIN_PLUGIN
>> -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/bld
>> -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/vm
>> -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/Cross/vm
>> -I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm -c -o
>> ADPCMCodecPlugin.o
>> /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
>> /home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:72:
>> error: expected declaration specifiers or ?...? before ?*? token
>>      
> Are you are using the new ../platforms/unix/cmake/configure script rather
> than ../platforms/unix/config/configure? If you use the old configure script
> you will get lots of entertaining error messages.
>
> Dave
>
>
>
>    
Ok,

I tried with the cmake but still have problems with sqInt being redefined...

Best regards,

CdAB
Reply | Threaded
Open this post in threaded view
|

Re: Something wrong while compiling VM

David T. Lewis
 
On Thu, Dec 10, 2009 at 08:11:44PM -0200, Casimiro de Almeida Barreto wrote:

>
> Em 10-12-2009 16:47, David T. Lewis escreveu:
> >
> >Are you are using the new ../platforms/unix/cmake/configure script rather
> >than ../platforms/unix/config/configure? If you use the old configure
> >script
> >you will get lots of entertaining error messages.
>
> Ok,
>
> I tried with the cmake but still have problems with sqInt being redefined...

The only other thing I can suggest is to start with a completely empty
build directory before you run configure, and then make sure that you
are specifying the right source directory (--src= option to the configure
script). I have found cases where my build directory gets messed up, and
if I just delete everything and start fresh it works fine.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: Something wrong while compiling VM

Eliot Miranda-2
In reply to this post by CdAB63
 
Casimiro,

    don't know if this is news to you but you can use -P or -E as arguments to the compiler to get it to write the pre-processed output to either foo.i (-P) or stdout (-E).  Then you can find out which include files are pulled in, etc, and get more info on the problem.

HTH
Eliot

On Thu, Dec 10, 2009 at 2:11 PM, Casimiro de Almeida Barreto <[hidden email]> wrote:

Em 10-12-2009 16:47, David T. Lewis escreveu:

On Thu, Dec 10, 2009 at 12:10:27PM -0200, Casimiro de Almeida Barreto wrote:
 
Hello,

Today I was preparing a new VM from svn sources (trunk) but then, the
following happened:

gcc -g -O2 -fomit-frame-pointer -DLSB_FIRST=1 -DHAVE_CONFIG_H
-DSQUEAK_BUILTIN_PLUGIN
-I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/bld
-I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/vm
-I/home/casimiro/Softwares/squeak/squeak-svn/platforms/Cross/vm
-I/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm -c -o
ADPCMCodecPlugin.o
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
/home/casimiro/Softwares/squeak/squeak-svn/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c:72:
error: expected declaration specifiers or ?...? before ?*? token
   
Are you are using the new ../platforms/unix/cmake/configure script rather
than ../platforms/unix/config/configure? If you use the old configure script
you will get lots of entertaining error messages.

Dave



 
Ok,

I tried with the cmake but still have problems with sqInt being redefined...

Best regards,

CdAB

Reply | Threaded
Open this post in threaded view
|

Re: Something wrong while compiling VM

CdAB63
 
Em 10-12-2009 21:42, Eliot Miranda escreveu:
 


Casimiro,

    don't know if this is news to you but you can use -P or -E as arguments to the compiler to get it to write the pre-processed output to either foo.i (-P) or stdout (-E).  Then you can find out which include files are pulled in, etc, and get more info on the problem.
No news here.

But I forgot something really important. The plugins were created through VMMaker to a directory & then they're made to substitute plugins at ~/Softwares/squeak/platforms/unix/vm/src


HTH
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Something wrong while compiling VM

David T. Lewis
 
On Thu, Dec 10, 2009 at 10:21:06PM -0200, Casimiro de Almeida Barreto wrote:
>
> But I forgot something really important. The plugins were created
> through VMMaker to a directory & then they're made to substitute plugins
> at ~/Softwares/squeak/platforms/unix/vm/src

This may be cause of your problem. Do not use the source files in
platforms/unix/vm/src. If you are building your own plugin or changing
the configuration of plugins being built, then it is better to use VMMaker
to generate all of the source files into a clean directory. Then when you
run configure, you can use the "--src= " command line option to specify
the new source directory. When you run make, it will compile your freshly
generated source files rather than mixing your newly generated plugin
source with the older source and header files in platforms/unix/vm/src.

You can think of the generated source files as transient files, like the
*.o files produced by a C compiler. The files in the platforms/unix/vm/src/
directory are a snapshot of the generated source files that were used for
the last official VM build. But if you are building a VM yourself, it is
usually best to just generate your own source files into a clean directory.
This will ensure that the generated header and source files are consistent,
and and also that that all of your source files were generated by the same
version of VMMaker.

Dave