Non-system is not properly loaded

Issue #365 invalid
Chi Man Lei created an issue

I tried to compiled monit v5.17.1 from source code with a non-system openssl by specifying configure options, --with-ssl-incl-dir and --with-ssl-lib-dir, on my linux development box:

Linux 3.10.0-229.20.1.el7.x86_64 #1 SMP Tue Nov 3 19:10:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

The installation ran smoothly without any issues and from the make output I could tell the ssl libraries were found correctly from the specified locations. However, when I tried to run the monit binary I got error below:

/opt/luban/env/development.uber/.luban/pkg/monit/versions/5.17.1/bin/monit -V
/opt/luban/env/development.uber/.luban/pkg/monit/versions/5.17.1/bin/monit: error while loading shared libraries: cannot open shared object file: No such file or directory

then I ran "ldd" command and confirmed that monit couldn't find libssl properly:

ldd /opt/luban/env/development.uber/.luban/pkg/monit/versions/5.17.1/bin/monit =>  (0x00007ffd1fd99000) => /lib64/ (0x00007ff95f747000) => /lib64/ (0x00007ff95f538000) => /lib64/ (0x00007ff95f31b000) => /lib64/ (0x00007ff95f0e4000) => /lib64/ (0x00007ff95eeca000) => /lib64/ (0x00007ff95ecb0000) => not found => not found => /lib64/ (0x00007ff95e8ee000) => /lib64/ (0x00007ff95e6c7000) => /lib64/ (0x00007ff95e4c3000)
        /lib64/ (0x00007ff95fa51000) => /lib64/ (0x00007ff95e2bf000)

I then tried installing monit with the system openssl and the installation was successfully, monit could run properly without any errors like above.

Therefore, I suspect the given ssl header and lib locations were not properly handled in run-time although they were used during compilation.

Feel free to let me know if you want me to provide extra information.

Thank you very much!


Comments (2)

  1. Tildeslash repo owner

    It is not monit issue - you just need to set the path to non-system library in loader (e.g. via LD_LIBRARY_PATH environment variable when executing monit).

    Other option is to link monit with static SSL library.

  2. Chi Man Lei reporter

    Thanks a lot for the quick reply! I didn't notice there was an option to link monit with static SSL library. Tried it and worked fine.

    Thanks again for the great support!


  3. Log in to comment