[Win32utils-devel] [Fwd: [ruby-core:20176] Unable to build from source on Vista, VC++ 9]

Daniel Berger djberg96 at gmail.com
Sun Nov 30 23:36:38 EST 2008


Heesob Park wrote:
> 2008/12/1 Daniel Berger <djberg96 at gmail.com>:
>> Heesob Park wrote:
>>> Hi,
>>>
>>> 2008/12/1 Daniel Berger <djberg96 at gmail.com>:
>>>> Whoops, forgot to cc this.
>>>>
>>>> Regards,
>>>>
>>>> Dan
>>>>
>>>> Hi,
>>>>
>>>> Windows Vista (Home Premium)
>>>> MS VC++ 9 (cl 15)
>>>> Ruby 1.8.6-p114 and Ruby 1.8.6-p237
>>>>
>>>> eval.c
>>>> ...
>>>> eval.c(9839) : fatal error C1189: #error :  unsupported platform
>>>> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
>>>> Studio
>>>> 9.0\VC\BIN\amd64\cl.EXE"' : return code '0x2
>>>> '
>>>> Stop.
>>>>
>>>> Where the relevant code is:
>>>>
>>>> #if !defined SAVE_WIN32_EXCEPTION_LIST && !defined _WIN32_WCE
>>>> # error unsupported platform
>>>> #endif
>>>> #endif
>>>>
>>> I guess your vista is 64bit version.
>>>
>>> Modify #9797 of eval.c
>>> #   ifdef _M_IX86
>>> to
>>> #   if defined _M_IX86 || defined _M_X64
>>> will work for you.
>> Yes, 64 bit Vista.
>>
>> With your change it got further along this time (with p114), but hit another
>> snag:
>>
>> eval.c
>> eval.c(962) : warning C4018: '>=' : signed/unsigned mismatch
>> eval.c(1157) : warning C4293: '<<' : shift count negative or too big,
>> undefined behavior
>> eval.c(1286) : warning C4244: '=' : conversion from '__int64' to 'long',
>> possible loss of data
>> eval.c(1488) : warning C4293: '<<' : shift count negative or too big,
>> undefined behavior
>> eval.c(2717) : warning C4293: '<<' : shift count negative or too big,
>> undefined behavior
>> eval.c(4412) : warning C4646: function declared with __declspec(noreturn)
>> has non-void return type
>> eval.c(4985) : warning C4293: '<<' : shift count negative or too big,
>> undefined behavior
>> eval.c(6312) : warning C4293: '<<' : shift count negative or too big,
>> undefined behavior
>> eval.c(6316) : warning C4293: '<<' : shift count negative or too big,
>> undefined behavior
>> eval.c(6456) : warning C4293: '<<' : shift count negative or too big,
>> undefined behavior
>> eval.c(6993) : warning C4244: '=' : conversion from '__int64' to 'long',
>> possible loss of data
>> eval.c(6994) : warning C4267: '=' : conversion from 'size_t' to 'long',
>> possible loss of data
>> eval.c(6997) : warning C4267: '=' : conversion from 'size_t' to 'long',
>> possible loss of data
>> eval.c(7160) : warning C4244: 'function' : conversion from '__int64' to
>> 'long', possible loss of data
>> eval.c(8790) : warning C4267: 'initializing' : conversion from 'size_t' to
>> 'long', possible loss of data
>> eval.c(8795) : warning C4267: '+=' : conversion from 'size_t' to 'long',
>> possible loss of data
>> eval.c(8799) : warning C4293: '<<' : shift count negative or too big,
>> undefined behavior
>> eval.c(8806) : warning C4267: '=' : conversion from 'size_t' to 'long',
>> possible loss of data
>> eval.c(9553) : warning C4293: '<<' : shift count negative or too big,
>> undefined behavior
>> eval.c(9553) : warning C4293: '<<' : shift count negative or too big,
>> undefined behavior
>> eval.c(9803) : error C4235: nonstandard extension used : '__asm' keyword not
>> supported on this architecture
>> eval.c(9803) : error C2065: 'mov' : undeclared identifier
>> eval.c(9803) : error C2146: syntax error : missing ';' before identifier
>> 'eax'
>> eval.c(9803) : error C2065: 'eax' : undeclared identifier
>> eval.c(9803) : error C2065: 'fs' : undeclared identifier
>> eval.c(9803) : error C2143: syntax error : missing ';' before ':'
>> eval.c(9804) : error C4235: nonstandard extension used : '__asm' keyword not
>> supported on this architecture
>> eval.c(9804) : error C2065: 'mov' : undeclared identifier
>> eval.c(9804) : error C2146: syntax error : missing ';' before identifier 'p'
>> eval.c(9804) : error C2065: 'eax' : undeclared identifier
>> eval.c(10708) : warning C4244: '=' : conversion from 'double' to 'long',
>> possible loss of data
>> eval.c(10709) : warning C4244: '=' : conversion from 'double' to 'long',
>> possible loss of data
>> eval.c(10820) : warning C4293: '<<' : shift count negative or too big,
>> undefined behavior
>> eval.c(12138) : warning C4293: '<<' : shift count negative or too big,
>> undefined behavior
>> eval.c(12678) : warning C4267: 'function' : conversion from 'size_t' to
>> 'long', possible loss of data
>> eval.c(12680) : warning C4267: '=' : conversion from 'size_t' to 'long',
>> possible loss of data
>> eval.c(13200) : warning C4646: function declared with __declspec(noreturn)
>> has non-void return type
>> eval.c(13228) : warning C4645: function declared with __declspec(noreturn)
>> has a return statement
>> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\BIN\amd64\cl.EXE"' : return code '0x2
>> '
>> Stop.
>>
>> Not sure what happened. Any idea?
>>
> The __asm inline assembler is not supported in 64bit compiler.

Ah, thanks. Do we absolutely have to have this bit of assembler code to begin 
with? I don't really know assembler so I don't know what that code is needed for.

> You must compile ruby source code with 32bit environment on 32-bit
> command prompt.
> 
> To start and open a 32-bit command prompt, follow these steps:
> 
> Click Start.
> Type %windir%\SysWoW64\cmd.exe in Start Search box.
> Alternatively, press Win + R keys (or type Run in Start Search) to
> open Run dialog, and type %windir%\SysWoW64\cmd.exe.

Got it, thanks.

Regards,

Dan


More information about the win32utils-devel mailing list