How to create libv8_data.a and libv8_base.a files for arm64 architecture using script depends/v8_data_lib.py?

+4 votes
  1. I am cross-compiling multichain 2.0.1 for arm64 architecture running ubuntu 18.04 LTS. 
  2. I have successfully cross-compiled V8 version 6.8.290 for arm64 and further copied compiled v8/ directory to v8build/ directory of multichain.
  3. I have all necessary libv8_XXX.a files in V8 directory except libv8_base.a and libv8_data.a files.
  4. I tried to generate both these files using given script v8_data_lib.py. Although it creates libv8_data.a file, it is incompatible with arm64.
  5. Now, to proceed with the compilation, I need to generate libv8_base.a and libv8_data.a files and put it into arm64.release/obj directory. However, I don't know how to do that.
  6. Any help in this regard is appreciated. Thanks!
asked Apr 12, 2019 by Aditya
Hi Aditya, I am trying to set multichain for raspberry pi3 and I am facing similar errors when I use prebuilt libraries of v8 by multichain for linux:
In case you found any solution, please can you help or share the prebuilt libraries
My error:
/usr/bin/ld: skipping incompatible ../v8build/v8/out.gn/x64.release/obj/libv8_data.a when searching for -lv8_data
/usr/bin/ld: cannot find -lv8_data

1 Answer

+1 vote
Currently, multichain is using NASM i.e 8086 Assembler that does this required assembling for .o files into .a

Instead using equivalent gas - i.e GNU's assembler should do the trick. on non-nasm compatible arch. However that means investing time to re-write GAS equivalent instructions for NASM's instructions.
answered Apr 15, 2019 by harsha
Hi harsha, In similar lines I have managed to cross compile v8 for arm 64 ( raspberry pi3) and ubuntu mate os, but still while in make phase, the libv8_data.a is not recognised, is there something I should do
Error:  /usr/bin/ld: cannot find -lv8_data .
...