Compile V8 on Cygwin

615 views
Skip to first unread message

Bryan White

unread,
Dec 26, 2009, 8:21:10 AM12/26/09
to v8-u...@googlegroups.com
I am attempting to compile V8 in a Cygwin environment.

I installed SCons with no obvious problems.

When I run 'scons mode=release library=static snapshot=on' I get:

scons: Reading SConscript files ...
TypeError: cannot concatenate 'str' and 'NoneType' objects:
File "/home/bryan/v8/SConstruct", line 587:
'help': 'the os to build for (' + OS_GUESS + ')'

This is the just released cygwin 1.7.1.
GCC/G++ 4.3 is installed

Poking around in the SConstruct file I see this:

OS_GUESS = utils.GuessOS()

which seems to be returning a non-string result (I am unfamiliar with
Python or have only used SCons to compile v8 on other platforms).

--
Bryan White

Stephan Beal

unread,
Dec 26, 2009, 9:23:35 AM12/26/09
to v8-u...@googlegroups.com
On Sat, Dec 26, 2009 at 2:21 PM, Bryan White <nick...@gmail.com> wrote:
OS_GUESS = utils.GuessOS()

which seems to be returning a non-string result (I am unfamiliar with
Python or have only used SCons to compile v8 on other platforms).

This is just a guess (and i can't stand python), but try changing that to:

OS_GUESS = "cygwin"

Or even:

OS_GUESS = "linux"

???

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/

Søren Gjesse

unread,
Dec 26, 2009, 3:36:31 PM12/26/09
to v8-u...@googlegroups.com
There is no support for building V8 in a cygwin environment. If you want to use GCC on Windows it should be possible to use the MinGW environment. Building on MinGW is not tested on a regular basis, so support for it might be broken. Please note that using MinGW on a Windows installation with Visual Studio installed will probably cause some problems. You can search the postings on this list for more information. Also see Also see Issue 64.

Regards,
Søren

Bryan White

unread,
Dec 27, 2009, 8:10:22 AM12/27/09
to v8-u...@googlegroups.com
2009/12/26 Søren Gjesse <sgj...@chromium.org>:

> There is no support for building V8 in a cygwin environment. If you want to
> use GCC on Windows it should be possible to use the MinGW environment.
> Building on MinGW is not tested on a regular basis, so support for it might
> be broken. Please note that using MinGW on a Windows installation with
> Visual Studio installed will probably cause some problems. You can search
> the postings on this list for more information. Also see Also see Issue 64.
> Regards,
> Søren

Thanks for the info. This was sort of a personal side project to see
if I could use Cygwin to replace my test VMWare VM for development of
Linux FastCGI programs. Notes in the just released Cygwin 1.7 gave me
hope that it might work, but I am hitting a lot of road blocks along
the way (V8 was just one). So for now I am abandoning this effort.

--
Bryan White

Evan Chen

unread,
Jun 2, 2010, 1:06:53 AM6/2/10
to v8-u...@googlegroups.com

cygwin gcc4 is unable to use -mno-cygwin option, but gcc3 cat use it .
I build v8 under cygwin gcc3 with -mno-cygwin option( use mingw3 under cygwin).
    I use gcc3 -mno-cygwin flag, and some modify SConstruct and tools/utils.py to build v8(brench/2.1).
    It build native win32 code, and it is ok. 

environment:
    cygwin 1.7.5-1 
    svn    1.6.11 (r934486)
    Python 2.5.5
    scons  v1.3.0.d20100501.r4824;  (ps: scons 1.3, has problems on js2c)
    gcc (GCC) 3.4.4
    gcc-mingw-core       20050522-1
    gcc-mingw-g++        20050522-1
    v8    svn/branches/2.1
build v8 and shell:
    1. if you have gcc3, and mingw3 under cygwin.
/usr/bin/set-gcc-default-3.sh
    2. get v8 source code( brench 2.1 )
cd v8-2.1
        cp utils.diff SConstruct.diff ./
    3. patch tools/utils.py utils.diff
    4. patch SConstruct SConstruct.diff
    5. scons library=shared
    6. scons sample=shell library=shared.

run shell:
    $ cd  benchmarks 
    $ ../shell run.js
    Richards: 3356
    DeltaBlue: 4063
    Crypto: 2963
    RayTrace: 4972
    EarleyBoyer: 12568
    RegExp: 1682S
    play: 7391
    ----
    Score (version 5): 4389

Evan Chen

From: Bryan White <nickt...@gmail.com>
Date: 2009年12月27日, 下午9時10分
Subject: Compile V8 on Cygwin
To: v8-users


2009/12/26 Søren Gjesse <sgje...@chromium.org>:

> There is no support for building V8 in acygwinenvironment. If you want to

> use GCC on Windows it should be possible to use the MinGW environment.
> Building on MinGW is not tested on a regular basis, so support for it might
> be broken. Please note that using MinGW on a Windows installation with
> Visual Studio installed will probably cause some problems. You can search
> the postings on this list for more information. Also see Also see Issue 64.
> Regards,
> Søren

Thanks for the info.  This was sort of a personal side project to see
if I could useCygwinto replace my test VMWare VM for development of
Linux FastCGI programs.  Notes in the just releasedCygwin1.7 gave me
utils.diff
SConstruct.diff
Reply all
Reply to author
Forward
0 new messages