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

0ad: Fix build #4653

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

0ad: Fix build #4653

wants to merge 1 commit into from

Conversation

Staudey
Copy link
Member

@Staudey Staudey commented Dec 23, 2024

Summary

Fix some build issues that arose due to (I think) solbuild changes and the GCC 14 update

Resolves #4644

Test Plan

Build succeeds, but 0ad doesn't launch with the following error:

/usr/bin/pyrogenesis: error while loading shared libraries: libmozjs78-ps-release.so: cannot open shared object file: No such file or directory

Same thing happens with the package in the repository though. Marking this as a draft for now.

Checklist

  • Package was built and tested against unstable
  • This change could gainfully be listed in the weekly sync notes once merged

**Summary**

Fix some build issues that arose due to solbuild changes and the GCC 14 update

Signed-off-by: Thomas Staudinger <[email protected]>
@Staudey
Copy link
Member Author

Staudey commented Dec 23, 2024

Using LD_PRELOAD leads to this output:

 LD_PRELOAD=/usr/lib64/0ad/libmozjs78-ps-release.so 0ad
TIMER| InitVfs: 274.96 us
FILES| Main log written to '/home/thomas/.config/0ad/logs/mainlog.html'
FILES| Interesting log written to '/home/thomas/.config/0ad/logs/interestinglog.html'
TIMER| CONFIG_Init: 2.46738 ms
Sound: AlcInit success, using OpenAL Soft
Assertion failed: "0 && (L"FYI: WARN_IF_FALSE reports that a function failed. Feel free to ignore or suppress this warning.")"
Location: SoundManager.cpp:841 (RunHardwareDetection)

Call stack:

(0x55e7771a9aef) /usr/bin/pyrogenesis(+0x820aef) [0x55e7771a9aef]
(0x55e77714c820) /usr/bin/pyrogenesis(+0x7c3820) [0x55e77714c820]
(0x55e77714e605) /usr/bin/pyrogenesis(+0x7c5605) [0x55e77714e605]
(0x55e77714eb13) /usr/bin/pyrogenesis(+0x7c5b13) [0x55e77714eb13]
(0x55e776df6a01) /usr/bin/pyrogenesis(+0x46da01) [0x55e776df6a01]
(0x55e776dfe5b7) /usr/bin/pyrogenesis(+0x4755b7) [0x55e776dfe5b7]
(0x55e776dfe6b9) /usr/bin/pyrogenesis(+0x4756b9) [0x55e776dfe6b9]
(0x55e776d0d8ec) /usr/bin/pyrogenesis(+0x3848ec) [0x55e776d0d8ec]
(0x55e776a1dc66) /usr/bin/pyrogenesis(+0x94c66) [0x55e776a1dc66]
(0x55e776a0b619) /usr/bin/pyrogenesis(+0x82619) [0x55e776a0b619]
(0x7faa772364ec) /usr/lib/glibc-hwcaps/x86-64-v3/libc.so.6(+0x2a4ec) [0x7faa772364ec]
(0x7faa772365a9) /usr/lib/glibc-hwcaps/x86-64-v3/libc.so.6(__libc_start_main+0x89) [0x7faa772365a9]
(0x55e776a16325) /usr/bin/pyrogenesis(+0x8d325) [0x55e776a16325]

errno = 0 (No error reported here)
OS error = ?

@ermo
Copy link
Contributor

ermo commented Dec 23, 2024

LD_PRELOAD=/usr/lib64/0ad/libmozjs78-ps-release.so 0ad

What does LD_DEBUG=lib 0ad yield?

@Staudey
Copy link
Member Author

Staudey commented Dec 23, 2024

 LD_DEBUG=libs 0ad                                   
     96244:	find library=libreadline.so.8 [0]; searching
     96244:	 search cache=/etc/ld.so.cache
     96244:	  trying file=/usr/lib/libreadline.so.8
     96244:	
     96244:	find library=libc.so.6 [0]; searching
     96244:	 search cache=/etc/ld.so.cache
     96244:	  trying file=/usr/lib/glibc-hwcaps/x86-64-v3/libc.so.6
     96244:	
     96244:	find library=libncursesw.so.6 [0]; searching
     96244:	 search path=/usr/lib64/glibc-hwcaps/x86-64-v3:/usr/lib64/glibc-hwcaps/x86-64-v2:/usr/lib64		(system search path)
     96244:	  trying file=/usr/lib64/glibc-hwcaps/x86-64-v3/libncursesw.so.6
     96244:	  trying file=/usr/lib64/glibc-hwcaps/x86-64-v2/libncursesw.so.6
     96244:	  trying file=/usr/lib64/libncursesw.so.6
     96244:	
     96244:	
     96244:	calling init: /usr/lib64/ld-linux-x86-64.so.2
     96244:	
     96244:	
     96244:	calling init: /usr/lib/glibc-hwcaps/x86-64-v3/libc.so.6
     96244:	
     96244:	
     96244:	calling init: /usr/lib64/libncursesw.so.6
     96244:	
     96244:	
     96244:	calling init: /usr/lib/libreadline.so.8
     96244:	
     96244:	
     96244:	initialize program: /bin/sh
     96244:	
     96244:	
     96244:	transferring control: /bin/sh
     96244:	
     96245:	
     96245:	calling fini:  [0]
     96245:	
     96245:	
     96245:	calling fini: /usr/lib/libreadline.so.8 [0]
     96245:	
     96245:	
     96245:	calling fini: /usr/lib64/libncursesw.so.6 [0]
     96245:	
     96245:	
     96245:	calling fini: /usr/lib/glibc-hwcaps/x86-64-v3/libc.so.6 [0]
     96245:	
     96245:	
     96245:	calling fini: /usr/lib64/ld-linux-x86-64.so.2 [0]
     96245:	
     96247:	find library=libSDL2-2.0.so.0 [0]; searching
     96247:	 search cache=/etc/ld.so.cache
     96247:	  trying file=/usr/lib/libSDL2-2.0.so.0
     96247:	
     96247:	find library=libpng16.so.16 [0]; searching
     96247:	 search cache=/etc/ld.so.cache
     96247:	  trying file=/usr/lib/glibc-hwcaps/x86-64-v3/libpng16.so.16.44.0
     96247:	
     96247:	find library=libmozjs78-ps-release.so [0]; searching
     96247:	 search cache=/etc/ld.so.cache
     96247:	 search path=/usr/lib64/glibc-hwcaps/x86-64-v3:/usr/lib64/glibc-hwcaps/x86-64-v2:/usr/lib64		(system search path)
     96247:	  trying file=/usr/lib64/glibc-hwcaps/x86-64-v3/libmozjs78-ps-release.so
     96247:	  trying file=/usr/lib64/glibc-hwcaps/x86-64-v2/libmozjs78-ps-release.so
     96247:	  trying file=/usr/lib64/libmozjs78-ps-release.so
     96247:	
/usr/bin/pyrogenesis: error while loading shared libraries: libmozjs78-ps-release.so: cannot open shared object file: No such file or directory
     96244:	
     96244:	calling fini:  [0]
     96244:	
     96244:	
     96244:	calling fini: /usr/lib/libreadline.so.8 [0]
     96244:	
     96244:	
     96244:	calling fini: /usr/lib64/libncursesw.so.6 [0]
     96244:	
     96244:	
     96244:	calling fini: /usr/lib/glibc-hwcaps/x86-64-v3/libc.so.6 [0]
     96244:	
     96244:	
     96244:	calling fini: /usr/lib64/ld-linux-x86-64.so.2 [0]
     96244:	

@androidnisse
Copy link
Contributor

Have you seen this #3897 ?

@ermo
Copy link
Contributor

ermo commented Dec 23, 2024

Can use LD_PRELOAD=/usr/lib64/0ad/libmozjs78-ps-release.so as a workaround

So basically the ld.so dynamic loader/linker search path here is wrong / unknown.

Could be that the correct approach is to set DT_RUNPATH in the 0ad binary to /usr/lib64/0ad ...?

@malfisya
Copy link
Member

malfisya commented Dec 30, 2024

It doesn't even launch right now (without the rebuild). Same error:

❯ 0ad                                                                                                                                                                   
/usr/bin/pyrogenesis: error while loading shared libraries: libmozjs78-ps-release.so: cannot open shared object file: No such file or directory

There is a flatpak (unverified) for this. If this becomes too much of a hassle, consider removing it from repo.

@Staudey
Copy link
Member Author

Staudey commented Dec 30, 2024

Yes, that is what I was trying to say in the PR message

Same thing happens with the package in the repository though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage
Development

Successfully merging this pull request may close these issues.

0ad: does not build
4 participants