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

Package j provides libj.so, but it's not linked or copied into the default linker search path #32640

Closed
subsetpark opened this issue Aug 23, 2021 · 4 comments
Labels
bug Something isn't working Stale

Comments

@subsetpark
Copy link

System

  • xuname: Void 5.13.9_1 x86_64 GenuineIntel uptodate rrrmFFFF
  • package: j-901.f_1

Expected behavior

libj.so is available on the default dynamic linker search path (ie, a system call like dlopen("j") should locate libj.so)

Actual behavior

libj.so is present and functional at /usr/lib64/j/j64/libj.so, but not available in /usr/lib64.

Steps to reproduce the behavior

Attempt to use dynamic linking to access the libj.so file provided in the J distribution.

Here's a minimal C program that demonstrates the difference (obviously, the janet package is installed on my system!):

#include <dlfcn.h>
#include <stdio.h>

int main(int argc, char **argv) {
  void *p = dlopen("libjanet.so", RTLD_NOW);
  printf("Janet DLL pointer: %p\n", p);
  void *q = dlopen("libj.so", RTLD_NOW);
  printf("J DLL pointer: %p\n", q);
}

Here's the execution example on my system:

Desktop [] ⊕ gcc ex.c -ldl                                                                                              
Desktop [] ⊕ ./a.out                                                                                                    
Janet DLL pointer: 0x5561857862c0
J DLL pointer: (nil)
@subsetpark subsetpark mentioned this issue Aug 23, 2021
3 tasks
@paper42 paper42 added the bug Something isn't working label Aug 23, 2021
@leahneukirchen
Copy link
Member

Problem is we have 3 libj.so, so which one should be used?

@subsetpark
Copy link
Author

Presumably the same version that’s selected by the jconsole shim. The version selection is based on the system architecture (I think), so it seems safe to make that choice at install time?

@subsetpark
Copy link
Author

Alternately, if we didn't want to make that decision for the user, we could provide a script that did the symlinking and post-install instructions which would point them to the script.

@github-actions
Copy link

github-actions bot commented Jun 2, 2022

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants