Gnuification fails when compiling unix VM with latest VMMaker source

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

Gnuification fails when compiling unix VM with latest VMMaker source

Adrian Lienhard

Hi all,

I'm trying to build a unix VM (on OSX) with the latest trunk (r2148) and the latest VMMaker version (VMMaker-dtl.156) but apparently the gnuification fails:

[ 80%] Building C object CMakeFiles/squeakvm.dir/gnu-interp.c.o
/Users/adrian/Desktop/vmbuilding/platforms/build/gnu-interp.c:6:2: error: #error GNUIFICATION FAILED ( 0 )
make[2]: *** [CMakeFiles/squeakvm.dir/gnu-interp.c.o] Error 1
make[1]: *** [CMakeFiles/squeakvm.dir/all] Error 2
make: *** [all] Error 2

When compiling with r2135, in which no gnuification is done, it works. From the above error output I have no clue as to what went wrong.

To narrow down the problem I went to http://www.squeakvm.org/unix/ and downloaded the VMMaker image that Ian uses for the unix builds. I can compile with the cmake configuration of r2148 and the source that this VMM produces. So I assume there is a source change in VMMaker-dtl.156 that is not compatible with gnuification. The only question is, which one? The VMM version found in this image is VMMaker-tpr.58 (this version is many years old!) with lots of uncommitted changes. Diffing against VMMaker-dtl.156 I get tons of changed methods so I'm kind of lost here too. Why is the maintained VMMaker package not used for unix VMs?

The following benchmarks show that gnuification makes a significant difference (MacBook Pro with 2.4Ghz, i686-apple-darwin10-gcc-4.2.1):

1 pre-compiled 3.11.3.2135 VM [1]: '248543689 bytecodes/sec; 8117987 sends/sec'
2 compiled from source r2135 '411244979 bytecodes/sec; 10560900 sends/sec'
3 VMMaker-dtl.156 compiled with cmake r2135: '313533374 bytecodes/sec; 11534330 sends/sec'

4 compiled from source r2148 '487619047 bytecodes/sec; 13257851 sends/sec'
5 provided VMMaker image [2] with r2148 '493256262 bytecodes/sec; 13200950 sends/sec'
6 VMMaker-dtl.156 compiled with r2148 ??? cannot compile...

[1] http://www.squeakvm.org/unix/release/Squeak-3.11.3.2135-src.tar.gz
[2] http://www.squeakvm.org/unix/release/unix-3.11.3.2135-vmm.tar.gz

1, 2, and 3 are compiled with the configuration of cmake from trunk revision 2135, hence without gnuification. 4 and 5 probably are from identical source: 4 from the svn trunk, the other, 5, generated through the VMM image provided by Ian.

Any help to make 6 work is very welcome!

Cheers,
Adrian

Reply | Threaded
Open this post in threaded view
|

Re: [Vm-dev] Gnuification fails when compiling unix VM with latest VMMaker source

Levente Uzonyi-2
 
On Tue, 26 Jan 2010, Adrian Lienhard wrote:

>
> Hi all,
>
> I'm trying to build a unix VM (on OSX) with the latest trunk (r2148) and the latest VMMaker version (VMMaker-dtl.156) but apparently the gnuification fails:
>
> [ 80%] Building C object CMakeFiles/squeakvm.dir/gnu-interp.c.o
> /Users/adrian/Desktop/vmbuilding/platforms/build/gnu-interp.c:6:2: error: #error GNUIFICATION FAILED ( 0 )
> make[2]: *** [CMakeFiles/squeakvm.dir/gnu-interp.c.o] Error 1
> make[1]: *** [CMakeFiles/squeakvm.dir/all] Error 2
> make: *** [all] Error 2
>
> When compiling with r2135, in which no gnuification is done, it works. From the above error output I have no clue as to what went wrong.
>
> To narrow down the problem I went to http://www.squeakvm.org/unix/ and downloaded the VMMaker image that Ian uses for the unix builds. I can compile with the cmake configuration of r2148 and the source that this VMM produces. So I assume there is a source change in VMMaker-dtl.156 that is not compatible with gnuification. The only question is, which one? The VMM version found in this image is VMMaker-tpr.58 (this version is many years old!) with lots of uncommitted changes. Diffing against VMMaker-dtl.156 I get tons of changed methods so I'm kind of lost here too. Why is the maintained VMMaker package not used for unix VMs?
>
> The following benchmarks show that gnuification makes a significant difference (MacBook Pro with 2.4Ghz, i686-apple-darwin10-gcc-4.2.1):
>
> 1 pre-compiled 3.11.3.2135 VM [1]: '248543689 bytecodes/sec; 8117987 sends/sec'
> 2 compiled from source r2135 '411244979 bytecodes/sec; 10560900 sends/sec'
> 3 VMMaker-dtl.156 compiled with cmake r2135: '313533374 bytecodes/sec; 11534330 sends/sec'
>
> 4 compiled from source r2148 '487619047 bytecodes/sec; 13257851 sends/sec'
> 5 provided VMMaker image [2] with r2148 '493256262 bytecodes/sec; 13200950 sends/sec'
> 6 VMMaker-dtl.156 compiled with r2148 ??? cannot compile...
>
> [1] http://www.squeakvm.org/unix/release/Squeak-3.11.3.2135-src.tar.gz
> [2] http://www.squeakvm.org/unix/release/unix-3.11.3.2135-vmm.tar.gz
>
> 1, 2, and 3 are compiled with the configuration of cmake from trunk revision 2135, hence without gnuification. 4 and 5 probably are from identical source: 4 from the svn trunk, the other, 5, generated through the VMM image provided by Ian.
>
> Any help to make 6 work is very welcome!

It works on linux. If you don't have gawk, install it. There may be issues
with other awks.


Levente

>
> Cheers,
> Adrian
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [Vm-dev] Gnuification fails when compiling unix VM with latest VMMaker source

Adrian Lienhard

On Jan 26, 2010, at 12:24 , Levente Uzonyi wrote:

> It works on linux. If you don't have gawk, install it. There may be issues with other awks.

I have GNU Awk 3.1.5 installed. I don't think its a setup problem because I can compile the source produced by Ian's VMMaker image.

So, you are saying that you can successfully compile with source produced by VMMaker-dtl.156 and cmake configuration from subversion trunk revision 2148?

Adrian
Reply | Threaded
Open this post in threaded view
|

Re: [Vm-dev] Gnuification fails when compiling unix VM with latest VMMaker source

David T. Lewis
In reply to this post by Adrian Lienhard
 
On Tue, Jan 26, 2010 at 12:07:54PM +0100, Adrian Lienhard wrote:

>
> Hi all,
>
> I'm trying to build a unix VM (on OSX) with the latest trunk (r2148) and the latest VMMaker version (VMMaker-dtl.156) but apparently the gnuification fails:
>
> [ 80%] Building C object CMakeFiles/squeakvm.dir/gnu-interp.c.o
> /Users/adrian/Desktop/vmbuilding/platforms/build/gnu-interp.c:6:2: error: #error GNUIFICATION FAILED ( 0 )
> make[2]: *** [CMakeFiles/squeakvm.dir/gnu-interp.c.o] Error 1
> make[1]: *** [CMakeFiles/squeakvm.dir/all] Error 2
> make: *** [all] Error 2
>
> When compiling with r2135, in which no gnuification is done, it works. From the above error output I have no clue as to what went wrong.
>
> To narrow down the problem I went to http://www.squeakvm.org/unix/ and downloaded the VMMaker image that Ian uses for the unix builds. I can compile with the cmake configuration of r2148 and the source that this VMM produces. So I assume there is a source change in VMMaker-dtl.156 that is not compatible with gnuification. The only question is, which one? The VMM version found in this image is VMMaker-tpr.58 (this version is many years old!) with lots of uncommitted changes. Diffing against VMMaker-dtl.156 I get tons of changed methods so I'm kind of lost here too. Why is the maintained VMMaker package not used for unix VMs?
>
> The following benchmarks show that gnuification makes a significant difference (MacBook Pro with 2.4Ghz, i686-apple-darwin10-gcc-4.2.1):
>
> 1 pre-compiled 3.11.3.2135 VM [1]: '248543689 bytecodes/sec; 8117987 sends/sec'
> 2 compiled from source r2135 '411244979 bytecodes/sec; 10560900 sends/sec'
> 3 VMMaker-dtl.156 compiled with cmake r2135: '313533374 bytecodes/sec; 11534330 sends/sec'
>
> 4 compiled from source r2148 '487619047 bytecodes/sec; 13257851 sends/sec'
> 5 provided VMMaker image [2] with r2148 '493256262 bytecodes/sec; 13200950 sends/sec'
> 6 VMMaker-dtl.156 compiled with r2148 ??? cannot compile...
>
> [1] http://www.squeakvm.org/unix/release/Squeak-3.11.3.2135-src.tar.gz
> [2] http://www.squeakvm.org/unix/release/unix-3.11.3.2135-vmm.tar.gz
>
> 1, 2, and 3 are compiled with the configuration of cmake from trunk revision 2135, hence without gnuification. 4 and 5 probably are from identical source: 4 from the svn trunk, the other, 5, generated through the VMM image provided by Ian.
>
> Any help to make 6 work is very welcome!

Hi Adrian,

There is one issue with VMMaker-dtl.156 that I need to make you aware of.
It is temporarily out of sync with the Subversion sources, as we are in
the process of applying some patches to make SoundPlugin work on 64 bit
platforms.  You can back up to version VMMaker-dtl.155 if this is an issue.

I did not look at the image that you downloaded, but Ian definitely uses up
to date VMMaker versions, and VMMaker-tpr.58 is (as you noticed) very ancient.
So there must be some confusion here (I don't have time to check right now).

I don't have a Mac to check, but AFAIK the unix build should work fine on OS X.
A couple of things to double check:

- Make sure that you are using platforms/unix/cmake/configure, and not the
older platforms/unix/config/configure. I think there may be some documentation
issues here. The older configure no longer works, and might result in the
kind of problem you are seeing.

- Do the configure/make from a completely empty build directory. I'm not sure
that cmake figures out all of the dependencies properly, and I've found
that cleaning out the build directory and starting over is sometimes necessary.

- When you run configure, make sure that it specifies the correct source
directory. By default it will try to find the source files in platforms/unix/src
which is not what you want if you are building an up to date VM (I always
generate sources to a ../src32 directory outside of the ../platforms code).
Use the --src flag to specify source directory, and also look at the output
of "../platforms/unix/cmake/configure --help" for other options.

HTH,
Dave

Reply | Threaded
Open this post in threaded view
|

Re: [Vm-dev] Gnuification fails when compiling unix VM with latest VMMaker source

David T. Lewis
In reply to this post by Adrian Lienhard
 
On Tue, Jan 26, 2010 at 01:10:07PM +0100, Adrian Lienhard wrote:
>
> So, you are saying that you can successfully compile with source
> produced by VMMaker-dtl.156 and cmake configuration from subversion
> trunk revision 2148?
>

Yes this definitely should be working, except for SoundPlugin, which
is temporarily missing some patches for 64-bit. If you are including
SoundPlugin in the build, use VMMaker-dtl-155 until we get caught
up on the patches.

Dave
 
Reply | Threaded
Open this post in threaded view
|

Re: [Vm-dev] Gnuification fails when compiling unix VM with latest VMMaker source

Levente Uzonyi-2
In reply to this post by Adrian Lienhard
 
On Tue, 26 Jan 2010, Adrian Lienhard wrote:

>
> On Jan 26, 2010, at 12:24 , Levente Uzonyi wrote:
>
>> It works on linux. If you don't have gawk, install it. There may be issues with other awks.
>
> I have GNU Awk 3.1.5 installed. I don't think its a setup problem because I can compile the source produced by Ian's VMMaker image.

In this case try running the script by hand and see where it fails.

>
> So, you are saying that you can successfully compile with source produced by VMMaker-dtl.156 and cmake configuration from subversion trunk revision 2148?

Yes it works with 32-bit systems.


Levente

>
> Adrian
Reply | Threaded
Open this post in threaded view
|

Re: Gnuification fails when compiling unix VM with latest VMMaker source

Adrian Lienhard
In reply to this post by David T. Lewis

Thanks for the advice, David.

I finally managed to get back to this issue. Sorry for the late reply... I figured out what the problem with the gnuification is (in case somebody runs into the same problems):

The first problem I had was that gawk didn't properly work because I generated the C sources with VMMaker running on a unix VM that was set to MacRoman encoding and hence the interp.c had wrong linefeeds. Generating the sources from a Mac VM solved that problem.

The second issue was that the gawk output didn't compile because the jump table macros were all like "CASE(0)", i.e., the argument was not incremented. In cmake/gnuify.awk I commented out the line
        print " CASE(" (($NF) + 0) ")";
and commented in the line
        print " CASE(" $3 ")";
This solved the problem. Not sure why $NF doesn't work, though. Does this ring any bells? Apparently somebody else has had a problem with this since the code that works for me is already there but commented out.

Cheers,
Adrian

PS: I used r2151 and VMMaker-dtl.159

On Jan 26, 2010, at 13:26 , David T. Lewis wrote:

>
> On Tue, Jan 26, 2010 at 12:07:54PM +0100, Adrian Lienhard wrote:
>>
>> Hi all,
>>
>> I'm trying to build a unix VM (on OSX) with the latest trunk (r2148) and the latest VMMaker version (VMMaker-dtl.156) but apparently the gnuification fails:
>>
>> [ 80%] Building C object CMakeFiles/squeakvm.dir/gnu-interp.c.o
>> /Users/adrian/Desktop/vmbuilding/platforms/build/gnu-interp.c:6:2: error: #error GNUIFICATION FAILED ( 0 )
>> make[2]: *** [CMakeFiles/squeakvm.dir/gnu-interp.c.o] Error 1
>> make[1]: *** [CMakeFiles/squeakvm.dir/all] Error 2
>> make: *** [all] Error 2
>>
>> When compiling with r2135, in which no gnuification is done, it works. From the above error output I have no clue as to what went wrong.
>>
>> To narrow down the problem I went to http://www.squeakvm.org/unix/ and downloaded the VMMaker image that Ian uses for the unix builds. I can compile with the cmake configuration of r2148 and the source that this VMM produces. So I assume there is a source change in VMMaker-dtl.156 that is not compatible with gnuification. The only question is, which one? The VMM version found in this image is VMMaker-tpr.58 (this version is many years old!) with lots of uncommitted changes. Diffing against VMMaker-dtl.156 I get tons of changed methods so I'm kind of lost here too. Why is the maintained VMMaker package not used for unix VMs?
>>
>> The following benchmarks show that gnuification makes a significant difference (MacBook Pro with 2.4Ghz, i686-apple-darwin10-gcc-4.2.1):
>>
>> 1 pre-compiled 3.11.3.2135 VM [1]: '248543689 bytecodes/sec; 8117987 sends/sec'
>> 2 compiled from source r2135 '411244979 bytecodes/sec; 10560900 sends/sec'
>> 3 VMMaker-dtl.156 compiled with cmake r2135: '313533374 bytecodes/sec; 11534330 sends/sec'
>>
>> 4 compiled from source r2148 '487619047 bytecodes/sec; 13257851 sends/sec'
>> 5 provided VMMaker image [2] with r2148 '493256262 bytecodes/sec; 13200950 sends/sec'
>> 6 VMMaker-dtl.156 compiled with r2148 ??? cannot compile...
>>
>> [1] http://www.squeakvm.org/unix/release/Squeak-3.11.3.2135-src.tar.gz
>> [2] http://www.squeakvm.org/unix/release/unix-3.11.3.2135-vmm.tar.gz
>>
>> 1, 2, and 3 are compiled with the configuration of cmake from trunk revision 2135, hence without gnuification. 4 and 5 probably are from identical source: 4 from the svn trunk, the other, 5, generated through the VMM image provided by Ian.
>>
>> Any help to make 6 work is very welcome!
>
> Hi Adrian,
>
> There is one issue with VMMaker-dtl.156 that I need to make you aware of.
> It is temporarily out of sync with the Subversion sources, as we are in
> the process of applying some patches to make SoundPlugin work on 64 bit
> platforms.  You can back up to version VMMaker-dtl.155 if this is an issue.
>
> I did not look at the image that you downloaded, but Ian definitely uses up
> to date VMMaker versions, and VMMaker-tpr.58 is (as you noticed) very ancient.
> So there must be some confusion here (I don't have time to check right now).
>
> I don't have a Mac to check, but AFAIK the unix build should work fine on OS X.
> A couple of things to double check:
>
> - Make sure that you are using platforms/unix/cmake/configure, and not the
> older platforms/unix/config/configure. I think there may be some documentation
> issues here. The older configure no longer works, and might result in the
> kind of problem you are seeing.
>
> - Do the configure/make from a completely empty build directory. I'm not sure
> that cmake figures out all of the dependencies properly, and I've found
> that cleaning out the build directory and starting over is sometimes necessary.
>
> - When you run configure, make sure that it specifies the correct source
> directory. By default it will try to find the source files in platforms/unix/src
> which is not what you want if you are building an up to date VM (I always
> generate sources to a ../src32 directory outside of the ../platforms code).
> Use the --src flag to specify source directory, and also look at the output
> of "../platforms/unix/cmake/configure --help" for other options.
>
> HTH,
> Dave
>

Reply | Threaded
Open this post in threaded view
|

Re: Gnuification fails when compiling unix VM with latest VMMaker source

K. K. Subramaniam
 
On Monday 08 March 2010 11:25:03 pm Adrian Lienhard wrote:
> The second issue was that the gawk output didn't compile because the jump
> table macros were all like "CASE(0)", i.e., the argument was not
> incremented. In cmake/gnuify.awk I commented out the line print " CASE("
> (($NF) + 0) ")";
> and commented in the line
> print " CASE(" $3 ")";

$NF is an awk idiom for the last word in input line. The code works if input
source has lines like:
   case 255:
But if there are intervening comment words or spaces between number and colon,
then the code will break. E.g.
   case /*RETURN*/ 254 :

What did the input line look like in this case?

Subbu
Reply | Threaded
Open this post in threaded view
|

Re: Gnuification fails when compiling unix VM with latest VMMaker source

Adrian Lienhard

Hi Subbu,

When I messed with the awk script to find the line break problem I apparently commented out the following line

        FS=" ";

and commented in the line

        # FS="[ :]+";

which explains why $NF did not work anymore. Sorry for the noise...

Cheers,
Adrian

On Mar 9, 2010, at 04:24 , K. K. Subramaniam wrote:

> On Monday 08 March 2010 11:25:03 pm Adrian Lienhard wrote:
>> The second issue was that the gawk output didn't compile because the jump
>> table macros were all like "CASE(0)", i.e., the argument was not
>> incremented. In cmake/gnuify.awk I commented out the line print " CASE("
>> (($NF) + 0) ")";
>> and commented in the line
>> print " CASE(" $3 ")";
>
> $NF is an awk idiom for the last word in input line. The code works if input
> source has lines like:
>   case 255:
> But if there are intervening comment words or spaces between number and colon,
> then the code will break. E.g.
>   case /*RETURN*/ 254 :
>
> What did the input line look like in this case?
>
> Subbu