Compile source without dependencies
I downloaded and compiled Sudo from sudo.ws
however when I install my compiled version of Sudo on a Solaris machine that doesn't have gcc I get the following errors. libintl.so.8 => (file not found) libiconv.so.2 => (file not found) bash-2.05$ sudo -V ld.so.1: sudo: fatal: libintl.so.8: open failed: No such file or directory bash-2.05$ ldd /opt/quest/bin/sudo /usr/lib/secure/s9_preload.so.1 libproject.so.1 => /usr/lib/libproject.so.1 libsocket.so.1 => /usr/lib/libsocket.so.1 libnsl.so.1 => /usr/lib/libnsl.so.1 libsudo_util.so.0 => /opt/quest/libexec/sudo/libsudo_util.so.0 libintl.so.8 => (file not found) libiconv.so.2 => (file not found) libsec.so.1 => /usr/lib/libsec.so.1 libc.so.1 => /usr/lib/libc.so.1 libdl.so.1 => /usr/lib/libdl.so.1 librt.so.1 => /usr/lib/librt.so.1 libsecdb.so.1 => /usr/lib/libsecdb.so.1 libproc.so.1 => /usr/lib/libproc.so.1 libpool.so.1 => /usr/lib/libpool.so.1 libmp.so.2 => /usr/lib/libmp.so.2 libintl.so.8 => (file not found) libiconv.so.2 => (file not found) libaio.so.1 => /usr/lib/libaio.so.1 libmd5.so.1 => /usr/lib/libmd5.so.1 libcmd.so.1 => /usr/lib/libcmd.so.1 librtld_db.so.1 => /usr/lib/librtld_db.so.1 libelf.so.1 => /usr/lib/libelf.so.1 libxml2.so.2 => /usr/lib/libxml2.so.2 libpthread.so.1 => /usr/lib/libpthread.so.1 libz.so.1 => /usr/lib/libz.so.1 libm.so.1 => /usr/lib/libm.so.1 /usr/platform/sun4v/lib/libc_psr.so.1 libthread.so.1 => /usr/lib/libthread.so.1 I looked into the dependencies and I don't need them for what I want to achieve however I need to use the compiled version for added functionality If I download the and install already compiled version I don't see those missing dependencies like below # ldd /usr/bin/sudo /usr/lib/secure/s9_preload.so.1 libproject.so.1 => /usr/lib/libproject.so.1 libsocket.so.1 => /usr/lib/libsocket.so.1 libnsl.so.1 => /usr/lib/libnsl.so.1 libsudo_util.so.0 => /usr/local/libexec/sudo/libsudo_util.so.0 libdl.so.1 => /usr/lib/libdl.so.1 librt.so.1 => /usr/lib/librt.so.1 libc.so.1 => /usr/lib/libc.so.1 libsecdb.so.1 => /usr/lib/libsecdb.so.1 libproc.so.1 => /usr/lib/libproc.so.1 libpool.so.1 => /usr/lib/libpool.so.1 libmp.so.2 => /usr/lib/libmp.so.2 libaio.so.1 => /usr/lib/libaio.so.1 libmd5.so.1 => /usr/lib/libmd5.so.1 libcmd.so.1 => /usr/lib/libcmd.so.1 librtld_db.so.1 => /usr/lib/librtld_db.so.1 libelf.so.1 => /usr/lib/libelf.so.1 libxml2.so.2 => /usr/lib/libxml2.so.2 libpthread.so.1 => /usr/lib/libpthread.so.1 libz.so.1 => /usr/lib/libz.so.1 libm.so.1 => /usr/lib/libm.so.1 /usr/platform/sun4v/lib/libc_psr.so.1 libthread.so.1 => /usr/lib/libthread.so.1 # Is it possible to compile from source without those dependencies? |
Read through the documents in the sudo build file set, and there are build options. I no longer remember the exact syntax, but you can set STATIC and compile to a single larger executable that includes all of the dependencies rather than using the dynamic calls. It creates a larger package, and is arguably less secure since security updates to those packages will be ignored until your next build.
|
.so files are dynamically linked, so they have to be present everytime you run the program.
Copy those library files into /usr/lib or /usr/local/lib or something. (Assuming these computers are all of the same architecture -- i.e. UltraSPARC or x86_64, etc.) If you put it in /usr/local/lib (or anywhere else), make sure that directory is in your LD_LIBRARY_PATH environment variable. |
Quote:
|
Are you writing this for yourself or for widespread distribution?
|
Thank you
Quote:
|
Quote:
It may help someone else working on the same issue one day. |
Yes, I'd also like to know what your solution was.
Also, these are GNU items, so on Solaris 11.3, they probably should live in /usr/gnu, so if you needed to install them, they should probably go there, making sure the appropriate directories are in the appropriate environment PATHs. |
All times are GMT -5. The time now is 09:34 AM. |