You are not logged in.

#1 2020-11-22 23:29:35

drankinatty
Member
From: Nacogdoches, Texas
Registered: 2009-04-24
Posts: 67
Website

pacman System Update broke LD_LIBRARY_PATH search of /usr/local/lib??

Archdevs,

  This is bizarre. I build the CS50 libs to help with CS50 questions on StackOverflow. Before updates last night, the LD_LIBRARY_PATH search of /usr/local/lib was fine. The contents of /usr/local/lib are:

# l /usr/local/lib/
total 360
drwxr-xr-x  3 root  root    4096 Nov 22 03:48 .
drwxr-xr-x 11 root  root    4096 Feb 15  2015 ..
drwxr-x---  2 root  http    4096 Jul 17  2012 apache2
-rw-r--r--  1 root  root     763 Mar 10  2016 Readme_libncurses.txt
lrwxrwxrwx  1 root  root      12 Nov 22 03:48 libcs50.so -> libcs50.so.9
lrwxrwxrwx  1 root  root      16 Nov 22 03:48 libcs50.so.9 -> libcs50.so.9.0.0
-rwxr-xr-x  1 root  root   17120 Nov 22 03:48 libcs50.so.9.0.0
-rw-r--r--  1 david david 328618 Dec  5  2018 libkeccak.a

  Compiling the Pset5 Speller project against -cs50 worked just fine last night:

$ ./bin/speller texts/holmes.txt >test/holmes.txt

  Compiling continues to work fine today after updates:

$ gcc -Wall -Wextra -pedantic -Wshadow -std=c11 -Ofast dictionary.c -o bin/speller speller.c  -lcs50

  No problems, but now attempting to run the executable results in:

$ ./bin/speller texts/holmes.txt >test/holmes.txt
./bin/speller: error while loading shared libraries: libcs50.so.9: cannot open shared object file: No such file or directory

Checking:

$ ldd ./bin/speller
        linux-vdso.so.1 (0x00007ffd169f4000)
        libcs50.so.9 => not found
        libc.so.6 => /usr/lib/libc.so.6 (0x00007ff935b90000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007ff935ea0000)

WTF??

  If I manually add /usr/local/lib to the search path, all is good:

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
$ ./bin/speller texts/lalaland.txt >test/lalaland.txt

  Why would LD_LIBRARY_PATH stop searching /usr/local/lib after pacman -Syu?? There is nothing listed at archlinux.org and it worked until I updated the following 35 packages today:

Packages (35)
ceph-15.2.6-1
ceph-libs-15.2.6-1
dconf-editor-3.38.2-1
fmt-7.1.2-1
fuse3-3.10.0-1
libraqm-0.7.1-1
librdkafka-1.5.2-1
libx11-1.7.0-1
python-beautifulsoup4-4.9.3-1
python-click-7.1.2-1
python-flask-1.1.2-2
python-itsdangerous-1.1.0-4
python-jinja-2.11.2-2
python-logutils-0.3.5-6
python-pecan-1.4.0-1
python-prettytable-0.7.2-12
python-soupsieve-2.0.1-1
python-waitress-1.4.4-2
python-webob-1.8.6-1
python-webtest-2.0.35-2
python-werkzeug-1.0.1-2
qt5-base-5.15.2-1
qt5-declarative-5.15.2-1
qt5-imageformats-5.15.2-1
qt5-location-5.15.2-1
qt5-script-5.15.2-1
qt5-sensors-5.15.2-1
qt5-svg-5.15.2-1
qt5-tools-5.15.2-1
qt5-translations-5.15.2-1
qt5-wayland-5.15.2-1
qt5-webchannel-5.15.2-1
qt5-webkit-5.212.0alpha4-8
qt5-x11extras-5.15.2-1
qt5-xmlpatterns-5.15.2-1

  Nothing even looks related unless python was messing with it? But just as stark a contrast as black and white, it worked fine before the update, fails after it??

  Regression of http://bugs.archlinux.org/task/20059?pr … pened=2263 ?

Any thoughts?

Last edited by drankinatty (2020-11-23 01:36:54)


David C. Rankin, J.D.,P.E.

Offline

#2 2020-11-23 11:19:05

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: pacman System Update broke LD_LIBRARY_PATH search of /usr/local/lib??

No idea about the LD_LIBRARY path, but why are you installing some stuff to /usr/local instead of using aur packages ?

see https://aur.archlinux.org/packages.php?K=cs50

Last edited by Lone_Wolf (2020-11-23 11:19:30)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2020-11-23 19:10:34

drankinatty
Member
From: Nacogdoches, Texas
Registered: 2009-04-24
Posts: 67
Website

Re: pacman System Update broke LD_LIBRARY_PATH search of /usr/local/lib??

The quick answer is I didn't look at AUR, and for the longest time I would simply use the library and includes from `/usr/local`. That has always worked as `/usr/local/lib` has been in the ARCH default library path since the bug I reference above. But for some reason after updates yesterday, after the updates, and I presume something calling `ldconfig`, the search of `/usr/local/lib` was wiped out. Thanks for pointing me to the AUR package. That saved me having to write the PKGBUILD.


David C. Rankin, J.D.,P.E.

Offline

#4 2020-11-23 20:32:47

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: pacman System Update broke LD_LIBRARY_PATH search of /usr/local/lib??

/usr/local/bin was added to $PATH [1],  not seeing any change to /etc/ld.so.conf.  Are you sure the issue was not closed without implementing any change with respect to /usr/local/lib?

[1] https://github.com/archlinux/svntogit-p … 7e0d7a99cd
Edit:
https://stackoverflow.com/questions/992 … earch-path

$ ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012
SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")

ldconfig -v 2>/dev/null | grep -v ^$'\t'
/usr/lib/libfakeroot/fakechroot: (from /etc/ld.so.conf.d/fakechroot.conf:1)
/usr/lib/libfakeroot: (from /etc/ld.so.conf.d/fakeroot.conf:1)
/usr/lib/openmpi: (from /etc/ld.so.conf.d/openmpi.conf:1)
/usr/lib/perf: (from /etc/ld.so.conf.d/perf.conf:1)
/usr/lib: (from <builtin>:0)

Last edited by loqs (2020-11-23 20:53:22)

Offline

#5 2020-11-24 21:12:52

drankinatty
Member
From: Nacogdoches, Texas
Registered: 2009-04-24
Posts: 67
Website

Re: pacman System Update broke LD_LIBRARY_PATH search of /usr/local/lib??

Yes, I'm sure. The general Makefile install for cs50 add the search path with `ldconfig /usr/local/lib`, the problem is it wasn't persistent. When pacman -Syu ran, something called ldconfig again and the library path was lost. I check with `ldconfig -v` and `/usr/local/lib` was not present after the update. Before grabbing the AUR package, I created a `usrlocal.conf` file for `ld.so.conf.d` which worked fine.

The problem being that since `/usr/local/lib` is supposed to be in the default LD_LIBRARY_PATH -- none of that should have been necessary.

Even now, `ldconfig -v | grep local` finds nothing but libboost_locale.so and libsvn_ra_local. Something is FUBAR.

Last edited by drankinatty (2020-11-24 21:16:16)


David C. Rankin, J.D.,P.E.

Offline

#6 2020-11-24 22:59:19

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: pacman System Update broke LD_LIBRARY_PATH search of /usr/local/lib??

drankinatty wrote:

The problem being that since `/usr/local/lib` is supposed to be in the default LD_LIBRARY_PATH -- none of that should have been necessary.

Are you basing that assertion solely on the bug report you linked that was closed without making a change to /etc/ld.so.conf ?

Offline

Board footer

Powered by FluxBB