Allow proper runtime linking with pkgin
-installed libraries on NetBSD
#695
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The NetBSD runtime linker appears to look in the same places as the dynamic linker on other systems but does not search LD_LIBRARY_PATH like it does on others, in what appears to be a deliberate design decision. Whatever the case, in order to prevent a
pkgin
user needing to symlink tons of libraries from the/usr/X11R7
and/usr/pkg
trees into/usr/local/lib
, Psi should tell the compiler to include parameters for the runtime linker to find the necessary libraries on that system. To aid in portability, I have created some conditions in CMakeLists.txt to allow for setting theCFLAGS
/CXXFLAGS
variables with the appropriate parameters.I have done minimal testing on NetBSD-9.1 amd64, and it builds successfully and runs correctly with these flags set (where it would build successfully but fail to link at runtime before). I have not thoroughly tested the program's functionality but it does start and show the UI.
Though it shouldn't matter much, I should note that I only build Psi+ (I haven't used base Psi in quite a few years now). If anyone else wishes to test regular Psi builds your input would be appreciated.