Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The reason for this is that libclient.so is loaded from your JVM, which looks in <code>java.library.path</code>. However, when libclient.so tries to load libhttp.so, it knows nothing about Java and just uses the regular Linux way of loading shared libraries (the dynamic linker <code>ld.so</code>), which looks in <code>LD_LIBRARY_PATH</code> and some common directories like <code>/usr/lib64</code>.</p> <p>I would probably go with using <code>LD_LIBRARY_PATH</code> set from a start script of your Java application. If you don't want to use a start script, you could in theory set <code>LD_LIBRARY_PATH</code> from within the process itself. However, Java does not allow to do this (there is only <code>System.getenv()</code>, not <code>System.setenv()</code>), so you would need to write a small C library that is called from Java and calls <a href="http://man7.org/linux/man-pages/man3/putenv.3.html" rel="noreferrer"><code>putenv()</code></a> setting <code>LD_LIBRARY_PATH</code>.</p> <p>If you build <code>libclient.so</code> itself, you can use the <code>-rpath</code> linker flag to specify a path where the dynamic linker should look for further required libraries. Be careful if you specify a relative path here, it will interpreted as relative to the current working directory of the running application, not relative to the location of <code>libclient.so</code>. To achieve this, you need to use <code>$ORIGIN</code> as argument for <code>-rpath</code> and be careful that your shell does not expand this.</p> <p>So, if you want to have <code>libclient.so</code> and <code>libhttp.so</code> in the same directory, you need to use</p> <pre><code>-rpath '$ORIGIN' </code></pre> <p>as argument to the linker when building <code>libclient.so</code>. If you do not call the linker directly but let your compiler call it, you need to add the following to your compiler's command line:</p> <pre><code>-Wl,-rpath,'$ORIGIN' </code></pre> <p>More information about this can be found in the <a href="http://linux.die.net/man/8/ld.so" rel="noreferrer">man page for <code>ld.so</code></a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload