Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Added cmake-extras to dependencies- Fixes some build from source issues #1778

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ $ sudo apt install build-essential cmake cmake-data debhelper dbus google-mock \
libboost-thread-dev libcap-dev libexpat1-dev libsystemd-dev libegl1-mesa-dev \
libgles2-mesa-dev libglm-dev libgtest-dev liblxc1 \
libproperties-cpp-dev libprotobuf-dev libsdl2-dev libsdl2-image-dev lxc-dev \
pkg-config protobuf-compiler python3-minimal
pkg-config protobuf-compiler python3-minimal cmake-extras libelf-dev libdwarf-dev binutils-dev libdw-dev
```
We recommend Ubuntu 20.04 (focal) as your build environment.

Expand All @@ -122,7 +122,23 @@ $ cd anbox
$ mkdir build
$ cd build
$ cmake ..
$ make
$ make -j$(nproc)
```
#### cmake error: no cpu_features
FCLC marked this conversation as resolved.
Show resolved Hide resolved

```
documenting here for later: `
when running cmake .. in anbox/build (or when running cmake . in root of source tree) it is possible that cmake complains about not having cpu_features.

cpu_features is a google open source project to be able to detect the features of the host architecture at compile time to maximize efficiency on target platform.

As such, if it errors out:
cd ../external
rm -rf cpu_features
git clone https://github.com/google/cpu_features.git
cd ../build
cmake ..
../make -j$(nproc)`
```

A simple
Expand Down
37 changes: 37 additions & 0 deletions docs/build-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,40 @@ prevents anything from the outside to see its mount points.

The *cache* and *data* directories are bind-mounted into the rootfs at *rootfs/data*
and *rootfs/cache*.


## Trouble shooting:

#### repo init
It may be that you have trouble initializing the repository with errors similiar to
```
anbox-work/mount/.repo/repo/main.py", line 79
file=sys.stderr)
^
SyntaxError: invalid syntax
```

This is almost always due to the system attempting to use python 2 instead of python 3. A "nuclear" option to get around this issue is to remove python2 completely and force the system to only use python 3.
```sudo apt remove python2* ```
```repo init ```
It should return
```/usr/bin/env: 'python': No such .... ```
This means that repo tried to call python, and the system was trying to point to python2 instead of python3

to confirm that python 2 was completely gone
```env | grep pyth* ```
which should only show python 3 entries

after that run
```whereis python3```
which will return all known instances of "python3*"

from there
```sudo ln -sf /usr/bin/python3 /usr/bin/python ```
followed by
``` repo init -u https://github.com/anbox/platform_manifests.git -b anbox ```
```
repo sync -j$(nproc)
```

And you should be up and running