Re: [v8-users] Re: Building with MSVC & GN - Where do the static files go?

2017-01-11 Thread Jochen Eisinger
With the latest dev version of V8 (5.7), you should be able to get static
libraries using the gn flag v8_static_library = true

On Tue, Jan 10, 2017 at 4:26 PM Hans Maier  wrote:

> Hi,
>
> I had the same issue. I ended up creating the static libs from the
> obj-files using the MSVC lib tool manually.
>
> Unsatisfactory, but it was working for me.
>
> Am Montag, 9. Januar 2017 15:55:40 UTC+1 schrieb Brendan Bates:
>
> Hello,
>
> I have seen this issue pop up a couple times on here and wondering what
> the current status is.  I was spending the morning trying to get ahead of
> the game and switch from a Gyp build to a GN build.  We are using MSVC 2015
> to perform the build.  I am successfully configuring and building using the
> following commands:
>
> > gn gen out/x86.debug --args="is_debug=true v8_use_snapshot=false
> target_cpu=\"x86\" disable_libfuzzer=true"
> Done. Made78 targets from 44 files in 1900ms
>
> > ninja-C out/x86.debug d8
> ninja: Entering directory `out.gn/x86.debug'
> [49/886] LINK mkpeephole.exe mkpeephole.exe.pdb
> LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF'
> specification
> [886/886] LINK d8.exe d8.exe.pdb
> LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF'
> specification
>
> The build results are confusing, however.  In the "out" directory, I find
> the v8.dll, along with the icu*.dll files.  What seems to be missing are
> the static .lib files that were necessary in previous builds
> (v8_libbase.lib, v8_libplatform.lib and v8_nosnapshot.lib).  My build with
> new new v8 DLL does not seem to work without these.  So I attempted a
> static build, by adding the GN argument `is_component_build=false`.  To my
> surprise, no static libraries were generated at all!  Is this something
> that is planning on being supported in the future?  If not, what is the way
> around this?  I certainly don't want to transition my project to use GN.
> Thoughts?  Thanks in advance.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: Building with MSVC & GN - Where do the static files go?

2017-01-11 Thread Hans Maier
Ok, thanks for the Info. I will be using it as soon 5.7 becomes stable.

Am Mittwoch, 11. Januar 2017 10:46:05 UTC+1 schrieb Jochen Eisinger:
>
> With the latest dev version of V8 (5.7), you should be able to get static 
> libraries using the gn flag v8_static_library = true
>
> On Tue, Jan 10, 2017 at 4:26 PM Hans Maier  > wrote:
>
>> Hi,
>>
>> I had the same issue. I ended up creating the static libs from the 
>> obj-files using the MSVC lib tool manually.
>>
>> Unsatisfactory, but it was working for me.
>>
>> Am Montag, 9. Januar 2017 15:55:40 UTC+1 schrieb Brendan Bates:
>>>
>>> Hello,
>>>
>>> I have seen this issue pop up a couple times on here and wondering what 
>>> the current status is.  I was spending the morning trying to get ahead of 
>>> the game and switch from a Gyp build to a GN build.  We are using MSVC 2015 
>>> to perform the build.  I am successfully configuring and building using the 
>>> following commands:
>>>
>>> > gn gen out/x86.debug --args="is_debug=true v8_use_snapshot=false 
>>> target_cpu=\"x86\" disable_libfuzzer=true"
>>> Done. Made78 targets from 44 files in 1900ms
>>>
>>> > ninja-C out/x86.debug d8
>>> ninja: Entering directory `out.gn/x86.debug'
>>> [49/886] LINK mkpeephole.exe mkpeephole.exe.pdb
>>> LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' 
>>> specification
>>> [886/886] LINK d8.exe d8.exe.pdb
>>> LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' 
>>> specification
>>>
>>> The build results are confusing, however.  In the "out" directory, I 
>>> find the v8.dll, along with the icu*.dll files.  What seems to be missing 
>>> are the static .lib files that were necessary in previous builds 
>>> (v8_libbase.lib, v8_libplatform.lib and v8_nosnapshot.lib).  My build with 
>>> new new v8 DLL does not seem to work without these.  So I attempted a 
>>> static build, by adding the GN argument `is_component_build=false`.  To my 
>>> surprise, no static libraries were generated at all!  Is this something 
>>> that is planning on being supported in the future?  If not, what is the way 
>>> around this?  I certainly don't want to transition my project to use GN.  
>>> Thoughts?  Thanks in advance.
>>>
>> -- 
>> -- 
>> v8-users mailing list
>> v8-u...@googlegroups.com 
>> http://groups.google.com/group/v8-users
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "v8-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to v8-users+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] How to compile the samples/hello-world.cc example on ubuntu 64 bit ?

2017-01-11 Thread Jochen Eisinger
can you build a current version of V8 (using gn/ninja)?

On Fri, Jan 6, 2017 at 8:25 PM  wrote:

> Thank you for your answer Jochen Eisinger, but I tried this and it didn't
> work, of course. I couldn't switch to the 4.8 version of v8, I don't know
> why. Moreover, I would like to compile with an up-to-date version of v8.
>
>
> Le lundi 2 janvier 2017 09:39:30 UTC+1, Jochen Eisinger a écrit :
>
> https://github.com/v8/v8/wiki/Getting%20Started%20with%20Embedding explains
> how to compile the sample
>
> note that if you build all of v8, the hello world sample will be compiled
> automatically
>
> On Sun, Dec 25, 2016 at 8:39 PM  wrote:
>
> Hello everyone,
>
> I am new to v8. I am trying to achieve something that should be easy, but
> I just can't get it right.
>
> I have downloaded v8 via depot-tools and built it via make x64, and now I
> am trying to compile the hello-world example which is given in the
> "samples" folder.
> What command am I supposed to type in ubuntu terminal for this to work,
> please ?
>
> I have tried g++ hello-world.cc -o hello -I. but that fails with the
> following error :
>
> In file included from hello-world.cc:9:0:
> include/libplatform/libplatform.h:8:44: fatal error:
> libplatform/libplatform-export.h: No such file or directory
> compilation terminated.
>
> Thank you.
>
> --
> --
> v8-users mailing list
>
> v8-u...@googlegroups.com
>
>
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+u...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[v8-users] Re: understanding v8 Inspector client

2017-01-11 Thread Harsha HS
Hi ibon,

 Do you have any sample code base of integrating chrome-dev inspector with 
embedded v8?

Thanks,
-Harsha

On Tuesday, December 20, 2016 at 2:00:50 PM UTC+5:30, ibon tolosana wrote:
>
> Hi Alexey,
>
> thanks for the answer.
>
> I figured out what was happening on my side. Basically a threading issue:
> My app's v8 thread got blocked on runMessageLoopOnPause, so now i make a 
> synchronous runMessageLoopOnPause execution. Before, i was exiting 
> runMessageLoopOnPause to make an asynchronous loop for it, which made 
> debugger breakpoints not work (already left runMessageLoopOnPause). I get 
> now correctly notified on quitMessageLoopOnPause after sinking all 
> inspector messages.
>
> Embedded v8 Inspector integration with chrome dev tools is simply sweet. 
> Thanks for the hard work !!!
>
> Best,
>
> - i
>
> El martes, 20 de diciembre de 2016, 8:47:32 (UTC+1), Alexey Kozyatinskiy 
> escribió:
>>
>> Hi,
>>
>> When JavaScript execution is paused (e.g. breakpoint is triggered) V8 
>> send to inspector (DevTools backend inside of V8) message with v8::Break 
>> type [1]. On this message inspector send via protocol Debugger.paused 
>> notification [2] and call V8InspectorClient::runMessageLoopOnPause method 
>> [3]. Client should run nested message loop and process following protocol 
>> commands from front-end there inside of this function until inspector 
>> doesn't call quitMessageLoopOnPause. When quitMessageLoopOnPause is called 
>> and after client finishes nested message loop then execution will be 
>> returned to inspector code and then JavaScript execution will be resumed.[4]
>> There is no complex logic inside of V8 related to pausing execution - 
>> execution is paused as long as runMessageLoopOnPause is running.
>>
>> You need to write own logic to pause other operations.
>>
>> [1] 
>> https://cs.chromium.org/chromium/src/v8/src/debug/debug.cc?rcl=0&l=1767
>> [2] 
>> https://cs.chromium.org/chromium/src/v8/src/inspector/v8-debugger.cc?rcl=1482193199&l=485
>> [3] 
>> https://cs.chromium.org/chromium/src/v8/src/inspector/v8-debugger.cc?rcl=1482193199&l=491
>> [4] 
>> https://cs.chromium.org/chromium/src/v8/src/inspector/v8-debugger.cc?rcl=1482193199&l=493
>>
>> Thanks,
>> Aleksey.
>>
>> On Monday, December 19, 2016 at 7:32:13 AM UTC-8, ibon tolosana wrote:
>>>
>>> Hi,
>>>
>>> i have successfully integrated remote debugging through chrome dev tools 
>>> to an embedded v8 in an android app. 
>>> I can see v8's loaded source code, do profiling, memory dumps, etc., but 
>>> JS debugging is not working as expected.
>>>
>>> Whenever the debugger hits a breakpoint, the session channel sends a 
>>> `{"method":"Debugger.paused"...` message to dev tools frontend.
>>> After that, InspectorClient has its method `runMessageLoopOnPause` 
>>> called from V8Debugger, and here is where things don't fully work on my 
>>> side.
>>>
>>> The JS execution gets only stopped if I don't exit 
>>> `runMessageLoopOnPause` method. Otherwise, I would get some debugger 
>>> information, like evaluated variables values, but the javascript execution 
>>> is not stopped.
>>>
>>> My project is quite complex, where several different operations are 
>>> wired to javascript, like touch or timers.
>>> I assume all external js calls should be disabled while running 
>>> `runMessageLoopOnPause`, maybe until `quitMessageLoopOnPause` is called ?. 
>>> However, this is just guessing. For a simpler example, where just some 
>>> javascript is compiled and run, w/o threading or external stuff working, 
>>> remote debugger works just fine.
>>>
>>> Could anyone point me to a place where i could read about what i am 
>>> supposed to do on these methods ? Any hints on how to handle debugger 
>>> interaction at this point would be highly appreciated.
>>>
>>> Thanks.
>>>
>>>
>>>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Cannot build latest v8_android on ubuntu 14.04 or 16.04

2017-01-11 Thread bruno fortunato
To be honest, I've tried with android-ndk-11c and it works. With embedded 
ndk (12b) not works

On Wednesday, January 11, 2017 at 2:30:24 PM UTC+1, Jochen Eisinger wrote:
>
> hey,
>
> the latest v8 only supports GN for building. If you create an gn config 
> with these args:
>
> target_os = "android"
> target_cpu = "arm"
>
> you should get an android arm build.
>
> best
> -jochen
>
> On Sat, Jan 7, 2017 at 6:19 PM bruno fortunato  > wrote:
>
> I'm trying to build v8 for android on ubuntu without success.
>
> The compile process works fine, but I've an error on link step.
> Can someone help me?
>
> I've attached a dockerfile to run a docker container that reproduce the 
> problem
>
> Tnx a lot!
>
> root@235890ee3cb4:/v8/v8# make android_arm.release snapshot=off 
> i18nsupport=off
>
> make[1]: Entering directory `/v8/v8'
>
> make[2]: Entering directory `/v8/v8/out'
>
>   LINK(target) /v8/v8/out/android_arm.release/d8
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> std::__ndk1::basic_filebuf 
> >::setbuf(char*, int): error: undefined reference to 'operator 
> delete[](void*)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> std::__ndk1::basic_filebuf 
> >::setbuf(char*, int): error: undefined reference to 'operator 
> delete[](void*)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> std::__ndk1::basic_filebuf 
> >::setbuf(char*, int): error: undefined reference to 'operator 
> new[](unsigned int)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> std::__ndk1::basic_filebuf 
> >::setbuf(char*, int): error: undefined reference to 'operator 
> new[](unsigned int)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> v8::(anonymous 
> namespace)::MockArrayBufferAllocator::~MockArrayBufferAllocator(): error: 
> undefined reference to 'operator delete(void*)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> std::__ndk1::basic_ios 
> >::~basic_ios(): error: undefined reference to 'operator delete(void*)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> std::__ndk1::basic_streambuf 
> >::~basic_streambuf(): error: undefined reference to 'operator 
> delete(void*)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> std::__ndk1::basic_filebuf 
> >::~basic_filebuf(): error: undefined reference to 'operator 
> delete[](void*)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> std::__ndk1::basic_filebuf 
> >::~basic_filebuf(): error: undefined reference to 'operator 
> delete[](void*)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> std::__ndk1::basic_filebuf 
> >::~basic_filebuf(): error: undefined reference to 'operator delete(void*)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> std::__ndk1::basic_filebuf 
> >::imbue(std::__ndk1::locale const&): error: undefined reference to 
> 'operator new[](unsigned int)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> std::__ndk1::basic_filebuf 
> >::imbue(std::__ndk1::locale const&): error: undefined reference to 
> 'operator new[](unsigned int)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> std::__ndk1::__hash_table,
>  
> std::__ndk1::basic_string, 
> std::__ndk1::allocator > >, 
> std::__ndk1::__unordered_map_hasher, 
> std::__ndk1::__hash_value_type, 
> std::__ndk1::basic_string, 
> std::__ndk1::allocator > >, v8::(anonymous 
> namespace)::ModuleEmbedderData::ModuleGlobalHash, false>, 
> std::__ndk1::__unordered_map_equal, 
> std::__ndk1::__hash_value_type, 
> std::__ndk1::basic_string, 
> std::__ndk1::allocator > >, 
> std::__ndk1::equal_to >, true>, 
> std::__ndk1::allocator, 
> std::__ndk1::basic_string, 
> std::__ndk1::allocator > > > >::__rehash(unsigned int): error: 
> undefined reference to 'operator new(unsigned int)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> v8::(anonymous 
> namespace)::InitializeModuleEmbedderData(v8::Local): error: 
> undefined reference to 'operator new(unsigned int)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> v8::Shell::ReadBuffer(v8::FunctionCallbackInfo const&): error: 
> undefined reference to 'operator new(unsigned int)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:function 
> v8::(anonymous namespace)::GetWorkingDirectory(): error: undefined 
> reference to 'operator new(unsigned int)'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:vtable for 
> v8::ArrayBuffer::Allocator: error: undefined reference to 
> '__cxa_pure_virtual'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:vtable for 
> v8::ArrayBuffer::Allocator: error: undefined reference to 
> '__cxa_pure_virtual'
>
> /v8/v8/out/android_arm.release/obj.target/d8/src/d8.o:d8.cc:vtable for 
> v8::ArrayBuffer::Allocator: erro

[v8-users] How to build v8 arm for android on ubuntu

2017-01-11 Thread lvfulong0604


I build follow the doc.

1.) Install Git 

2.) Install depot_tools 


3.) Update depot_tools by executing the following into your terminal/shell:

gclient

4.) Go into the directory where you want to download the V8 source into and 
execute the following in your terminal/shell:

fetch v8
cd v8

5.) Make sure that you are in the V8 source directory. If you followed every 
step up until step 4.) you already should be at the right location.

6.) Download all the build dependencies by executing the following in your 
terminal/shell:

gclient sync

7.) Generate the necessary build files by executing the following in your 
terminal/shell:
*gn gen out.gn\myandroid --args='is_debug = false target_cpu = "arm" 
v8_target_cpu = "arm" target_os="android" is_component_build = false 
v8_use_snapshot = false v8_enable_i18n_support = false'*

8.) Compile the source by executing the following in your terminal/shell:

*ninja -C out.gn/myandroid.release*

Build success with no error.but only output libv8_libplatform.a 
and libv8_libbase.a.The other target is nothing.


What does "clang_x86_v8_arm" mean?? android emulator?? 

How to build v8 arm for android on ubuntu?


-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.