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

Bob cannot find oggz-validate on Linux #8927

Closed
hillsofsteel opened this issue May 15, 2024 · 3 comments
Closed

Bob cannot find oggz-validate on Linux #8927

hillsofsteel opened this issue May 15, 2024 · 3 comments
Labels
bob Issues related to the bob command line build tool bug Something is not working as expected linux Issue related to the Linux platform more info The issue is lacking required information sound Issues related to sound handling

Comments

@hillsofsteel
Copy link

Is it a private platform, and a platform specific issue? (i.e. would it break your NDA?)

Then please report your issue in the corresponding extension repository!

Describe the bug (REQUIRED)
Building wasm with bob.jar in a GitLab runner with an Alpine Linux image, build step fails if you have .ogg sounds in the project due to
java.io.IOException: Cannot run program "/tmp/13879549146032368337/x86_64-linux/oggz-validate": error=2, No such file or directory

Build completes successfully with the same command and environment if there are no sound files in the project.

To Reproduce (REQUIRED)
Steps to reproduce the behavior:

  1. Deploy VM from eclipse-temurin:17-alpine image (not tested other linux distros)
  2. (Optional) Install missing packages: libxext libxi luajit libstdc++ liboggz
  3. Download bob.jar
  4. Command used: java -jar bob.jar --archive --platform js-web --architectures wasm-web --liveupdate yes --texture-compression true --variant debug resolve distclean build bundle
  5. Run to see error

Expected behavior (REQUIRED)
Build should complete without errors.

Defold version (REQUIRED):

Platforms (REQUIRED):

  • Platforms: HTML5
  • OS: Linux Alpine (Eclipse Temurin with OpenJDK 17)

Logs (OPTIONAL):

Using docker image sha256:2047ca23386d42bc84547ef2efd1f38e0aba1fca3f0ecdc7c10da0b147cb4c33 for eclipse-temurin:17-alpine with digest eclipse-temurin@sha256:2be4813fc9cecaa6054abc518b2ed75a8d4c6db449abb2f16a03f5ed81e4a01f ...
$ java -jar bob.jar --archive --platform js-web --architectures wasm-web --liveupdate yes --texture-compression true --variant debug resolve distclean build bundle
Working...Reading classes...2024-05-14 08:09:26 INFO     
 1% ...done!
Cleaning... 2% ...done!
Reading tasks...Build Remote Engine...
Building engine...May 14, 2024 8:09:28 AM com.defold.extender.client.ExtenderClient log
INFO: Sending async build request to https://build.defold.com/build_async/wasm-web/9141d9d3605e3f5d51c71293116d769da2613d39
May 14, 2024 8:09:28 AM com.defold.extender.client.ExtenderClient log
INFO: Async build request was accepted as job job1035791544389547759
java.io.IOException: Cannot run program "/tmp/13879549146032368337/x86_64-linux/oggz-validate": error=2, No such file or directory
Cause: java.lang.RuntimeException: java.io.IOException: Cannot run program "/tmp/13879549146032368337/x86_64-linux/oggz-validate": error=2, No such file or directory
2024-05-14 08:09:30 SEVERE  java.io.IOException: Cannot run program "/tmp/13879549146032368337/x86_64-linux/oggz-validate": error=2, No such file or directory 
Cleaning up project directory and file based variables 00:00
ERROR: Job failed: exit code 1

Workaround (OPTIONAL):
Using Windows-based gitlab runners.

@hillsofsteel hillsofsteel added the bug Something is not working as expected label May 15, 2024
@britzl britzl added sound Issues related to sound handling linux Issue related to the Linux platform bob Issues related to the bob command line build tool labels May 20, 2024
@JCash
Copy link
Contributor

JCash commented May 20, 2024

Note that "Bob cannot find oggz-validate on Linux" isn't strictly true.
The error says "Cannot run program".

I can see a few common reasons:

  • A missing dependency
  • The wrong architecture for the OS

Q: What architecture does your runner use? x86_64 or arm64 ?

Q: What if you output the dependencies for the executable on that machine?

I.e. unpack the bob.jar file, and run ldd on the oggz-validate tool.
On my local docker (Ubuntu), it looks like this:

builder@ubuntu:~$ ldd ./com.dynamo.cr/com.dynamo.cr.bob/libexec/x86_64-linux/oggz-validate
	linux-vdso.so.1 (0x00007fff36be0000)
	liboggz.so => /home/builder/./com.dynamo.cr/com.dynamo.cr.bob/libexec/x86_64-linux/liboggz.so (0x00007f65c6c93000)
	libogg.so => /home/builder/./com.dynamo.cr/com.dynamo.cr.bob/libexec/x86_64-linux/libogg.so (0x00007f65c6a89000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f65c688e000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f65c6ea6000)

@JCash JCash added the more info The issue is lacking required information label May 20, 2024
@hillsofsteel
Copy link
Author

Q: What architecture does your runner use? x86_64 or arm64 ?

x86_64. GitLab refers to them as amd64 though if that makes any difference.

Q: What if you output the dependencies for the executable on that machine?

$ ldd ./bob/libexec/x86_64-linux/oggz-validate
	/lib64/ld-linux-x86-64.so.2 (0x7b2e147e2000)
	liboggz.so => ./bob/libexec/x86_64-linux/liboggz.so (0x7b2e145d1000)
	libogg.so => ./bob/libexec/x86_64-linux/libogg.so (0x7b2e143c7000)
	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7b2e147e2000)
Error relocating ./bob/libexec/x86_64-linux/oggz-validate: __snprintf_chk: symbol not found
Error relocating ./bob/libexec/x86_64-linux/oggz-validate: __printf_chk: symbol not found
Error relocating ./bob/libexec/x86_64-linux/oggz-validate: __fprintf_chk: symbol not found

Note that "Bob cannot find oggz-validate on Linux" isn't strictly true.
The error says "Cannot run program".

Should I edit the title?

@hillsofsteel
Copy link
Author

So indeed this was an issue in the environment rather than bob. After installing the required dependencies missing from Alpine (apk add gcompat in this case) the build completes successfully again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bob Issues related to the bob command line build tool bug Something is not working as expected linux Issue related to the Linux platform more info The issue is lacking required information sound Issues related to sound handling
Projects
None yet
Development

No branches or pull requests

3 participants