source-engine
source-engine copied to clipboard
Android on Linux compiler configuration error
Hello, I'm using Ubuntu 16.04.6 32bit in VirtualBox, I followed the how to build instructions and I managed to build for Linux successfully, but android builds are giving me a compiler configuration error.
I'm using: -gcc v5.4.0 -g++ v5.4.0 -clang v3.8.0-2
Here's the build log: https://pastebin.com/fqvRicQe.
The problem seems to be with the Android NDK, I downloaded android-ndk-r10e-linux-x86_64.zip as instructed, decompressed the files, ran chmod +x /ANDROID_NDK_DIRECTORY -R
.
I'm noticing that the build script is looking for a folder that doesn't exist in my Android NDK, specifically:
android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86
I have
android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
Instead, did I download the wrong NDK, do I need to further setup the NDK?
Thank you for your time.
It is better not to use Android emulation X86 architecture to compile, because it is very inefficient and error-prone, it is recommended to use CI to assist your compilation
It is better not to use Android emulation X86 architecture to compile, because it is very inefficient and error-prone, it is recommended to use CI to assist your compilation
I'm running Ubuntu on a Windows host, not via Android termux. Thank you for the CI/CD tip, but I'm trying to build an APK not just verify build reports.
Try the following command, recommended for Ubuntu 20.04 or 22.04
#Install dependent libraries
sudo apt update; sudo apt upgrade -y ;apt install g++ gcc
wget https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip -o /dev/null
sudo apt update;sudo apt upgrade;sudo apt install ccache
unzip android-ndk-r10e-linux-x86_64.zip > /dev/null
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-11.1.0/clang+llvm-11.1.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz -o /dev/null
tar xvf clang+llvm-11.1.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz > /dev/null
mv clang+llvm-11.1.0-x86_64-linux-gnu-ubuntu-16.04 clang/
export PATH=$(pwd)/clang/bin:$PATH
mv android-ndk-r10e ndk/
export ANDROID_NDK_HOME=$(pwd)/ndk
mkdir ./andriod
git submodule init;git submodule update
Thanks, I'll give it a try
Try the following command, recommended for Ubuntu 20.04 or 22.04
The same problem remains, here's a build log. I noticed you recommended using Ubuntu 20.04 or 22.04, but the build tutorial suggests using Ubuntu 16.04, is this no longer the case? Also issue #69 suggests using Ubuntu 32 bit, using 64 bit Ubuntu gave me the same freetype not found error mentioned on that issue.
Do you have the project setup correctly to export to android? I have this small modification I want to try and I'd really appreciate it if you can build it for me
Well, i should update wiki and workflow scripts. I don't using gcc from ndk to build anymore
Following the instructions mentioned in this Fork
I managed to get the install process to finish, but I end up with these .so
files for the android architecture used as shown here, how can I get an APK?
Built using ./waf configure -T release --togles --android=armeabi-v7a-hard,host,21 --prefix=/home/mob/Workspace/Output
.
Here's the Build Log.
Following the instructions mentioned in this Fork I managed to get the install process to finish, but I end up with these
.so
files for the android architecture used as shown here, how can I get an APK? Built using./waf configure -T release --togles --android=armeabi-v7a-hard,host,21 --prefix=/home/mob/Workspace/Output
. Here's the Build Log.
https://github.com/nillerusr/srceng-android Its compilation method is a bit troublesome.
https://github.com/nillerusr/srceng-android Its compilation method is a bit troublesome.
I couldn't find build instructions, so I tried following the GitHub build action by using these commands.
Which gave me this error:
./scripts/workflow.sh: line 8: cd: jni/src/tierhook: No such file or directory make: *** No targets specified and no makefile found. Stop.
when trying to execute the ./scripts/workflow.sh
shell script.
No jni/ directory exists in the srceng-android directory. Are there any build instructions out there? or a fix for this?
I just noticed that the Github action specifies the con-wrappers
branch for the build, I missed that at first, that branch has the jni
directory.
I'll try building that.
I just managed to build the nillerusr/srceng-android
project on the con-wrappers
branch, but it's the old version that emulated the nvidia tegra, is the new version based on the source leak located on a different branch or something?
我刚刚设法
nillerusr/srceng-android
在分支上构建项目con-wrappers
,但它是模拟 nvidia tegra 的旧版本,基于源泄漏的新版本位于不同的分支上还是什么?
I just managed to build the "nillerusr/srceng-android" project on the "con-wrappers" branch, but it is the old version that emulates the nvidia tegra, is the new version based on the source code leak that is on a different branch or something?
andriod-fixes
I just managed to build the
nillerusr/srceng-android
project on thecon-wrappers
branch, but it's the old version that emulated the nvidia tegra, is the new version based on the source leak located on a different branch or something?
The default branch "Android-fixrs" is the new port starter.
Alright, so I managed to build the android-fixes
branch; the APK installs and opens fine, but whenever I try to launch the engine I get this SDL error.
SDL Error
Error: dlopen failed: library "libSDL2.so" not found
I noticed that the official APK has that .so
file and some more, but my compilation of nillerusr/source-engine
didn't produce some of these .so
files.
I need to modify the SDL2 library directly, so I need a fresh libSDL2.so
file, how can I compile that?
./waf -h
@Moe-Baker better build it with cmake and android-ndk-r20b. Well i need build scripts for building thirdpardy i think.