Patch to allow building for Mac OS X 64bits with GYP

28 views
Skip to first unread message

fdmanana

unread,
Mar 22, 2012, 3:25:30 PM3/22/12
to v8-dev
Hi,

I made a patch that allows to build V8 in 64bits mode for Mac OS X
using GYP.
It's referenced in the following user list thread:

https://groups.google.com/group/v8-users/browse_thread/thread/4d315e11bc20c319

(patch at https://gist.github.com/2160061)

What's the procedure to submit it?

Thanks

Yang Guo

unread,
Mar 23, 2012, 12:31:52 AM3/23/12
to v8-...@googlegroups.com, fdma...@gmail.com

Hi,

thanks for contributing! The best course of action would be to submit your patch as a change list to our code review site. Details are described here: http://code.google.com/p/v8/wiki/Contributing (also follow the link to "requesting a review")
Please make sure to sign the CLA (electronically). For this change list I would suggest jkum...@chromium.org as reviewer as he is most familiar with our GYP build.

Cheers,

Yang

Jakob Kummerow

unread,
Mar 23, 2012, 6:10:33 AM3/23/12
to v8-...@googlegroups.com, fdma...@gmail.com
Yay! Thanks for doing this work.

As Yang said, please upload your patch (against the bleeding_edge branch) to our code review site and sign the CLA.

Before I can land this, I'll have to test:
- does it work for ia32 and x64 builds? (I guess you've verified this)
- does it work for shared and static library builds?
- does it work for all of GCC, clang, and XCode?
- does it work when V8 is embedded into Chromium?
- does the new GYP revision work fine on the other platforms (Linux, Win)?

I currently have some other stuff to deal with, but I'll hopefully get around to this some time next week. In the meantime, if you want to help with the testing, that'd be great :-)

fdmanana

unread,
Mar 23, 2012, 10:53:41 AM3/23/12
to v8-dev
Thanks everyone.

I just made a small correction which was breaking xcode builds.
I did test 64bits, 32bits, shared/static, gcc/clang and make/xcode
combinations on Mac OS X Lion.
Also verified it works on Linux as before.

Ran the unit tests, they succeed for 64bits builds but there's one
failure for 32bits builds (http://friendpaste.com/
2cBbU4F3OycXnMuqzUYI3a).
This failure also happens without my patch, so I guess I can ignore
it.

As for Windows, I'm not familiar with Windows development nor do I
have access to a Windows box. Would be very thankful if someone could
test it :)

Ok, I submitted a CLA and registered at http://codereview.chromium.org/.
Now how do I submit the patch?

I installed depot_tools, and from within a git checkout (from
github.com/v8/v8) I did the following, which always gives me a
timeout:

fdmanana 14:50:03 ~/git/hub/v8 (osx_64bits_build)> git-cl upload
Running presubmit upload checks ...

Presubmit checks passed.
Makefile | 2 +-
build/common.gypi | 22 ++++++++++++++++++++++
build/gyp_v8 | 7 ++++++-
tools/gyp/v8.gyp | 10 ++++++++--
4 files changed, 37 insertions(+), 4 deletions(-)
Upload server: http://codereview.chromium.org:443 (change with -s/--
server)
Email (login for uploading to http://codereview.chromium.org:443)
[fdma...@gmail.com]:
Password for fdma...@gmail.com:

Got exception while uploading -- saving description to /Users/
fdmanana/.git_cl_description_backup

Traceback (most recent call last):
File "/Users/fdmanana/git/hub/depot_tools/git_cl.py", line 1528, in
<module>
sys.exit(main(sys.argv[1:]))
File "/Users/fdmanana/git/hub/depot_tools/git_cl.py", line 1513, in
main
return command(parser, argv[1:])
File "/Users/fdmanana/git/hub/depot_tools/git_cl.py", line 1087, in
CMDupload
return RietveldUpload(options, args, cl)
File "/Users/fdmanana/git/hub/depot_tools/git_cl.py", line 999, in
RietveldUpload
issue, patchset = upload.RealMain(['upload'] + upload_args + args)
File "/Users/fdmanana/git/hub/depot_tools/third_party/upload.py",
line 2313, in RealMain
response_body = rpc_server.Send("/upload", body,
content_type=ctype)
File "/Users/fdmanana/git/hub/depot_tools/third_party/upload.py",
line 376, in Send
self._Authenticate()
File "/Users/fdmanana/git/hub/depot_tools/third_party/upload.py",
line 421, in _Authenticate
super(HttpRpcServer, self)._Authenticate()
File "/Users/fdmanana/git/hub/depot_tools/third_party/upload.py",
line 349, in _Authenticate
self._GetAuthCookie(auth_token)
File "/Users/fdmanana/git/hub/depot_tools/third_party/upload.py",
line 284, in _GetAuthCookie
response = self.opener.open(req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/urllib2.py", line 394, in open
response = self._open(req, data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/urllib2.py", line 412, in _open
'_open', req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/urllib2.py", line 372, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/urllib2.py", line 1199, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/urllib2.py", line 1174, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 60] Operation timed out>
fdmanana 14:51:30 ~/git/hub/v8 (osx_64bits_build)>


I'm assuming this is somehow linked to my gmail account and that I
should use my gmail account password.

Thanks for your help.



On Mar 23, 10:10 am, Jakob Kummerow <jkumme...@chromium.org> wrote:
> Yay! Thanks for doing this work.
>
> As Yang said, please upload your patch (against the bleeding_edge branch)
> to our code review site and sign the CLA.
>
> Before I can land this, I'll have to test:
> - does it work for ia32 and x64 builds? (I guess you've verified this)
> - does it work for shared and static library builds?
> - does it work for all of GCC, clang, and XCode?
> - does it work when V8 is embedded into Chromium?
> - does the new GYP revision work fine on the other platforms (Linux, Win)?
>
> I currently have some other stuff to deal with, but I'll hopefully get
> around to this some time next week. In the meantime, if you want to help
> with the testing, that'd be great :-)
>
>
>
>
>
>
>
> On Fri, Mar 23, 2012 at 05:31, Yang Guo <yang...@chromium.org> wrote:
> > Hi,
>
> > thanks for contributing! The best course of action would be to submit your
> > patch as a change list to our code review site. Details are described here:
> >http://code.google.com/p/v8/wiki/Contributing(also follow the link to
> > "requesting a review")
> > Please make sure to sign the CLA (electronically). For this change list I
> > would suggest jkumme...@chromium.org as reviewer as he is most familiar
> > with our GYP build.
>
> > Cheers,
>
> > Yang
> > On Mar 23, 2012 3:25 AM, "fdmanana" <fdman...@gmail.com> wrote:
>
> >> Hi,
>
> >> I made a patch that allows to build V8 in 64bits mode for Mac OS X
> >> using GYP.
> >> It's referenced in the following user list thread:
>
> >>https://groups.google.com/group/v8-users/browse_thread/thread/4d315e1...
>
> >> (patch athttps://gist.github.com/2160061)

Jakob Kummerow

unread,
Mar 23, 2012, 11:41:53 AM3/23/12
to v8-...@googlegroups.com
Run "git cl config http://v8.googlecode.com/svn" if you haven't done so yet. Then "git cl upload" should work (commit locally first; git-cl will complain if you don't). 

AFAIK you can use any GMail account to upload patches for review. If signing into codereview.chromium.org with your browser works, then so should uploading patches via "git cl upload". The password is the same in both cases (your regular account password).

paul lind

unread,
Mar 23, 2012, 11:54:02 AM3/23/12
to v8-dev
Hi -

There are a couple steps needed before you do the git cl upload. It
was not clear to me if you had done the git cl config step. And the
local branch that you have made changes on should track the google
bleeding_edge branch from the v8 repo.

And yes, the whole process uses your gmail account for auth, so you
will have to enter a valid username and password (looks like you did)

Here is a wiki page that I put together for our team, when uploading
changes for v8:
https://github.com/paul99/v8m-rb/wiki/Submitting-changes-upstream-to-Google

In the wiki, when I say 'gbl', I mean a local branch called 'gbl',
which is created from https://github.com/v8/v8.git 'bleeding_edge'
branch.

Hope this helps,

paul

fdmanana

unread,
Mar 23, 2012, 12:29:39 PM3/23/12
to v8-dev
Thanks Paul.
It worked now, I think I missed the step "git cl config http://v8.googlecode.com/svn"
previously.

The issue is now submitted: http://codereview.chromium.org/9808065/

regards,

On Mar 23, 3:54 pm, paul lind <plin...@gmail.com> wrote:
> Hi -
>
> There are a couple steps needed before you do the git cl upload. It
> was not clear to me if you had done the git cl config step. And the
> local branch that you have made changes on should track the google
> bleeding_edge branch from the v8 repo.
>
> And yes, the whole process uses your gmail account for auth, so you
> will have to enter a valid username and password (looks like you did)
>
> Here is a wiki page that I put together for our team, when uploading
> changes for v8:https://github.com/paul99/v8m-rb/wiki/Submitting-changes-upstream-to-...
>
> In the wiki, when I say 'gbl', I mean a local branch called 'gbl',
> which is created fromhttps://github.com/v8/v8.git'bleeding_edge'

bangf...@samsung.com

unread,
Aug 27, 2013, 2:39:55 PM8/27/13
to v8-...@googlegroups.com
Hi Fdmanana,

I got a similar problem while "git cl upload" , any ideas?  Thanks in advance.

>>
Presubmit checks passed.
 1 file changed, 1 insertion(+), 1 deletion(-)

Got exception while uploading -- saving description to /home/likewise-open/SERILOCAL/bangfu.tao/.git_cl_description_backup


Traceback (most recent call last):
  File "/home/likewise-open/SERILOCAL/bangfu.tao/tools/depot_tools/git_cl.py", line 2151, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/likewise-open/SERILOCAL/bangfu.tao/tools/depot_tools/git_cl.py", line 2133, in main

    return command(parser, argv[1:])
  File "/home/likewise-open/SERILOCAL/bangfu.tao/tools/depot_tools/git_cl.py", line 1428, in CMDupload
    ret = RietveldUpload(options, args, cl)
  File "/home/likewise-open/SERILOCAL/bangfu.tao/tools/depot_tools/git_cl.py", line 1310, in RietveldUpload
    issue, patchset = upload.RealMain(upload_args)
  File "/home/likewise-open/SERILOCAL/bangfu.tao/tools/depot_tools/third_party/upload.py", line 2466, in RealMain
    vcs = GuessVCS(options)
  File "/home/likewise-open/SERILOCAL/bangfu.tao/tools/depot_tools/third_party/upload.py", line 2287, in GuessVCS
    (vcs, extra_output) = GuessVCSName(options)
  File "/home/likewise-open/SERILOCAL/bangfu.tao/tools/depot_tools/third_party/upload.py", line 2240, in GuessVCSName
    res = RunDetectCommand(VCS_MERCURIAL, ["hg", "root"])
  File "/home/likewise-open/SERILOCAL/bangfu.tao/tools/depot_tools/third_party/upload.py", line 2230, in RunDetectCommand
    out, returncode = RunShellWithReturnCode(command)
  File "/home/likewise-open/SERILOCAL/bangfu.tao/tools/depot_tools/third_party/upload.py", line 1026, in RunShellWithReturnCode
    universal_newlines, env)
  File "/home/likewise-open/SERILOCAL/bangfu.tao/tools/depot_tools/third_party/upload.py", line 1001, in RunShellWithReturnCodeAndStderr
    env=env)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 20] Not a directory
Reply all
Reply to author
Forward
0 new messages