dotnet / dotnet/android

[build] make all in xamarin-android repo produce an error ```MSB3073: The command ""/root/android-toolchain/jdk-17/bin/javac" src/test/resources/com/microsoft/android/Outer.java" exited with code 1```

Open
#8,586 3 comments 0 reactions 2 assignees Claimed by @jonathanpeppers View on GitHub
Area: dotnet/android Build
Dominant language
C#
Stars
2.1k
Forks
579
Avg merge
1d 19h
Merged PRs (30d)
252

Description

### Android application type

.NET Android (net7.0-android, net8.0-android, etc.)

### Affected platform version

debian:bookworm-slim, NET 8.0

### Description

The command `make prepare` works ok.
However, when commands `make` or ```make jenkins ALL_HOST_ABIS="$(uname)" ALL_AOT_ABIS=""``` are executed they display an error:
```
error MSB3073: The command ""/root/android-toolchain/jdk-17/bin/javac" src/test/resources/com/microsoft/android/Outer.java" exited with code 1. 
```

### Steps to Reproduce

1. use fresh debian:bookworm-slim
2. clone the xamarin-android repo ( last commit for now is 4eb515499d623fd26b636d95db95f241c696f2f4)
3. install all necessary dependencies mentioned in [dependecies.md](https://github.com/xamarin/xamarin-android/blob/main/Documentation/building/unix/dependencies.md)
4. `make prepare`
5. `make` or ```make jenkins ALL_HOST_ABIS="`uname`" ALL_AOT_ABIS=""```
___

# Reproduce via Dockerfile

Another way to reproduce the issue is to use Dockerfile below (it is feasible to attach to a container and debug the build inside the container with Visual Studio Code):
```Dockerfile
FROM debian:bookworm-slim AS xamarin-android

ARG DOTNET_SDK_VERSION="8.0"
ARG TZ="UTC"
ENV TZ=${TZ}

# to avoid "failed to fetch" errors during apt update ...
RUN echo 'Acquire::http::Timeout "900";\nAcquire::ftp::Timeout "900";\nAcquire::Retries "10";\nAcquire::Queue-Mode "access";' > /etc/apt/apt.conf.d/99timeout

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
wget \
&& rm -rf /var/lib/apt/lists/*

RUN apt-get update && apt-get install -y --fix-missing \
libncurses-dev \
autoconf \
autotools-dev \
automake \
ccache \
cmake \
build-essential \
cli-common-dev \
curl \
devscripts \
gcc \
g++ \
git \
libtool \
linux-libc-dev \
make \
ninja-build \
p7zip-full \
sqlite3 \
vim-common \
zlib1g-dev \
lib32stdc++6 \
lib32z1 \
libtool-bin \
libncurses5-dev \
&& rm -rf /var/lib/apt/lists/*

RUN <
"/xamarin-android/external/Java.Interop/tools/java-source-utils/java-source-utils.csproj" (default target) (50:8) ->
(_CompileTestResources target) ->
/xamarin-android/external/Java.Interop/tools/java-source-utils/java-source-utils.targets(51,5): error MSB3073: The command ""/root/android-toolchain/jdk-17/bin/javac" src/test/resources/com/microsoft/android/Outer.java" exited with code 1. [/xamarin-android/external/Java.Interop/tools/java-source-utils/java-source-utils.csproj]

466 Warning(s)
1 Error(s)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.