-
|
System: Linux Mint 21.3 Current version of ksh93 is: AJM 93u+m/1.0.8 2024-01-01 New version of ksh is: AJM 93u+m/1.0.10 2024-08-01 I made NO changes to src/cmd/ksh93/SHOPT.sh or set any compiler flags when I built both versions so am confused as to why the massive difference in size of the compiled program. bin/package test said that none of the tests failed. The install command used was: sudo bin/package install / Supplementary question: How do I get it to install as ksh93? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
This is likely the result of the ksh 1.0.8 statically linking against libast and other libraries, whereas 1.0.9 and 1.0.10 dynamically link against libast.so. The decrease in the file size of # dynamically-linked 1.0.10 libraries
$ ldd /usr/bin/ksh
linux-vdso.so.1 (0x00007fa8b88d3000)
libshell.so.4 => /usr/lib/libshell.so.4 (0x00007fa8b87bc000)
libast.so.8 => /usr/lib/libast.so.8 (0x00007fa8b86e6000)
libcmd.so.4 => /usr/lib/libcmd.so.4 (0x00007fa8b86a7000)
libdll.so.4 => /usr/lib/libdll.so.4 (0x00007fa8b86a0000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fa8b85d1000)
libmd.so.0 => /usr/lib/libmd.so.0 (0x00007fa8b85c0000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fa8b8200000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fa8b88d5000)All of the new .so libraries are statically linked into the 1.0.8 binary, whereas starting with 1.0.9+ dynamically linked ksh is installed by default. |
Beta Was this translation helpful? Give feedback.
-
Create a relative symbolic link for that: # Using GNU coreutils or uutils 'ln -r'
$ sudo ln -sr /usr/bin/ksh /usr/bin/ksh93The |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the info. I notice that there are differences between your ldd list and mine. Is there something else I need to do? $ ldd /usr/bin/ksh |
Beta Was this translation helpful? Give feedback.
This is likely the result of the ksh 1.0.8 statically linking against libast and other libraries, whereas 1.0.9 and 1.0.10 dynamically link against libast.so. The decrease in the file size of
/usr/bin/kshshould be accompanied by new libshell.so, libast.so, libcmd.so and libdll.so libraries.