Hello,

I build V8 for linux ARM64 using Ubuntu X64 OS using cross compiler. Now I 
am trying to build Hello_world application which is in the embed 
documentation <https://v8.dev/docs/embed>. I can build this for x64 but 
can't build this for ARM64 using V8 ARM64.

What would be the equivalent command for ARM64  ?
g++ -I. -Iinclude samples/hello-world.cc -o hello_world -fno-rtti 
-lv8_monolith -lv8_libbase -lv8_libplatform -ldl 
-Lout.gn/x64.release.sample/obj/ -pthread -std=c++17 -DV8_COMPRESS_POINTERS

FYI, I tried to build aarch64-linux-gnu-g++ but getting lot of errors. All 
of them are like - "undefined reference to `std:: "

/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
out.gn/arm64.release/obj//libv8_monolith.a(type-parser.o): in function 
`v8::base::Optional<std::Cr::vector<unsigned long, 
std::Cr::allocator<unsigned long> > > 
v8::internal::compiler::turboshaft::TypeParser::ParseSetElements<unsigned 
long>()':
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser16ParseSetElementsImEENS_4base8OptionalINSt2Cr6vectorIT_NS7_9allocatorIS9_EEEEEEv]+0x328):
 
undefined reference to `void std::Cr::__sort<std::Cr::__less<unsigned long, 
unsigned long>&, unsigned long*>(unsigned long*, unsigned long*, 
std::Cr::__less<unsigned long, unsigned long>&)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser16ParseSetElementsImEENS_4base8OptionalINSt2Cr6vectorIT_NS7_9allocatorIS9_EEEEEEv]+0x410):
 
undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser16ParseSetElementsImEENS_4base8OptionalINSt2Cr6vectorIT_NS7_9allocatorIS9_EEEEEEv]+0x438):
 
undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser16ParseSetElementsImEENS_4base8OptionalINSt2Cr6vectorIT_NS7_9allocatorIS9_EEEEEEv]+0x460):
 
undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
out.gn/arm64.release/obj//libv8_monolith.a(type-parser.o): in function 
`v8::base::Optional<unsigned long> 
v8::internal::compiler::turboshaft::TypeParser::ReadValue<unsigned long>()':
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser9ReadValueImEENS_4base8OptionalIT_EEv]+0x110):
 
undefined reference to `std::Cr::stoull(std::Cr::basic_string<char, 
std::Cr::char_traits<char>, std::Cr::allocator<char> > const&, unsigned 
long*, int)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
out.gn/arm64.release/obj//libv8_monolith.a(type-parser.o): in function 
`v8::base::Optional<std::Cr::vector<float, std::Cr::allocator<float> > > 
v8::internal::compiler::turboshaft::TypeParser::ParseSetElements<float>()':
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser16ParseSetElementsIfEENS_4base8OptionalINSt2Cr6vectorIT_NS7_9allocatorIS9_EEEEEEv]+0x324):
 
undefined reference to `void std::Cr::__sort<std::Cr::__less<float, 
float>&, float*>(float*, float*, std::Cr::__less<float, float>&)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser16ParseSetElementsIfEENS_4base8OptionalINSt2Cr6vectorIT_NS7_9allocatorIS9_EEEEEEv]+0x40c):
 
undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser16ParseSetElementsIfEENS_4base8OptionalINSt2Cr6vectorIT_NS7_9allocatorIS9_EEEEEEv]+0x434):
 
undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser16ParseSetElementsIfEENS_4base8OptionalINSt2Cr6vectorIT_NS7_9allocatorIS9_EEEEEEv]+0x45c):
 
undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
out.gn/arm64.release/obj//libv8_monolith.a(type-parser.o): in function 
`v8::base::Optional<float> 
v8::internal::compiler::turboshaft::TypeParser::ReadValue<float>()':
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser9ReadValueIfEENS_4base8OptionalIT_EEv]+0x10c):
 
undefined reference to `std::Cr::stof(std::Cr::basic_string<char, 
std::Cr::char_traits<char>, std::Cr::allocator<char> > const&, unsigned 
long*)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
out.gn/arm64.release/obj//libv8_monolith.a(type-parser.o): in function 
`v8::base::Optional<std::Cr::vector<double, std::Cr::allocator<double> > > 
v8::internal::compiler::turboshaft::TypeParser::ParseSetElements<double>()':
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser16ParseSetElementsIdEENS_4base8OptionalINSt2Cr6vectorIT_NS7_9allocatorIS9_EEEEEEv]+0x328):
 
undefined reference to `void std::Cr::__sort<std::Cr::__less<double, 
double>&, double*>(double*, double*, std::Cr::__less<double, double>&)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser16ParseSetElementsIdEENS_4base8OptionalINSt2Cr6vectorIT_NS7_9allocatorIS9_EEEEEEv]+0x410):
 
undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser16ParseSetElementsIdEENS_4base8OptionalINSt2Cr6vectorIT_NS7_9allocatorIS9_EEEEEEv]+0x438):
 
undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser16ParseSetElementsIdEENS_4base8OptionalINSt2Cr6vectorIT_NS7_9allocatorIS9_EEEEEEv]+0x460):
 
undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
out.gn/arm64.release/obj//libv8_monolith.a(type-parser.o): in function 
`v8::base::Optional<double> 
v8::internal::compiler::turboshaft::TypeParser::ReadValue<double>()':
type-parser.cc:(.text[_ZN2v88internal8compiler10turboshaft10TypeParser9ReadValueIdEENS_4base8OptionalIT_EEv]+0x10c):
 
undefined reference to `std::Cr::stod(std::Cr::basic_string<char, 
std::Cr::char_traits<char>, std::Cr::allocator<char> > const&, unsigned 
long*)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
out.gn/arm64.release/obj//libv8_monolith.a(instruction-scheduler.o): in 
function 
`v8::internal::compiler::InstructionScheduler::StressSchedulerQueue::PopBestCandidate(int)':
instruction-scheduler.cc:(.text+0xdc): undefined reference to 
`std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: 
out.gn/arm64.release/obj//libv8_monolith.a(instruction-scheduler.o): in 
function `void 
v8::internal::compiler::InstructionScheduler::Schedule<v8::internal::compiler::InstructionScheduler::StressSchedulerQueue>()':
instruction-scheduler.cc:(.text[_ZN2v88internal8compiler20InstructionScheduler8ScheduleINS2_20StressSchedulerQueueEEEvv]+0x418):
 
undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
collect2: error: ld returned 1 exit status

Thank you
Abdullah


-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/2a17c6e4-d68f-44e9-b102-7d953e084b96n%40googlegroups.com.

Reply via email to