site  contact  subhomenews

LD_LIBRARY_PATH removed

February 04, 2014 — BarryK
Puppy has always had LD_LIBRARY_PATH exported in /etc/profile, and I have had the same thing in Quirky.

/etc/profile builds a LD_LIBRARY_PATH environment variable that (hopefully) has all paths to system-visible shared libraries.
When an application needs to load a shared library, the paths in LD_LIBRARY_PATH are searched first, failing that, /etc/ld.so.cache is used (which is generated from /etc/ld.so.conf by the utility 'ldconfig').

We have always done it this way, but it is slow.

Puppy was usually built with 'ldconfig' in the devx SFS only, so /etc/ld.so.conf and /etc/ld.so.cache never got updated when a package was installed or removed.
Hence the dependence on LD_LIBRARY_PATH.

The next Quirky (which will be Tahr 6.0.2) is going to have 'ldconfig' in the main f.s., not in the devx.
I have modified /usr/local/petget/installpkg.sh and removepreview.sh to update /etc/ld.so.conf and /etc/ld.so.cache when a package is installed or uninstalled (if it has system-visible shared library files).

I have modified /etc/profile to not export LD_LIBRARY_PATH.

Hopefully this might make a slightly faster application startup time.

The only thing that I don't like is that Ubuntu's 'ldconfig' is compiled statically with glibc, and is about 800KB. I could probably do a dietlibc or uclibc static compile and make a PET.

Comments

Restored pre tags:

#120226 01micko: test screensize and set SCROLLABLE variable

SCRNSIZE="`xwininfo -root|grep -iE "height"|cut -d ':' -f2`"
if [ "$SCRNSIZE" -le "600" ];then #kicks in at 800x600resolution, eee-701 is 800x480
SCROLLABLE=" scrollable=\"true\" height=\"340\" width=\"450\"" #leading space is essential
else
SCROLLABLE=" scrollable=\"false\""
fi
<

Tags: linux