lifting-bits / remill

Library for lifting machine code to LLVM bitcode
Apache License 2.0
1.22k stars 142 forks source link

Build fail on Ubuntu 22.04, ARMv8 #641

Closed aqjune closed 1 year ago

aqjune commented 1 year ago

Hi all,

While following through the installation guide using build.sh, I am seeing this error:

ubuntu@ip-172-31-10-5:~$ ./remill/scripts/build.sh
[x] Ubuntu jammy is not supported. Only xenial (16.04) and trusty (14.04) are supported.
[-] Library version is vcpkg__llvm-15_arm64
~/lifting-bits-downloads ~/remill-build
Fetching: https://github.com/lifting-bits/cxx-common/releases/download/v0.2.12/vcpkg__llvm-15_arm64.tar.xz and placing in /home/ubuntu/lifting-bits-downloads
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     9  100     9    0     0    116      0 --:--:-- --:--:-- --:--:--   118
+ tar -xJf vcpkg__llvm-15_arm64.tar.xz --warning=no-timestamp
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now
[x] Unable to download vcpkg libraries build vcpkg__llvm-15_arm64.
[x] Build aborted.

Does anyone have any idea about this?

ekilmer commented 1 year ago

Hello! There are a few things going on here...

First, the error message about only supporting xenial (16.04) and trusty (14.04) is wrong. We only translate for Ubuntu 20.04, so your distribution, 22.04, is not supported yet by the build script.

Second, our pre-built releases do not support ARM64 anymore. I have opened an issue to track support for this (through cross-compilation) on GitHub Actions.

To work around these issues, you will need to build cxx-common on your machine. Follow the directions here. Note, you will probably want to pass --release to the build_dependencies.sh script to get similar binaries to what is in cxx-common releases; this will build Release build type only. If you do not pass --release, then you will build a Debug version of LLVM, which can take 100GB+ of disk space.

aqjune commented 1 year ago

I see, thank you for a reply! Maybe I can try remill on my x86-64 EC2 instance instead.