Re: [v8-users] standalone static library
I put libstdc++ in my library list, even try to link it statically but nothing changes. Is there any way else to do it? On Thursday, March 22, 2018 at 7:42:23 PM UTC-3, Zac Hansen wrote: > > I believe the std:: issues are from you linking v8 compiled with libc++ > against libstdc++. > > On Thursday, March 22, 2018 at 3:37:50 PM UTC-7, Eduardo Bolis wrote: >> >> These are the first error lines (there are hundreds of them): >> >> g++ -o dist/Debug/GNU-Linux/teste-v8 build/Debug/GNU-Linux/main.o >> -L/home/eduardo/workspace/v8-master/v8/out.gn/x64.release/obj >> -L/home/eduardo/workspace/v8-master/v8/ >> out.gn/x64.release/obj/third_party/icu -lv8_base -lv8_libbase >> -lv8_external_snapshot -lv8_libplatform -lv8_libsampler -licuuc -licui18n >> -lrt -ldl -pthread -std=c++11 >> >> build/Debug/GNU-Linux/main.o: na função `main': >> >> /home/eduardo/Apps/projetos/teste-v8/main.cpp:25: referência indefinida >> para `v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, >> v8::platform::InProcessStackDumping, std::unique_ptr> std::default_delete >)' >> /home/eduardo/workspace/v8-master/v8/ >> out.gn/x64.release/obj/libv8_base.a(api.o): na função >> `v8::SnapshotCreator::CreateBlob(v8::SnapshotCreator::FunctionCodeHandling)': >> api.cc:(.text._ZN2v815SnapshotCreator10CreateBlobENS0_20FunctionCodeHandlingE+0xd27): >> >> referência indefinida para >> `std::__1::__vector_base_common::__throw_length_error() const' >> api.cc:(.text._ZN2v815SnapshotCreator10CreateBlobENS0_20FunctionCodeHandlingE+0xd33): >> >> referência indefinida para >> `std::__1::__vector_base_common::__throw_length_error() const' >> /home/eduardo/workspace/v8-master/v8/ >> out.gn/x64.release/obj/libv8_base.a(api.o): na função >> `v8::WasmModuleObjectBuilderStreaming::WasmModuleObjectBuilderStreaming(v8::Isolate*)': >> api.cc:(.text._ZN2v832WasmModuleObjectBuilderStreamingC2EPNS_7IsolateE+0x282): >> >> referência indefinida para `std::__1::__shared_weak_count::__release_weak()' >> api.cc:(.text._ZN2v832WasmModuleObjectBuilderStreamingC2EPNS_7IsolateE+0x2ae): >> >> referência indefinida para `std::__1::__shared_weak_count::__release_weak()' >> /home/eduardo/workspace/v8-master/v8/ >> out.gn/x64.release/obj/libv8_base.a(api.o): na função >> `v8::WasmModuleObjectBuilderStreaming::~WasmModuleObjectBuilderStreaming()': >> api.cc:(.text._ZN2v832WasmModuleObjectBuilderStreamingD2Ev+0x82): >> referência indefinida para `std::__1::__shared_weak_count::__release_weak()' >> /home/eduardo/workspace/v8-master/v8/ >> out.gn/x64.release/obj/libv8_base.a(api.o): na função >> `v8::debug::Script::LineEnds() const': >> api.cc:(.text._ZNK2v85debug6Script8LineEndsEv+0x2ce): referência >> indefinida para >> `std::__1::__vector_base_common::__throw_length_error() const' >> /home/eduardo/workspace/v8-master/v8/ >> out.gn/x64.release/obj/libv8_base.a(api.o): na função >> `v8::debug::Coverage::FunctionData::GetBlockData(unsigned long) const': >> api.cc:(.text._ZNK2v85debug8Coverage12FunctionData12GetBlockDataEm+0x5e): >> referência indefinida para >> `std::__1::__vector_base_common::__throw_out_of_range() const' >> /home/eduardo/workspace/v8-master/v8/ >> out.gn/x64.release/obj/libv8_base.a(api.o): na função >> `v8::debug::Coverage::ScriptData::GetFunctionData(unsigned long) const': >> api.cc:(.text._ZNK2v85debug8Coverage10ScriptData15GetFunctionDataEm+0x5d): >> referência indefinida para >> `std::__1::__vector_base_common::__throw_out_of_range() const' >> /home/eduardo/workspace/v8-master/v8/ >> out.gn/x64.release/obj/libv8_base.a(api.o): na função >> `v8::debug::Coverage::ScriptData::ScriptData(unsigned long, >> std::__1::shared_ptr)': >> >> The "main.cpp" file is just a copy of "hello_world.cc" from V8. >> From what I can see, these are internal errors of libraries, not of >> source code. >> I believe that not all object files are embedded in them, but I have no >> idea why. >> > -- -- 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] standalone static library
I took a look at the v8_shell Ninja script and it is compiled against dozen of object files, not libraries. I will try to take all this files and make a library using the "ar" and ranlib linux commands. Hope it works. Any result I get, I post here, for sure, but I've wasted too much time (almost two months) on something I did not even think I'd need. So I'm starting to wonder if this project is really feasible ... On Wednesday, March 21, 2018 at 3:04:21 PM UTC-3, Jakob Kummerow wrote: > > I would hope that NetBeans provides a way to configure it such that V8 is > compiled with V8's own build process, and your embedding project's code > with whatever system you choose to use (which might be whatever NetBeans > uses by default); but I don't know how to set that up, sorry. V8's build > process is fairly complicated, so it is expected that you can't just tell > an IDE "here are the .cc files, now do your thing and build". The example > from our documentation shows you a way how it's possible to build V8 with > GN as usual, and then have your own code link against that. The example > does it by hand; it is up to you to figure out how to integrate those steps > into any other workflows/tools you might want to use. Feel free to post > your findings to this mailing list so that others can benefit! > > > -- -- 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] standalone static library
These are the first error lines (there are hundreds of them): g++ -o dist/Debug/GNU-Linux/teste-v8 build/Debug/GNU-Linux/main.o -L/home/eduardo/workspace/v8-master/v8/out.gn/x64.release/obj -L/home/eduardo/workspace/v8-master/v8/out.gn/x64.release/obj/third_party/icu -lv8_base -lv8_libbase -lv8_external_snapshot -lv8_libplatform -lv8_libsampler -licuuc -licui18n -lrt -ldl -pthread -std=c++11 build/Debug/GNU-Linux/main.o: na função `main': /home/eduardo/Apps/projetos/teste-v8/main.cpp:25: referência indefinida para `v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::unique_ptr >)' /home/eduardo/workspace/v8-master/v8/out.gn/x64.release/obj/libv8_base.a(api.o): na função `v8::SnapshotCreator::CreateBlob(v8::SnapshotCreator::FunctionCodeHandling)': api.cc:(.text._ZN2v815SnapshotCreator10CreateBlobENS0_20FunctionCodeHandlingE+0xd27): referência indefinida para `std::__1::__vector_base_common::__throw_length_error() const' api.cc:(.text._ZN2v815SnapshotCreator10CreateBlobENS0_20FunctionCodeHandlingE+0xd33): referência indefinida para `std::__1::__vector_base_common::__throw_length_error() const' /home/eduardo/workspace/v8-master/v8/out.gn/x64.release/obj/libv8_base.a(api.o): na função `v8::WasmModuleObjectBuilderStreaming::WasmModuleObjectBuilderStreaming(v8::Isolate*)': api.cc:(.text._ZN2v832WasmModuleObjectBuilderStreamingC2EPNS_7IsolateE+0x282): referência indefinida para `std::__1::__shared_weak_count::__release_weak()' api.cc:(.text._ZN2v832WasmModuleObjectBuilderStreamingC2EPNS_7IsolateE+0x2ae): referência indefinida para `std::__1::__shared_weak_count::__release_weak()' /home/eduardo/workspace/v8-master/v8/out.gn/x64.release/obj/libv8_base.a(api.o): na função `v8::WasmModuleObjectBuilderStreaming::~WasmModuleObjectBuilderStreaming()': api.cc:(.text._ZN2v832WasmModuleObjectBuilderStreamingD2Ev+0x82): referência indefinida para `std::__1::__shared_weak_count::__release_weak()' /home/eduardo/workspace/v8-master/v8/out.gn/x64.release/obj/libv8_base.a(api.o): na função `v8::debug::Script::LineEnds() const': api.cc:(.text._ZNK2v85debug6Script8LineEndsEv+0x2ce): referência indefinida para `std::__1::__vector_base_common::__throw_length_error() const' /home/eduardo/workspace/v8-master/v8/out.gn/x64.release/obj/libv8_base.a(api.o): na função `v8::debug::Coverage::FunctionData::GetBlockData(unsigned long) const': api.cc:(.text._ZNK2v85debug8Coverage12FunctionData12GetBlockDataEm+0x5e): referência indefinida para `std::__1::__vector_base_common::__throw_out_of_range() const' /home/eduardo/workspace/v8-master/v8/out.gn/x64.release/obj/libv8_base.a(api.o): na função `v8::debug::Coverage::ScriptData::GetFunctionData(unsigned long) const': api.cc:(.text._ZNK2v85debug8Coverage10ScriptData15GetFunctionDataEm+0x5d): referência indefinida para `std::__1::__vector_base_common::__throw_out_of_range() const' /home/eduardo/workspace/v8-master/v8/out.gn/x64.release/obj/libv8_base.a(api.o): na função `v8::debug::Coverage::ScriptData::ScriptData(unsigned long, std::__1::shared_ptr)': The "main.cpp" file is just a copy of "hello_world.cc" from V8. >From what I can see, these are internal errors of libraries, not of source code. I believe that not all object files are embedded in them, but I have no idea why. -- -- 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] standalone static library
Yes, I did. The examples created in the build process (Hello World, Shell, etc) works fine. But when I try to compile them from Netbeans, there are lot of libraries internal reference errors (if you wish, I will put an example here). and the compile line code from the turorial references a file (src/inspector/libinspector.a) that doesn't exist in my V8 directories. I don't know if there was a config error in my process or the doc is deprecated. I see no troubles, in the future, to use GN to compile my project with V8, but under the development stage I need an IDE facility (like Netbeans) to work. I want to know if is possible to create a GN or Ninja script to make a single library file; if so, I will follow this way, and try to create this script (or if anyone already did it, please, tell me where to find). thanks, Eduardo -- -- 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] standalone static library
Hi, I successfully build V8 on Ubuntu 17 with GN, but what it generates is a set of static libraries and object files that I have no idea how to embedded into my project. I found an article that said: "Under gn, there is no way to have v8 build as a standalone static library." So, I ask if anyone knows how to use it. I am working with Netbeans/C++, and everything i tryed results in a lot of link errors. regards, Eduardo Bolis -- -- 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.