I googled around for this problem and got the hint that I should verify that all library dependencies are being satisfied. So, I ran Dependency Walker on the Shoes.exe and discovered several problems.
1. Most of the dependent libraries are compiled for x64. The Shoes exe and the DLLs that were downloaded for it are all x86.
The OS is Win7 x64.
I don't know how to solve this. I thought the recipes would automatically compile for the correct target architecture. ???
2. There are unsatisfied dependencies due to 4 missing DLLs.
IESHIMS.DLL
LIBFONTCONFIG-1.DLL
FREETYPE6.DLL
LIBPNG14-14.DLL
When I examine the Shoes recipe that *used to work with MRI 1.9.1* I don't see any references to these DLLs. I do see that the build for the Mac OSX platform has libfontconfig and libpng as dependencies, but the Windows recipe never had it. I can download these prebuilt DLLs and drop them in to the directory containing the EXE, but I am curious to know how this worked in the original build recipe.
Google tells me that the FREETYPE6.DLL error is a common Windows problem (I've never seen it before). I can easily download a prebuilt binary and drop it in, but I am curious how this got broken.
IESHIMS.DLL is apparently a part of Internet Explorer 8. That needs to be on the PATH to discover this DLL. So, how did Shoes get a dependency on IE8 all of a sudden? :(
3. A user on irc (phinze) fixed some of the problems with compiling and linking the C libs in sandbox/shoes/req but he didn't commit those changes anywhere that I can find. Ultimately this is a problem that needs repair before we can "ship" so I'm hopeful he pops back into irc and shares his solution.
We are close!
cr
I examined the install directory for the last Windows release of Shoes.
It contains a copy of LIBFONTCONFIG-1.DLL, FREETYPE6.DLL and LIBPNG14-14.DLL in its directory. However, I cannot find any logic in the various Shoes forks telling me how those DLLs got copied into there. :(
cr
Odd, you built with the default 32bit TDM-GCC 4.5.2 DevKit?...i.e. you *didn't* using the "dkver" env var to select the 64bit DevKit?
> 2. There are unsatisfied dependencies due to 4 missing DLLs.
>
> IESHIMS.DLL
>
> LIBFONTCONFIG-1.DLL
>
> FREETYPE6.DLL
>
> LIBPNG14-14.DLL
>
> When I examine the Shoes recipe that *used to work with MRI 1.9.1* I don't see any references to these DLLs. I do see that the build for the Mac OSX platform has libfontconfig and libpng as dependencies, but the Windows recipe never had it. I can download these prebuilt DLLs and drop them in to the directory containing the EXE, but I am curious to know how this worked in the original build recipe.
This smells like a dependency-of-a-dependency issue. Are those DLLs deps of the one's you're building (eg - portaudio) for Shoes?
I don't think IESHIMS.DLL is anything to worry about. I see it all the time when using Dependency Walker.
re: depends.exe, did you run Profiling -> Start Profiling... menu item on Shoes.exe and type in something like -h or --help as part of finding all its deps?
Jon
---
blog: http://jonforums.github.com/
twitter: @jonforums
Most people die of a sort of creeping common sense, and discover when it
is too late that the only things one never regrets are one's mistakes.
- Oscar Wilde
>> I have Shoes building. However, upon launch I get a dialog box from the OS saying that the exe is not a valid win32 application.
>>
>> I googled around for this problem and got the hint that I should verify that all library dependencies are being satisfied. So, I ran Dependency Walker on the Shoes.exe and discovered several problems.
>>
>> 1. Most of the dependent libraries are compiled for x64. The Shoes exe and the DLLs that were downloaded for it are all x86.
>>
>> The OS is Win7 x64.
>>
>> I don't know how to solve this. I thought the recipes would automatically compile for the correct target architecture. ???
>
> Odd, you built with the default 32bit TDM-GCC 4.5.2 DevKit?...i.e. you *didn't* using the "dkver" env var to select the 64bit DevKit?
I built using the default devkit as defined in the RubyInstaller fork I made about a week ago. I searched for all instances of 'DKVER' in the project and, while it found 10 matches, none of them were overriding any default.
>> 2. There are unsatisfied dependencies due to 4 missing DLLs.
>>
>> IESHIMS.DLL
>>
>> LIBFONTCONFIG-1.DLL
>>
>> FREETYPE6.DLL
>>
>> LIBPNG14-14.DLL
>>
>> When I examine the Shoes recipe that *used to work with MRI 1.9.1* I don't see any references to these DLLs. I do see that the build for the Mac OSX platform has libfontconfig and libpng as dependencies, but the Windows recipe never had it. I can download these prebuilt DLLs and drop them in to the directory containing the EXE, but I am curious to know how this worked in the original build recipe.
>
> This smells like a dependency-of-a-dependency issue. Are those DLLs deps of the one's you're building (eg - portaudio) for Shoes?
>
> I don't think IESHIMS.DLL is anything to worry about. I see it all the time when using Dependency Walker.
>
> re: depends.exe, did you run Profiling -> Start Profiling... menu item on Shoes.exe and type in something like -h or --help as part of finding all its deps?
I used the dependency walker GUI and just "opened" the file. It did its search while opening it up and gave me all of the details in its window. I didn't choose Profiling -> Start Profiling. Looking at it now, I see that the options under the Profiling menu are greyed out.
I'm rather proud I have gotten as far as I have. I have stretched and exceeded my Windows skills in several ways this past week! I'm almost not afraid of it anymore. :)
cr
Great to hear that.
Can you cd into sandbox and search for those DLLs? perhaps those are
not being copied to the shoes installation directory and those
couldn't be found unless are added to the PATH.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
I mention DW profiling so that all the deps can be found. My guess is you've found all the deps already, but if deps are being loaded at run-time via LoadLibrary[Ex] (dlopen) you need to profile/exercise/run Shoes.exe so that any part that dynamically loads a library can do its thing and DW can discover the dep.
> I'm rather proud I have gotten as far as I have. I have stretched and exceeded my Windows skills in several ways this past week! I'm almost not afraid of it anymore. :)
Fantastic! The downside of course is, now that you're Windows saavy and a multi-platform jinja, get ready to be co-opted into getting Rubinius to build and run on Windows ;)
Or, picking up the RubyInstaller 64bit ball and running :P
>> I'm rather proud I have gotten as far as I have. I have stretched and exceeded my Windows skills in several ways this past week! I'm almost not afraid of it anymore. :)
>
> Fantastic! The downside of course is, now that you're Windows saavy and a multi-platform jinja, get ready to be co-opted into getting Rubinius to build and run on Windows ;)
>
> Or, picking up the RubyInstaller 64bit ball and running :P
I have more interest (and knowledge of the codebase) in getting rubinius going with devkit and rubyinstaller than I do with MRI 64-bit now. If I need 64-bit, JRuby is the easy choice on Windows.
After I get this shoes thing going, I need to deliver a product to some customers at which point I will be back to help with Rubinius.
cr
> I have Shoes building. However, upon launch I get a dialog box from the OS saying that the exe is not a valid win32 application.
>
> I googled around for this problem and got the hint that I should verify that all library dependencies are being satisfied. So, I ran Dependency Walker on the Shoes.exe and discovered several problems.
>
> 1. Most of the dependent libraries are compiled for x64. The Shoes exe and the DLLs that were downloaded for it are all x86.
>
> The OS is Win7 x64.
>
> I don't know how to solve this. I thought the recipes would automatically compile for the correct target architecture. ???
>
>
> 2. There are unsatisfied dependencies due to 4 missing DLLs.
>
> IESHIMS.DLL
>
> LIBFONTCONFIG-1.DLL
>
> FREETYPE6.DLL
>
> LIBPNG14-14.DLL
I copied these DLLs (except for IESHIMS) from a working installation of Shoes into the build target. Dependency Walker then said I needed LIBEXPAT-1.DLL, so I copied that over too. Dependency Walker gave me the green light (except for IESHIMS and the x86/x64 issue).
On irc, phinze lamented the lack of good errors and the ability to run gdb. BUT, we *can* run gdb.
So, I fired it up with "gdb --args shoes.exe" and it loaded the symbols. When I tried to run it, it errored out immediately:
Error creating process C:\Users\cremes\rubyinstaller\sandbox\shoes\dist/shoes.exe, (error 193).
Ideas?
cr
Not from the top of my head, perhaps GDB is having problems to launch
the child process.
Is all this in the shoes fork of RubyInstaller?
If so, will clone in a bit and try to replicate what you're
experiencing. Still have some hours of work but will get back to you,
promise :-)
> On Wed, Sep 28, 2011 at 4:59 PM, Chuck Remes <cremes....@mac.com> wrote:
>>
>>
>> On irc, phinze lamented the lack of good errors and the ability to run gdb. BUT, we *can* run gdb.
>>
>> So, I fired it up with "gdb --args shoes.exe" and it loaded the symbols. When I tried to run it, it errored out immediately:
>>
>> Error creating process C:\Users\cremes\rubyinstaller\sandbox\shoes\dist/shoes.exe, (error 193).
>>
>> Ideas?
>>
>
> Not from the top of my head, perhaps GDB is having problems to launch
> the child process.
>
> Is all this in the shoes fork of RubyInstaller?
>
> If so, will clone in a bit and try to replicate what you're
> experiencing. Still have some hours of work but will get back to you,
> promise :-)
# Assumes you have a working Ruby on your system + git
1. git clone git://github.com/shoes/rubyinstaller.git
2. cd rubyinstaller
3. rake ruby19 # necessary so certain libs are available to Shoes later on
4. rake shoes
Step 4 will clone my personal fork of shoes (https://github.com/chuckremes/shoes) where I made a bunch of changes to support the new directory structure created by RubyInstaller (sandbox). Everything should compile cleanly.
The shoes.exe and all related files are created in ~\rubyinstaller\sandbox\shoes\dist. You'll have to manually copy in libfontconfig-1.dll, freetype6.dll, libpng14-14.dll and libexpat-1.dll to that directory to satisfy all dependencies. I'll fix up the rake file to do that automatically soon.
Double-clicking (or running it from the command-line) the shoes.exe should launch, but it doesn't.
I appreciate your help.
cr
These files are not extracted to the sandbox (except for libexpat),
where I should find them?
> Double-clicking (or running it from the command-line) the shoes.exe should launch, but it doesn't.
>
I receive a invalid win32 application, guess is due the missing dlls,
will investigate as soon I get back home.
For some reason, I'm unable to go beyond the invalid win32 application error.
I can suggest you try the following: open shoes.exe using Rohitab API Monitor:
http://www.rohitab.com/apimonitor
Under filters, enable System Services / Dynamic Link Libraries /
LoadLibrary* and FreeLibrary.
Then, attempt to start a new process (shoes.exe) and see the log.
The problem could be inside main.c, perhaps you should try gdb
shoes.exe and breakpoint WinMain and see where it stops.
Sorry for not being more helpful.
> On Wed, Sep 28, 2011 at 8:31 PM, Luis Lavena <luisl...@gmail.com> wrote:
>>
>>> Double-clicking (or running it from the command-line) the shoes.exe should launch, but it doesn't.
>>>
>>
>> I receive a invalid win32 application, guess is due the missing dlls,
>> will investigate as soon I get back home.
>>
>
> For some reason, I'm unable to go beyond the invalid win32 application error.
>
> I can suggest you try the following: open shoes.exe using Rohitab API Monitor:
>
> http://www.rohitab.com/apimonitor
>
> Under filters, enable System Services / Dynamic Link Libraries /
> LoadLibrary* and FreeLibrary.
>
> Then, attempt to start a new process (shoes.exe) and see the log.
>
> The problem could be inside main.c, perhaps you should try gdb
> shoes.exe and breakpoint WinMain and see where it stops.
>
> Sorry for not being more helpful.
I already posted my experience with launching shoes.exe from gdb in an earlier post on this thread.
> So, I fired it up with "gdb --args shoes.exe" and it loaded the symbols. When I tried to run it, it errored out immediately:
>
> Error creating process C:\Users\cremes\rubyinstaller\sandbox\shoes\dist/shoes.exe, (error 193).
>
> Ideas?
There is a problem with how the .exe was created, I think.
I will try to launch it with Rohitab API monitor. I hope it provides some new insight.
Luis, thank you for looking at it. I appreciate your time.
cr
> On Wed, Sep 28, 2011 at 5:36 PM, Chuck Remes <cremes....@mac.com> wrote:
>>
>> The shoes.exe and all related files are created in ~\rubyinstaller\sandbox\shoes\dist. You'll have to manually copy in libfontconfig-1.dll, freetype6.dll, libpng14-14.dll and libexpat-1.dll to that directory to satisfy all dependencies. I'll fix up the rake file to do that automatically soon.
>>
>
> These files are not extracted to the sandbox (except for libexpat),
> where I should find them?
For the correct versions, I recommend downloading and installing the last Shoes release for Windows [1]. Those are the DLLs I am using since we have not tried to update the dependencies yet.
cr
[1] http://github.com/downloads/shoes/shoes/shoes3-novideo.exe.zip