compile hello-world.cc failed

43 views
Skip to first unread message

czczcheng

unread,
May 31, 2018, 8:30:30 AM5/31/18
to v8-users
args.gn(get the static library):
is_debug = false
target_cpu
= "x64"
is_component_build
= false
v8_static_library
= true
use_custom_libcxx
= false
use_custom_libcxx_for_host
= false
use_sysroot
=false
is_clang
=false


using g++ to compile the hello-world.cc by the static library
(copy the command from git)
g++ -I. -Iinclude samples/hello-world.cc -o hello-world -Wl,--start-group \
out.gn/x64.release/obj/{libv8_{base,libbase,external_snapshot,libplatform,libsampler},\
third_party
/icu/libicu{uc,i18n},src/inspector/libinspector}.a \
-Wl,--end-group -lrt -ldl -pthread -std=c++0x


/usr/bin/ld: out.gn/x64.release/obj/v8_base/pipeline.o: unrecognized relocation (0x2a) in section `.text._ZN2v88internal8compiler15AdvancedReducerD2Ev[_ZN2v88internal8compiler15AdvancedReducerD5Ev]'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

I find AdvancedReducer is a class of graph-reducer.h, but i don't know why。

Does anyone know?

Ben Noordhuis

unread,
Jun 1, 2018, 3:51:04 AM6/1/18
to v8-users
It's almost certainly a a compiler/linker mismatch. Your compiler
emits a directive that your linker doesn't understand, so either
downgrade the former or upgrade the latter.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages