Fixed. So it turns out it was a matter of the order of the libs handed to the linker. Assuming after compilation different libs are created for base, platform, etc, the correct order in the .mk should be:
1. base - (external_snapshot, snapshot) or (nosnapshot) depending on your needs 2. libplatform 3. libbase 4. libsampler With this, all linker symbols are found correctly: LOCAL_STATIC_LIBRARIES := v8_base v8_nosnapshot v8_libplatform v8_libbase v8_libsampler Thanks. El martes, 1 de noviembre de 2016, 21:06:37 (UTC+1), ibon tolosana escribió: > > Hi Rodolph, > > yes, I did follow that instructions. > What surprises me most is that v8::base::SysInfo::NumberOfProcessors > exists on the libv8_libplatform.a, but the linker seems to pass on it. > > I fixed by defining the symbol myself though. > Thanks. > > - ibon > > El domingo, 30 de octubre de 2016, 0:47:22 (UTC+2), Rodolph Perfetta > escribió: >> >> I see. I don't have experience with Android builds but have you checked >> the wiki: https://github.com/v8/v8/wiki/D8%20on%20Android >> >> Rodolph >> >> On Fri, 28 Oct 2016 at 22:15 ibon tolosana <ibon.t...@gmail.com> wrote: >> >>> Hi Rodolph, sorry, I did not explain myself properly. >>> I compiled for pi successfully. As a different compilation. Nothing to >>> do with this. >>> >>> Now i try to compile v8 for android. >>> And i get that missing symbol. >>> >>> Sorry for the misunderstanding. >>> >>> thanks. >>> >>> >>> El viernes, 28 de octubre de 2016, 20:48:19 (UTC+2), Rodolph Perfetta >>> escribió: >>> >>>> Hi, >>>> >>>> I am not sure I follow what you are doing: if your cross compilation >>>> was successful why do you need to build and link mksnapshot again? >>>> Secondly >>>> cross compiling for raspberry will target arm linux, but the lines you >>>> posted reference android_arm. Did you intend to mix both target? >>>> >>>> Rodolph >>>> >>>> On Fri, 28 Oct 2016 at 12:12 ibon tolosana <ibon.t...@gmail.com> wrote: >>>> >>> Hi, >>>>> >>>>> after successfully cross-compiling v8 for raspberry I am getting a >>>>> linker error on both ubuntu16.04 and and CentOS 7.2. >>>>> I am getting this: >>>>> >>>>> CXX(host) >>>>> /data/build/v8/out/android_arm.release/obj.host/mksnapshot/src/snapshot/mksnapshot.o >>>>> LINK(host) /data/build/v8/out/android_arm.release/mksnapshot >>>>> /data/build/v8/out/android_arm.release/obj.host/src/libv8_libplatform.a(/data/build/v8/out/android_arm.release/obj.host/v8_libplatform/src/libplatform/default-platform.o):../src/libplatform/default-platform.cc:function >>>>> >>>>> v8::platform::CreateDefaultPlatform(int): error: *undefined reference >>>>> to 'v8::base::SysInfo::NumberOfProcessors()*' >>>>> /data/build/v8/out/android_arm.release/obj.host/src/libv8_libplatform.a(/data/build/v8/out/android_arm.release/obj.host/v8_libplatform/src/libplatform/default-platform.o):../src/libplatform/default-platform.cc:function >>>>> >>>>> v8::platform::DefaultPlatform::SetThreadPoolSize(int): error: *undefined >>>>> reference to 'v8::base::SysInfo::NumberOfProcessors()*' >>>>> >>>>> I have checked >>>>> /v8/out/android_arm.release/obj.host/v8_libbase/src/base/sys-info.o >>>>> and NumberOfProcessors function is there. >>>>> I have extracted sys-info.o from libv8_libbase.a and made sure >>>>> NumberOfProcessors is referenced there, but the linker get undefined >>>>> reference. >>>>> >>>>> Since the snapshot is not important to me, I have tried to link with >>>>> libv8_base.a libv8_libbase.a libv8_libplatform libv8_libsampler.a and >>>>> libv8_nosnapshot.a (instead of external snapshot) but i get the same >>>>> undefined referenced symbol. >>>>> >>>>> any ideas ? >>>>> help please ^^ >>>>> >>>>> thanks. >>>>> >>>>> - i >>>>> >>>>> -- >>>>> -- >>>>> 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-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.