All Builds Fails 'linux/user.h' file not found'

Bitrise Build Issue Report template

Description of the issue

/bitrise/src/app/src/main/jni/radvision/include/rvadthread_t.h:24:10: fatal error: ‘linux/user.h’ file not found
#include <linux/user.h>
1 warning and 1 error generated.
make: Leaving directory `/bitrise/src/app/src/main/jni’

Environment:

Where did the issue happen?

On Bitrise

Which stack?

Android & Docker, on Ubuntu 14.04 - LTS Stack

Which build Step causes the issue and which version of the step?

NDK Build 1.1.5

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? : EVERYTIME
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : 21st of this month

Local reproduction

_Can it be reproduced on your own Mac/PC

_Testing with a full clean git clone

Works locally

Build log

Hi!

Could we try this how-to? How to install a specific Android NDK version on the Android NDK stack just instead of r15b put r10e. (so just a quick summary of what to do:

open the Workflow editor
Add a script step as the first step in the workflow and add the script from the discuss link to the input of the script step.
Replace r15b with r10e in the script)

Hi Akos,

This was solved.

The issue was caused by the changed made to the NDK here: https://github.com/bitrise-io/bitrise.io/commit/a62cbec806f1662611a9fc7e8cb0ff287402334e#diff-8ad163f79d9960c2636a7d60054d5d9b

It was solved by using the script

#!/usr/bin/env bash
set -ex

# set env vars
export ANDROID_NDK_VERSION='r15b'
export ANDROID_NDK_HOME='/opt/android-ndk'
# expose for subsequent steps
envman add --key ANDROID_NDK_HOME --value "$ANDROID_NDK_HOME"


# ------------------------------------------------------
# --- Android NDK

# clean up if a previous version is already installed
rm -rf "$ANDROID_NDK_HOME"

# download
mkdir /opt/android-ndk-tmp
cd /opt/android-ndk-tmp
wget -q https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip

# uncompress
unzip -q android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip

# move to its final location
mv ./android-ndk-${ANDROID_NDK_VERSION} ${ANDROID_NDK_HOME}

From: How to install a specific Android NDK version on the Android NDK stack

Thanks.

Best regards.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.