Open franksoong opened 11 months ago
I ran in the same issue with Azure Devops Ubuntu hosted agents. Also on a local ubuntu 22.04 installation. But when I tried Debian. There the issue does not occur on the latest branch.
So I think this has to do with a difference in a way the linux distro's handle Docker & premissions(??)
Eventually I am using a self hosted agent atm and configured it with Docker, git and unzip. I first run the integration.sh script, then start to build the image. That works
@jmeeske interesting... thanks for sharing the finding!
If that's the case then i suspect there's potentially an issue with kernel compatibility of binfmt.
https://askubuntu.com/questions/20246/running-a-mono-program-without-typing-in-mono-foo-exe
A workaround would be to call mono directly.
But looking at the error message, doesn't look like mxbuild is called directly. So binfmt should not be involved.
Perhaps the mono 5.20 shipped is not compatible with Ubuntu.
Other hypothesis: /tmp is mounted with noexec flag. That could explain the no permission error
I'm running into this same issue. Using the most recent, at this point in time, Mx docker buildpack on Azure AKS. No modifications and runs fine with Mx 9.24. But with Mx 10 I get exactly this issue. There are no Mx 10 users with this buildpack or is it very obvious to fix?
Updates:
latest
of docker buildpack@ppoetsma we use this buildpack at a customer I know for sure are on mendix 10.x . However last week another customer reported similar issue as above for mendix 10.12. We noticed the same problem with some of our test projects.
Are you getting the following error:
2024-08-08T11:23:11.3525199Z #16 24.83 Cannot open assembly '/opt/mendix/build/.local/mxbuild/modeler/mxbuild.exe': No such file or directory.
2024-08-08T11:23:11.5154618Z #16 24.84 ERROR: Could not read MxBuild error file
2024-08-08T11:23:11.5155262Z #16 24.84 Traceback (most recent call last):
2024-08-08T11:23:11.5156043Z #16 24.84 File "/opt/mendix/buildpack/buildpack/core/mxbuild.py", line 70, in build_from_source
2024-08-08T11:23:11.5156385Z #16 24.84 subprocess.check_call(args, env=mono_env)
2024-08-08T11:23:11.5156666Z #16 24.84 File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
2024-08-08T11:23:11.5156908Z #16 24.84 raise CalledProcessError(retcode, cmd)
2024-08-08T11:23:11.5158135Z #16 24.84 subprocess.CalledProcessError: Command '['/tmp/opt/mono-5.20.1.27/bin/mono', '--config', '/tmp/opt/mono-5.20.1.27/etc/mono/config', '/opt/mendix/build/.local/mxbuild/modeler/mxbuild.exe', '--target=package', '--output=/tmp/model.mda', '--java-home=/opt/mendix/build/.local/usr/lib/jvm/Adoptium-jdk-11.0.16-Adoptium-x64', '--java-exe-path=/opt/mendix/build/.local/usr/lib/jvm/Adoptium-jdk-11.0.16-Adoptium-x64/bin/java', '--write-errors=/tmp/builderrors.json', '/opt/mendix/build/XXX.mpr']' returned non-zero exit status 2.
2024-08-08T11:23:11.5158926Z #16 24.84
I don't have any fix yet unfortunately.
@xiwenc We get the same error as OP. That is in Azure AKS. But I am able to build a Mx 10.12.1 app locally using Debian WSL on Windows 11. WSL uses Docker Desktop of Windows but I run the commands from the WSL terminal.
We use the same app in both cases. It is quite frustrating that we are not able to make it work.
It seems that our problem is solved. When you perform the workflow, so clone buildback and build the rootfs's etc from Linux (Windows WSL is fine too) then it works. The first part of the workflow was done in Windows and that resulted in the error OP ran into too. We have not proven the solution yet, by doing the workflow partially in Windows again.
Update: We can reproduce the issue by having Windows in the workflow. When we replaced it with Linux then the issue was solved. Now we pull/clone the Github buildpack repo directly in an Azure DevOps repo.
2024-08-08T11:23:11.3525199Z #16 24.83 Cannot open assembly '/opt/mendix/build/.local/mxbuild/modeler/mxbuild.exe': No such file or directory.
This was a different issue and upgrading to docker-mendix-buildpack v5.0.5 fixes it.
HI Team, when i run latest version(branch) buildpack for you Mendix10 project, it throws below error, please he help:
PermissionError: [Errno 13] Permission denied: '/tmp/opt/mono-5.20.1.27/bin/mono'
the complete outputs: