Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

VSXU_PLUGIN_LOCATION #214

Open
cwilling opened this issue Mar 19, 2019 · 3 comments
Open

VSXU_PLUGIN_LOCATION #214

cwilling opened this issue Mar 19, 2019 · 3 comments

Comments

@cwilling
Copy link

cwilling commented Mar 19, 2019

vsx_platform.h has (line 69):
#define VSXU_PLUGIN_LOCATION vsx_string<>(get_exec_path().c_str()) + "/../lib/vsxu/plugins"
This may be OK for many linux distros; however some others have separate /usr/lib and /usr/lib64 directories. On such systems, this #define is wrong for 64bit machines leading to runtime inability to load any modules. I can patch locally but can't think of a neat way to programmatically adjust the location at build time.

There's a similar issue setting LD_LIBRARY_PATH in the Exec line in each of the .desktop files:

programs/server/vsxu-server.desktop.in
programs/artiste/vsxu-artiste.desktop.in
programs/artiste/vsxu-artiste-fullscreen.desktop.in
programs/player/vsxu-player-fullscreen.desktop.in
programs/player/vsxu-player.desktop.in

They can easily be fixed by adding @LIB_SUFFIX@ as follows:
Exec=/usr/bin/env LD_LIBRARY_PATH=@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@ @CMAKE_INSTALL_PREFIX@/bin/vsxu_server -f
Then the correct path will be set at build time (provided you give -DLIB_SUFFIX=64 to cmake).

I'll make a PR for setting the LD_LIBRARY_PATHs but I'm not sure on best course of action for setting VSXU_PLUGIN_LOCATION correctly in vsx_platform.h. Any ideas?

cwilling added a commit to cwilling/vsxu that referenced this issue Mar 19, 2019
@saidinesh5
Copy link
Member

@cwilling you can pass the VSXU_PLUGIN_LOCATION etc.. from CMake and generating vsx_platform.h from a vsx_platform.h.in . That should also cleanup some duplication and mismatch between cmakelists and the code there i think.

That being said, It is because of headaches like this that we went the "We support only AppImages for linux" route. It was just simply way too much "useless work" to support so many petty differences between distros.

cwilling added a commit to cwilling/vsxu that referenced this issue Mar 20, 2019
Fixes Part 1 of vovoid#214

Signed-off-by: Christoph Willing <[email protected]>
@cwilling
Copy link
Author

As @saidinesh5 suggested, I made PR #216 which generates correct vsx_platform.h from vsx_platform.h.in (according to -DLIB_SUFFIX supplied to cmake).

Along with PR #215, at least one of the petty differences between Linux distros is resolved :)

@cwilling
Copy link
Author

Just amended #216 - initially generation of vsx_platform.h was conditional on IF (CMAKE_SYSTEM_NAME MATCHES "Linux") but of course all platforms need this file so that condition is now removed.

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

No branches or pull requests

2 participants