Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] Execution failed for task ':unityLibrary:BuildIl2CppTask'. #917

Open
ArnavBharti opened this issue Jan 11, 2024 · 1 comment
Open
Labels
Build This issue refers to the build configuration and builds failing. Linux Errors in builds on linux (ubuntu, etc.)

Comments

@ArnavBharti
Copy link

Describe the bug

FAILURE: Build failed with an exception.

* Where:
Build file '/home/.../unity_in_flutter/android/unityLibrary/build.gradle' line: 82

* What went wrong:
Execution failed for task ':unityLibrary:BuildIl2CppTask'.
> Process 'command '/home/.../unity_in_flutter/android/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/build/deploy/il2cpp'' finished with non-zero exit value 4

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
Running Gradle task 'assembleRelease'...                            4.0s
Gradle task assembleRelease failed with exit code 1

To Reproduce
Steps to reproduce the behavior:

  1. flutter build apk after following all the steps given in README as of 11th January

Expected behavior
Project build without errors and receive an APK output.

Using Linux Mint Victoria, Unity 2022.3.16f1

Additional context

more output

ExitCode: 1
Stdout: 
In file included from x6ly/pni0z91fdkks0.lump.cpp:2:
/home/.../unity_in_flutter/android/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/os/ClassLibraryPAL/pal_errno.cpp(348,9): error: cannot initialize a variable of type 'int' with an rvalue of type 'char *'
    int error = strerror_r(platformErrno, buffer, (uint32_t)bufferSize);
        ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from x6ly/pni0z91fdkks0.lump.cpp:3:
/home/.../unity_in_flutter/android/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/os/ClassLibraryPAL/pal_io.cpp(622,61): error: use of undeclared identifier 'INT_MAX'
        ssize_t sent = sendfile(outFd, inFd, NULL, (size >= SSIZE_MAX ? SSIZE_MAX : (size_t)size));
                                                            ^
/snap/flutter/current/usr/include/bits/posix1_lim.h(171,21): note: expanded from macro 'SSIZE_MAX'
#  define SSIZE_MAX     INT_MAX
                        ^
In file included from x6ly/pni0z91fdkks0.lump.cpp:3:
/home/.../unity_in_flutter/android/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/os/ClassLibraryPAL/pal_io.cpp(622,73): error: use of undeclared identifier 'INT_MAX'
        ssize_t sent = sendfile(outFd, inFd, NULL, (size >= SSIZE_MAX ? SSIZE_MAX : (size_t)size));
                                                                        ^
/snap/flutter/current/usr/include/bits/posix1_lim.h(171,21): note: expanded from macro 'SSIZE_MAX'
#  define SSIZE_MAX     INT_MAX
                        ^
3 errors generated.

   at il2cpp.Program.DoRun(TinyProfiler2 tinyProfiler, String[] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions) in /Users/bokken/build/output/unity/il2cpp/il2cpp/Program.cs:line 319

For privacy some parts of path replaced with "..."

@timbotimbo timbotimbo changed the title Execution failed for task ':unityLibrary:BuildIl2CppTask'. [Linux] Execution failed for task ':unityLibrary:BuildIl2CppTask'. Jan 11, 2024
@timbotimbo
Copy link
Collaborator

These errors are in the c++ files Unity exports for the engine, not much we can do about this. Maybe try a different Unity version.

I've seen plenty of errors on linux (mainly on ubuntu) that don't show up on mac or windows.

Maybe check the linux tag and see if any comment in those issues gives a hint.
https://github.com/juicycleff/flutter-unity-view-widget/issues?q=label%3ALinux+

@timbotimbo timbotimbo added Build This issue refers to the build configuration and builds failing. Linux Errors in builds on linux (ubuntu, etc.) labels Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build This issue refers to the build configuration and builds failing. Linux Errors in builds on linux (ubuntu, etc.)
Projects
None yet
Development

No branches or pull requests

2 participants