On Fri, Nov 1, 2024 at 3:02 AM Justin Ferguson <[email protected]> wrote: > > Hello, > > I'm trying to compile the sample hello world program as exhibited in the > embedding v8 howto. The compile of v8 goes fine, however when I try to build > the sample application I get the following: > > $ g++ -I. -Iinclude samples/hello-world.cc -o hello_world -fno-rtti > -lv8_monolith -lv8_libbase -lv8_libplatform -ldl -Lout.gn/x64.release/obj/ > -pthread -std=c++20 -DV8_COMPRESS_POINTERS -DV8_ENABLE_SANDBOX > /usr/bin/ld: out.gn/x64.release/obj//libv8_monolith.a(default-platform.o): > unknown type [0x40000014] section `.crel.text' > /usr/bin/ld: > out.gn/x64.release/obj//libv8_monolith.a(default-thread-isolated-allocator.o): > unknown type [0x40000014] section `.crel.text' > /usr/bin/ld: > out.gn/x64.release/obj//libv8_monolith.a(default-worker-threads-task-runner.o): > unknown type [0x40000014] section `.crel.text' > [ several pages of this] > /usr/bin/ld: skipping incompatible > out.gn/x64.release/obj//libv8_libplatform.a when searching for > -lv8_libplatform > /usr/bin/ld: cannot find -lv8_libplatform: No such file or directory > collect2: error: ld returned 1 exit status > > Googling around I see that usually the 'skipping incompatible...' error > relates to mismatching 32-bit and 64-bit builds which is not the case here (I > checked the object files with file). > > v8 source was pulled down and is current as of today and: > > $ g++ --version > g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 > Copyright (C) 2021 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $ cat /etc/debian_version > bookworm/sid > > Any suggestions? > > Best Regards, > > Justin N. Ferguson
Try clang++; I don't think g++/binutils supports CREL yet. You can also try to build V8 with g++ (is_clang=false) -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/v8-dev/CAHQurc8XW8MCXbD1YTM1UWLsJ8Ps%3DhFvwXSUijonZ6Uq0WXQ3w%40mail.gmail.com.
