librelist archives

« back to archive

Windows builds and build error

Windows builds and build error

From:
Andrew S. Townley
Date:
2011-11-22 @ 23:13
Hi folks,

I'm trying to solve some serious incompatibility issues between the 
available binary versions of Shoes for Windows and OSX by trying to build 
on Vista following the instructions on the Wiki.

I'm not sure I understand why an another version of MinGW and git is 
required in the downloads directory to build the version of ruby used for 
Shoes.  Can someone shed some light on this?  I'd originally tried to do 
it within the MinGW shell, but that gave me all kinds of '*.exe not 
responding' errors.  This seems to be fixed using the regular cmd.exe 
shell, but the issue wasn't immediately obvious.

There's obviously an advantage to the first approach, but it doesn't seem 
obvious to me.  Also, how are the cairo and other dependencies built?  Are
there blah-shoes-win forks of these projects somewhere to try and build 
from source?

I found @ashbb's MSVC porting notes, but I'm not ready to delve into that 
particular barrel of worms.

All went reasonably well until libtool tried to build paqa_devs, and I got
the following errors:

if test -n "" ; then for dir in ""; do make -C $dir all; done ; fi
mkdir bin
touch bin-stamp
/bin/sh ./libtool --mode=link gcc -o bin/paqa_devs -I./include -I./src/common -I
./src/os/unix -g -O2 -DPA_LITTLE_ENDIAN -I./src/common -DPA_NO_DS -DPA_NO_ASIO -
DPA_NO_WDMKS -mthreads -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERS
ION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_
SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEM
ORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H
=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 ./test/paqa_devs.c lib/libpor
taudio.la -lwinmm -lm -lstdc++ -lole32 -luuid
mkdir bin/.libs
gcc -o bin/.libs/paqa_devs -I./include -I./src/common -I./src/os/unix -g -O2 -DP
A_LITTLE_ENDIAN -I./src/common -DPA_NO_DS -DPA_NO_ASIO -DPA_NO_WDMKS -mthreads -
DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRIN
G=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS
_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H
=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_SHORT=2 -DSI
ZEOF_INT=4 -DSIZEOF_LONG=4 ./test/paqa_devs.c  lib/.libs/libportaudio.dll.a -lwi
nmm /mingw/lib/libstdc++.a -lole32 -luuid -Lc:/shoes_dev/sandbox/mingw/lib
c:\shoes_dev\sandbox\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\
ld.exe: Dwarf Error: Offset (700) greater than or equal to (null) size (4954657)
.
/mingw/lib/crt2.o:crt1.c:(.text+0x8): undefined reference to `__dyn_tls_init_cal
lback'
collect2: ld returned 1 exit status
make: *** [bin/paqa_devs] Error 1
rake aborted!
Command failed with status (2): ["c:/shoes_dev/sandbox/msys/bin/bash.exe" -...]
C:/Ruby192/lib/ruby/1.9.1/rake.rb:993:in `block in sh'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1008:in `call'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1008:in `sh'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1092:in `sh'
c:/shoes_dev/recipes/compiler/msys.rake:40:in `msys_sh'
c:/shoes_dev/recipes/dependencies/port_audio.rake:23:in `block (4 levels) in <to
p (required)>'
C:/Ruby192/lib/ruby/1.9.1/fileutils.rb:121:in `chdir'
C:/Ruby192/lib/ruby/1.9.1/fileutils.rb:121:in `cd'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1092:in `cd'
c:/shoes_dev/recipes/dependencies/port_audio.rake:22:in `block (3 levels) in <to
p (required)>'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `call'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `execute'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:602:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:594:in `block in invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:602:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:594:in `block in invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:581:in `invoke'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1992:in `run'
C:/Ruby192/bin/rake:31:in `<main>'

Probably something trivial, I'm sure.  Any help would be appreciated.

Cheers,

ast
--
Andrew S. Townley <ast@atownley.org>
http://atownley.org

Re: [shoes] Windows builds and build error

From:
Cecil Coupe
Date:
2011-11-23 @ 03:04
As far as I know, ashbb built the red shoes binaries with the Ruby 1.9.1
installer and whatever mingw was current at the time. He then went to
work on green shoes with ruby 1.9.2 and whatever mingw was needed for
that.  There are hints in your error log that your ruby is 1.9.2. I have
little knowledge about managing two mingw and two ruby installers on
windows. Still, I'd look there to make sure the right version of each is
being used on the source code. 

On Tue, 2011-11-22 at 23:13 +0000, Andrew S. Townley wrote:
> 
> Hi folks,
> 
> I'm trying to solve some serious incompatibility issues between the
> available binary versions of Shoes for Windows and OSX by trying to
> build on Vista following the instructions on the Wiki.
> 
> 

Re: [shoes] Windows builds and build error

From:
Andrew S. Townley
Date:
2011-11-23 @ 06:49
On 23 Nov 2011, at 3:04 AM, Cecil Coupe wrote:

> As far as I know, ashbb built the red shoes binaries with the Ruby 1.9.1
> installer and whatever mingw was current at the time. He then went to
> work on green shoes with ruby 1.9.2 and whatever mingw was needed for
> that.  There are hints in your error log that your ruby is 1.9.2. I have
> little knowledge about managing two mingw and two ruby installers on
> windows. Still, I'd look there to make sure the right version of each is
> being used on the source code. 

I was just following the instructions, really.  It said "download and 
execute rubyinstaller-1.9.2", so since it said p136 was the latest, I 
figured it'd work with the latest one.  Apparently, I was wrong... ;)

Valid points, though.  Thanks.

> On Tue, 2011-11-22 at 23:13 +0000, Andrew S. Townley wrote:
>> 
>> Hi folks,
>> 
>> I'm trying to solve some serious incompatibility issues between the
>> available binary versions of Shoes for Windows and OSX by trying to
>> build on Vista following the instructions on the Wiki.
>> 
>> 
> 

--
Andrew S. Townley <ast@atownley.org>
http://atownley.org

Re: [shoes] Windows builds and build error

From:
Steve Klabnik
Date:
2011-11-23 @ 05:05
Hey Andrew!

We've been working hard on the Windows build process, so there's some
things that are a bit in flux at the moment. I haven't build HEAD on
windows in a bit, but the 3.0.0 tag should build.

> another version of mingw and git

The issue is that (iirc, ash, can you confirm?) that it uses the
versions in those directory to build things, not the ones you have
installed.

> I found @ashbb's MSVC porting notes, but I'm not ready to delve into 
that particular barrel of worms.

We haven't build with MSVC for a long time. MinGW is where it's at.


I haven't seen your particular error. What I _will_ say is that
building using 1.9.2 does work, but is still a bit flaky. In
particular, there are encoding things that aren't 100% worked out. See
some of the other posts on this ML and the issue tracker about them.
Technically, 1.9.1 is only still supported.

If you got 1.9.2 working with encodings, you'd be my personal hero.
I've probably spent two man-months personally on this issue over the
last 9 months or so.

But yeah, if you follow the instructions exactly and build Shoes 3.0.0
with ashbb/rubinstaller HEAD^1 and Ruby 1.9.1, it should work. I did
so fairly recently (two weeks ago?).

I just noticed that the note about using HEAD^1 isn't on the wiki,
though, so that should be updated. I'll do that now. Ugh.

Thanks for mentioning this, though. We've all been working really hard
to try and make it better, because frankly, it sucks. There's a whole
alternate build process that's 80% working that doesn't make you
download all that stuff by hand...

Re: [shoes] Windows builds and build error

From:
Andrew S. Townley
Date:
2011-11-23 @ 06:59
Hi Seve,

On 23 Nov 2011, at 5:05 AM, Steve Klabnik wrote:

> Hey Andrew!
> 
> We've been working hard on the Windows build process, so there's some
> things that are a bit in flux at the moment. I haven't build HEAD on
> windows in a bit, but the 3.0.0 tag should build.

Ok.  I might give it one last shot.  I'm pretty convinced at this stage 
that Shoes isn't quite the right tool for the job I need to do.  I think 
it's cool for learning programming and doing games, etc., but for what I'm
trying to do, it's a bit too low-level.  I hadn't really realized that 
fully when I started.

I think the efforts towards "native" shoes where you had a similar 
paradigm but with more sophisticated native controls/fonts, etc. is the 
way to go.  The very first project I worked on was HyperScript Tools, and 
it was owner-draw hell.  All those "pleasant" memories from the '90s have 
come flooding back to me over the last few days... ;)

>> another version of mingw and git
> 
> The issue is that (iirc, ash, can you confirm?) that it uses the
> versions in those directory to build things, not the ones you have
> installed.

That's what I discovered, yes.  What I don't understand is why.  It'd seem
like simpler instructions would be "install MinGW; install rubyinstaller; 
install git; install wget; rake" but this might not be possible.

> 
>> I found @ashbb's MSVC porting notes, but I'm not ready to delve into 
that particular barrel of worms.
> 
> We haven't build with MSVC for a long time. MinGW is where it's at.

Think this makes sense.

> I haven't seen your particular error. What I _will_ say is that
> building using 1.9.2 does work, but is still a bit flaky. In
> particular, there are encoding things that aren't 100% worked out. See
> some of the other posts on this ML and the issue tracker about them.
> Technically, 1.9.1 is only still supported.
> 
> If you got 1.9.2 working with encodings, you'd be my personal hero.
> I've probably spent two man-months personally on this issue over the
> last 9 months or so.

That doesn't sound like fun at all...

> But yeah, if you follow the instructions exactly and build Shoes 3.0.0
> with ashbb/rubinstaller HEAD^1 and Ruby 1.9.1, it should work. I did
> so fairly recently (two weeks ago?).
> 
> I just noticed that the note about using HEAD^1 isn't on the wiki,
> though, so that should be updated. I'll do that now. Ugh.
> 
> Thanks for mentioning this, though. We've all been working really hard
> to try and make it better, because frankly, it sucks. There's a whole
> alternate build process that's 80% working that doesn't make you
> download all that stuff by hand...


I can see that there's a good mount of effort and interest in Shoes, and 
that's great.  Re downloading, I downloaded a tarball of wget for MinGW 
and did this:

$ cd c:/shoes_dev/downloads
$ wget -cm -nd http://www.rin-shun.com/shoes/MinGW/downloads/

There was no way I was going to click all those links! ;)

Thanks for the replies, folks.  Will let you know if I have another go.

Cheers,

ast
--
Andrew S. Townley <ast@atownley.org>
http://atownley.org

Re: [shoes] Windows builds and build error

From:
Cecil Coupe
Date:
2011-11-23 @ 09:00
On Wed, 2011-11-23 at 06:59 +0000, Andrew S. Townley wrote:
> Ok.  I might give it one last shot.  I'm pretty convinced at this
> stage that Shoes isn't quite the right tool for the job I need to do.
> I think it's cool for learning programming and doing games, etc., but
> for what I'm trying to do, it's a bit too low-level.  I hadn't really
> realized that fully when I started.
> 
> I think the efforts towards "native" shoes where you had a similar
> paradigm but with more sophisticated native controls/fonts, etc. is
> the way to go.  The very first project I worked on was HyperScript
> Tools, and it was owner-draw hell.  All those "pleasant" memories from
> the '90s have come flooding back to me over the last few days... ;) 

Ah, hyperscript. Good for learning but frustrating when pushed passed
toy 'stacks'. On the other hand many people did learn something from
that training and went to the next level. Red Shoes is very, very, very
much the same, by intent! It is a teaching tool. I too thought I could
re-purpose it into something a 'serious' developer could use. But, the
syntax/paradigm fails for anything complicated. 

Green Shoes does remove some barriers from the Shoes sandbox but you
give up the packaging and distribution of Red Shoes (which is broken  so
you aren't giving up much).

Re: [shoes] Windows builds and build error

From:
Andrew S. Townley
Date:
2011-11-23 @ 09:32
On 23 Nov 2011, at 9:00 AM, Cecil Coupe wrote:

> On Wed, 2011-11-23 at 06:59 +0000, Andrew S. Townley wrote:
>> Ok.  I might give it one last shot.  I'm pretty convinced at this
>> stage that Shoes isn't quite the right tool for the job I need to do.
>> I think it's cool for learning programming and doing games, etc., but
>> for what I'm trying to do, it's a bit too low-level.  I hadn't really
>> realized that fully when I started.
>> 
>> I think the efforts towards "native" shoes where you had a similar
>> paradigm but with more sophisticated native controls/fonts, etc. is
>> the way to go.  The very first project I worked on was HyperScript
>> Tools, and it was owner-draw hell.  All those "pleasant" memories from
>> the '90s have come flooding back to me over the last few days... ;) 
> 
> Ah, hyperscript. Good for learning but frustrating when pushed passed
> toy 'stacks'. On the other hand many people did learn something from
> that training and went to the next level. Red Shoes is very, very, very
> much the same, by intent! It is a teaching tool. I too thought I could
> re-purpose it into something a 'serious' developer could use. But, the
> syntax/paradigm fails for anything complicated. 

Actually, no.  You're thinking of HyperCard+HyperTalk.  I'm talking about 
a spreadsheet/development environment derived from Wingz: 
http://www.thefreelibrary.com/Informix+grants+exclusive+licensing+rights+of+INFORMIX-Wingz+and...-a016536565

At the time, it seemed pretty cool--until you tried to test it.  Bitmaps 
were the only way to verify things worked correctly, because there was no 
way for automated testing tools to do introspection on the controls.

Like you, I was planning on using it as the basis for some simple database
applications.  I started this:  https://github.com/atownley/shoes_mvc, but
I don't think it's going to ever really grow legs for shoes.  I'm probably
going to take it in a different direction over the next few days, but 
it'll be a different project without the Shoes dependencies.

Unfortunately, my demo application is proprietary.  I was hoping to add a 
samples directory once I got the deliverable out of the way.  Not sure 
this'll happen now.

> Green Shoes does remove some barriers from the Shoes sandbox but you
> give up the packaging and distribution of Red Shoes (which is broken  so
> you aren't giving up much).

The appeal of shoes for me was that I could distribute something that 
would be a one-click app on Windows that was written in Ruby.  I don't 
really have access to Windows on a regular basis, so I wanted something I 
could develop on mac and deploy as self contained critters on Windows.

Ah, well... The search continues. :)

Thanks for all the help, folks! :)

Cheers,

ast
--
Andrew S. Townley <ast@atownley.org>
http://atownley.org

Re: [shoes] Windows builds and build error

From:
Steve Klabnik
Date:
2011-11-23 @ 15:50
I actually don't think that Shoes falls down for more complex
projects, but unless you know what you're doing, it can get out of
hand. Hackety is the largest Shoes project ever, and its code is kinda
a mess, but I think that has more to do with _why's coding style than
anything else. I'm quite convinced it's just fine for big stuff, but
we do have some work to do on robustness before that can happen.

[shoes] Windows builds and build error

From:
Casey Kolderup
Date:
2011-11-23 @ 17:07
Oops, I think I sent this from the wrong address. Let me try that again:

Hi Steve,
This might be getting off topic, so feel free to change the subject or
something for threading purposes, but I guess I'd like to know more
about what you're thinking when you say things like "big stuff" and
"robustness". Two weekends ago I was trying to write a game that would
have required ~200 small Shapes being rendered to the screen at a time
and saw significant performance slowdowns. I could have rewritten the
code to be more complex and use a few images that I could have swapped
in to "animate", but using native Shapes was simple and (I thought)
reasonable for what I was trying to do. Performance suffered, though,
and animation slowed to a crawl. I had to basically put off the plan
to write the whole thing there and then because I didn't have the
attention span at the time to get involved with the rewrite that I
describe.
Do you think that rendering 200 shapes, some subset of those moving
within an animate cycle, is feasible for the future of Shoes? What
about 500? Is this kind of project always going to be better left to
some sort of graphics-heavy framework like Processing? I don't intend
this as a criticism; I think Shoes is really amazing for some stuff
that would require a lot of manual labor in Processing or Love2D or
other game- and visualization-focused frameworks. I just want to get a
sense for when I could be recommending different tools to different
people based on what they want to make.
Thanks,
Casey

On Wednesday, November 23, 2011 at 10:50 AM, Steve Klabnik wrote:

I actually don't think that Shoes falls down for more complex
projects, but unless you know what you're doing, it can get out of
hand. Hackety is the largest Shoes project ever, and its code is kinda
a mess, but I think that has more to do with _why's coding style than
anything else. I'm quite convinced it's just fine for big stuff, but
we do have some work to do on robustness before that can happen.

Re: [shoes] Windows builds and build error

From:
Steve Klabnik
Date:
2011-11-23 @ 20:31
So, Shoes is all about an interface, not an implementation. We call
out to the OS for native widgets, we rely on Cairo and Pango, and all
that stuff.

So if Cairo isn't up to the task, then Shoes shouldn't be. But if it
is, then it is.

As for the future, I'm all about bringing in access to other
interesting things, and providing a good interface for them. For
example, I wouldn't even mind straight-up OpenGL bindings. Or SDL.
Those aren't in there right now, though.

I mean, try something like TankSpank:
https://github.com/shoes/shoes-contrib/blob/master/expert/expert-tankspank.rb
I have a Core 2 Duo, and this game still runs pretty smoothly. It's
drawing 3d stuff with lines, calculating perspective, yadda, yadda.

Shoes may not be appropriate for your project. There are certainly
lots of issues, and while we're working on solving them, at the end of
the day, if it doesn't work, it doesn't work.

Re: [shoes] Windows builds and build error

From:
ashbb
Date:
2011-11-24 @ 10:58
Hi Casey, Steve and folks,

I wrote tiny snippets to check their rendering performances.

https://gist.github.com/1391082

Try out test1.rb and test2.rb by changing the value of N, e.g. N=20, N=100,
N=200.

In the case of test1.rb,
- N=20 is good, N=100 is a little bit slow, N=200 is very slow.

In the case of test2.rb,
- N=20 is good, N=100 is good, N=200 is a little bit slow.

The above result is the case on my Windows 7.
So, you may get a different result.

But, the point I'd like to say is that cairo's rendering performance is
good. The cause for the above performance loss is Ruby's method call
perfromance.

I don't think Shoes has the best performance. But I think it's not so bad.
;-)

ashbb

Re: [shoes] Windows builds and build error

From:
ashbb
Date:
2011-11-23 @ 07:52
Hi Andrew, Cecil, Steve and folks,

Sorry, I'm late.

As Cecil mentioned, I built Shoes 3 with Ruby 1.9.1 and the dependencies of
the day. The instruction is this:
https://github.com/ashbb/shoes_hack_note/blob/master/md/hack019.md

But after that, I have not been successful to build the latest Shoes with
Ruby 1.9.2 and the latest dependencies.

> I'm pretty convinced at this stage that Shoes isn't quite the
> right tool for the job I need to do.  I think it's cool for
> learning programming and doing games, etc.
Totally agree.
So, why don't you try out Green Shoes? ;-)
Green Shoes is just a gem, so you can install it easily and can start
learning Ruby programming and doing games at once.

ashbb