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

[Issue Report]: discord_game_sdk.so not found after 1.5.3 rpm install (not in lib64) #7470

Open
Espionage724 opened this issue Oct 9, 2024 · 2 comments

Comments

@Espionage724
Copy link

Espionage724 commented Oct 9, 2024

Operating System

  • Linux x64
  • Fedora Linux 40 (Workstation Edition)

DevilutionX version

  • 1.5.3

Describe

Launching devilutionx as-is:

devilutionx: error while loading shared libraries: discord_game_sdk.so: cannot open shared object file: No such file or directory

/usr/lib/discord_game_sdk.so exists but maybe should be in /usr/lib64?

To Reproduce

  1. Download https://github.com/diasurgical/devilutionX/releases/download/1.5.3/devilutionx-linux-x86_64.tar.xz
  2. Extract
  3. sudo dnf install devilutionx.rpm
  4. devilutionx
  5. devilutionx: error while loading shared libraries: discord_game_sdk.so: cannot open shared object file: No such file or directory

Expected Behavior

  • devilutionx to start without issue

Additional context

  • I'd like to avoid needing anything to do with Discord with devilutionx (I only play singleplayer currently and occasionally use Discord unrelated browser-only).
  • devilutionx.sh from extracted tar works with discord_game_sdk.so in the folder
  • ln -s /usr/lib/discord_game_sdk.so /usr/lib64/discord_game_sdk.so and devilutionx works
@Espionage724 Espionage724 changed the title [Issue Report]: discord_game_sdk.so not found (x86_64 devilutionx.rpm) [Issue Report]: discord_game_sdk.so not found after 1.5.3 rpm install (not in lib64) Oct 9, 2024
@glebm
Copy link
Collaborator

glebm commented Oct 9, 2024

It's currently hardcoded to "lib" here:

devilutionX/CMakeLists.txt

Lines 629 to 631 in d6c8189

if(DISCORD_SHARED_LIB)
install(FILES "${DISCORD_SHARED_LIB}" DESTINATION "lib")
endif()

I'm guessing we should use some kind of variable instead but I'm not sure which one.

We can try "${CMAKE_INSTALL_LIBDIR}".

@glebm
Copy link
Collaborator

glebm commented Oct 9, 2024

Looks like we somehow need to tell the CPack RPM generator to use RPM's %{_libdir} macro but I haven't figured out a way to do this.

Command to build RPM and list the contents:

cmake -S. -Bbuild-rel -DCMAKE_BUILD_TYPE=Release -DDISCORD_INTEGRATION=ON
cmake --build build-rel -j --target package && rpm -qlp build-rel/devilutionx-1.6.0-1.x86_64.rpm

rpmlint results:

rpmlint build-rel/devilutionx-1.6.0-1.x86_64.rpm
devilutionx.x86_64: W: unstripped-binary-or-object /usr/lib/discord_game_sdk.so
devilutionx.x86_64: E: standard-dir-owned-by-package /usr/share/icons
devilutionx.x86_64: E: shared-library-not-executable /usr/lib/discord_game_sdk.so
devilutionx.x86_64: E: non-versioned-file-in-library-package /usr/lib/.build-id
devilutionx.x86_64: E: non-versioned-file-in-library-package /usr/share/applications
devilutionx.x86_64: E: non-versioned-file-in-library-package /usr/share/applications/devilutionx-hellfire.desktop
devilutionx.x86_64: E: non-versioned-file-in-library-package /usr/share/applications/devilutionx.desktop
devilutionx.x86_64: E: non-versioned-file-in-library-package /usr/share/diasurgical
devilutionx.x86_64: E: non-versioned-file-in-library-package /usr/share/diasurgical/devilutionx
devilutionx.x86_64: E: non-versioned-file-in-library-package /usr/share/diasurgical/devilutionx/README.txt
devilutionx.x86_64: E: non-versioned-file-in-library-package /usr/share/diasurgical/devilutionx/devilutionx.mpq
devilutionx.x86_64: E: non-versioned-file-in-library-package /usr/share/icons
devilutionx.x86_64: E: non-versioned-file-in-library-package /usr/share/icons/hicolor
devilutionx.x86_64: E: non-versioned-file-in-library-package /usr/share/metainfo
devilutionx.x86_64: E: non-versioned-file-in-library-package /usr/share/metainfo/devilutionx.metainfo.xml
devilutionx.x86_64: E: non-standard-dir-perm /usr/share/applications 775
devilutionx.x86_64: E: non-standard-dir-perm /usr/share/diasurgical 775
devilutionx.x86_64: E: non-standard-dir-perm /usr/share/diasurgical/devilutionx 775
devilutionx.x86_64: E: non-standard-dir-perm /usr/share/icons 775
devilutionx.x86_64: E: non-standard-dir-perm /usr/share/icons/hicolor 775
devilutionx.x86_64: E: non-standard-dir-perm /usr/share/icons/hicolor/512x512 775
devilutionx.x86_64: E: non-standard-dir-perm /usr/share/icons/hicolor/512x512/apps 775
devilutionx.x86_64: E: non-standard-dir-perm /usr/share/metainfo 775
devilutionx.x86_64: W: no-url-tag
devilutionx.x86_64: W: no-soname /usr/lib/discord_game_sdk.so
devilutionx.x86_64: E: no-signature
devilutionx.x86_64: E: no-packager-tag
devilutionx.x86_64: W: no-manual-page-for-binary devilutionx
devilutionx.x86_64: W: no-documentation
devilutionx.x86_64: W: name-repeated-in-summary DevilutionX
devilutionx.x86_64: E: missing-hash-section /usr/lib/discord_game_sdk.so
devilutionx.x86_64: W: invalid-license unknown
devilutionx.x86_64: E: executable-in-library-package /usr/bin/devilutionx
devilutionx.x86_64: E: description-line-too-long This is an installer created using CPack (https://cmake.org). No additional installation instructions provided.

I think one way to resolve this might be to manually write an RPM spec file, as described in this blog post https://schneide.blog/2013/02/11/build-a-rpm-package-using-cmake/

Contributions welcome!

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

No branches or pull requests

3 participants
@glebm @Espionage724 and others