woof-CE icon indicating copy to clipboard operation
woof-CE copied to clipboard

profile: Added debian library path

Open rizalmart opened this issue 1 year ago • 8 comments

Newly built debian-based puppy unable to detect library installed at /usr/lib/-linux-gnu. This will fix the problem

rizalmart avatar Apr 05 '23 04:04 rizalmart

I vote to merge this commit! I have had to manually do this exact export manually several times recently and this does the fix.

techrockedge avatar Feb 13 '24 18:02 techrockedge

This is a "dirty" solution for a problem that doesn't exist. The clean solution is to use the upstream distro's /etc/ld.so.conf{,.d} instead of forcing Puppy's one, and use the upstream distro's file system layout (usrmerge or not).

dpup uses Debian's library path and the LD_LIBRARY_PATH value set in /etc/profile doesn't do anything really. 3builddistro doesn't force Puppy's bad ld.so.conf if USR_SYMLINKS=yes, otherwise many applications you install are broken and multilib doesn't work (it works thanks to files in /etc/ld.so.conf.d).

https://github.com/puppylinux-woof-CE/woof-CE/blob/f0755e696904f10c6103af897a493db5760d6337/woof-code/3builddistro#L845

In dpup, /lib64/ld-linux-x86-64.so.2 --help shows that the search path used is a combination of what /etc/ld.so.conf (plus /etc/ld.so.conf.d/* - sourced by ld.so.conf) says plus what LD_LIBRARY_PATH says (/lib, /usr/lib, etc' are meaningless because libraries are under the x86_64-linux-gnu subdirectory).

dimkr avatar Feb 13 '24 18:02 dimkr

The clean solution is to use the upstream distro's /etc/ld.so.conf{,.d} instead of forcing Puppy's one, and use the upstream distro's file system layout (usrmerge or not). That is the best solution. I have manually created files in /etc/ld.so.conf{,.d} to test this on F96-CE when compiling certain packages.

Though I have also manually added the lib path to LD_LIBRARY_PATH in /etc/profile on Fossapup64's for a quick fix.

techrockedge avatar Feb 13 '24 21:02 techrockedge

Slackware does not have ld.so.conf in glibc - it is generated by: https://github.com/puppylinux-woof-CE/woof-CE/blob/testing/woof-code/3builddistro#L846

which overwrites: https://github.com/puppylinux-woof-CE/woof-CE/blob/testing/woof-code/rootfs-skeleton/etc/ld.so.conf

peabee avatar Feb 14 '24 09:02 peabee

Puppy's ld.so.conf has no advantage over Slackware's ld.so.conf, using Slackware's one can only improve compatibility with Slackware, and maybe it can reduce the number of directories the loader needs to check when you run an executable.

I'd delete Puppy's ld.so.conf and remove this condition (use the if flow in all builds and drop the else):

https://github.com/puppylinux-woof-CE/woof-CE/blob/f0755e696904f10c6103af897a493db5760d6337/woof-code/3builddistro#L843

dimkr avatar Feb 14 '24 09:02 dimkr

Slackware does not have ld.so.conf in glibc

peabee avatar Feb 14 '24 09:02 peabee

Maybe not in glibc, maybe somewhere else 🤷🏿

And if it doesn't have on at all (just uses the loader's default search path), that's also a valid option for a Slackware-based Puppy.

dimkr avatar Feb 14 '24 09:02 dimkr

Nowhere else in any of the packages currently included in the build.........

peabee avatar Feb 14 '24 09:02 peabee