1

I'm starting vim on 2 systems, one works, the other fails with undefined symbol. The problem is that on one system libogg is not loaded but I can't see any differences in the systems:

Working system:

 0  root@cpcsrv  ~  #
ldd -d -r /usr/bin/vim
    linux-vdso.so.1 (0x00007ffeac3bb000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9fd78c0000)
    libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f9fd7890000)
    libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f9fd7865000)
    libcanberra.so.0 => /usr/lib/x86_64-linux-gnu/libcanberra.so.0 (0x00007f9fd7852000)
    libacl.so.1 => /usr/lib/x86_64-linux-gnu/libacl.so.1 (0x00007f9fd7847000)
    libgpm.so.2 => /usr/lib/x86_64-linux-gnu/libgpm.so.2 (0x00007f9fd7641000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9fd7639000)
    libpython3.8.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (0x00007f9fd70e3000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9fd70c0000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9fd6ece000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f9fd7cf7000)
    libpcre2-8.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f9fd6e3e000)
    libvorbisfile.so.3 => /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3 (0x00007f9fd6e33000)
    libtdb.so.1 => /usr/lib/x86_64-linux-gnu/libtdb.so.1 (0x00007f9fd6e17000)
    libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007f9fd6e0c000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f9fd6dde000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9fd6dc2000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f9fd6dbd000)
    libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f9fd6d8d000)
    libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007f9fd6d80000)
 0  root@cpcsrv  ~  #
shasum /usr/bin/vim
252456f6ae369b50b19080fded66a8c30cd276cb  /usr/bin/vim
 0  root@cpcsrv  ~  #
ldd /usr/bin/vim | cut -d ">" -f2 | cut -d"(" -f1 | xargs shasum 
shasum: linux-vdso.so.1: No such file or directory
ecde9cbea868f4245458ac312c4e41e3e5cd0be3  /lib/x86_64-linux-gnu/libm.so.6
db05aa3c95a397af27269d42ab64a89072e6e399  /lib/x86_64-linux-gnu/libtinfo.so.6
186d209e1d331e9160d6d0b03c523d862ae9d2a4  /lib/x86_64-linux-gnu/libselinux.so.1
1157a413eeca7e8f6f3092d98af78aecd678e135  /usr/lib/x86_64-linux-gnu/libcanberra.so.0
87824e3a1281f42cb17ec488486b9ef416b61f0c  /usr/lib/x86_64-linux-gnu/libacl.so.1
d50fcf01f7db835832c1b4dae33cf4477bdf1de6  /usr/lib/x86_64-linux-gnu/libgpm.so.2
5be25973b0e59032cf8ac8ae16355aff6a3eb894  /lib/x86_64-linux-gnu/libdl.so.2
2f724c975ec8c9dd192ed077d950fcd30b1613d4  /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0
36c05642b16160a42e3eba7eb299b3d5dfbafdfe  /lib/x86_64-linux-gnu/libpthread.so.0
a1ca4cd2d1df2fcd2c0f582665051c261d84c1d6  /lib/x86_64-linux-gnu/libc.so.6
12b731d805f0c26f91ffd950669c213d5e809904  /lib64/ld-linux-x86-64.so.2
edb19c4b3bf4defa1f6a806e577a6fc8e9ac20b8  /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0
2667a466d02c008e9110d1e0f9846e857fb8bec5  /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3
dce449732ea95a5b952bc0b2ac91eae82dca3045  /usr/lib/x86_64-linux-gnu/libtdb.so.1
cf4f107a7ccdeefbcaace4d70bb61a4e75eb3231  /usr/lib/x86_64-linux-gnu/libltdl.so.7
e35093b682cbed186b459917d7c9e704bbeb7f65  /lib/x86_64-linux-gnu/libexpat.so.1
1c5fcbe97e9b9f4e366360b955679029540b7b2a  /lib/x86_64-linux-gnu/libz.so.1
1cbd68bb04c11c31209da67d7afdb3b1b1d49d2b  /lib/x86_64-linux-gnu/libutil.so.1
50bea70a1a350d8261b603f307872d116f272782  /usr/lib/x86_64-linux-gnu/libvorbis.so.0
18c43955cb21b4c034825be32d7d59f72ab8ed17  /usr/lib/x86_64-linux-gnu/libogg.so.0
 123  root@cpcsrv  ~  #
shasum /lib64/ld-linux-x86-64.so.2
12b731d805f0c26f91ffd950669c213d5e809904  /lib64/ld-linux-x86-64.so.2

Broken system:

 1  root@cscc-login-1  ~  #
vim
vim: symbol lookup error: /usr/lib/x86_64-linux-gnu/libvorbis.so.0: undefined symbol: oggpack_readinit
 127  root@cscc-login-1  ~  #
ldd -d -r /usr/bin/vim
        linux-vdso.so.1 (0x00007ffc527e1000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc2be965000)
        libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007fc2be935000)
        libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fc2be90a000)
        libcanberra.so.0 => /usr/lib/x86_64-linux-gnu/libcanberra.so.0 (0x00007fc2be8f7000)
        libacl.so.1 => /usr/lib/x86_64-linux-gnu/libacl.so.1 (0x00007fc2be8ec000)
        libgpm.so.2 => /usr/lib/x86_64-linux-gnu/libgpm.so.2 (0x00007fc2be6e6000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc2be6de000)
        libpython3.8.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (0x00007fc2be188000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc2be165000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc2bdf73000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fc2bed96000)
        libpcre2-8.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fc2bdee3000)
        libvorbisfile.so.3 => /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3 (0x00007fc2bded8000)
        libtdb.so.1 => /usr/lib/x86_64-linux-gnu/libtdb.so.1 (0x00007fc2bdebc000)
        libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007fc2bdeb1000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fc2bde83000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fc2bde67000)
        libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fc2bde62000)
        libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007fc2bde32000)
undefined symbol: oggpack_readinit      (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_bytes (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_adv   (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_writeclear    (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_get_buffer    (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_reset (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_read  (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_writetrunc    (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_writeinit     (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_write (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_look  (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: ogg_stream_reset      (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_stream_packetpeek (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_sync_clear        (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_page_bos  (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_stream_clear      (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_stream_packetout  (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_stream_pagein     (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_sync_reset        (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_sync_buffer       (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_sync_wrote        (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_page_granulepos   (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_sync_pageseek     (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_stream_init       (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_stream_reset_serialno     (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_page_serialno     (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_page_continued    (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_sync_init (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_page_eos  (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
 0  root@cscc-login-1  ~  #
shasum /usr/bin/vim
252456f6ae369b50b19080fded66a8c30cd276cb  /usr/bin/vim
 0  root@cscc-login-1  ~  #
ldd /usr/bin/vim | cut -d ">" -f2 | cut -d"(" -f1 | xargs shasum
shasum: linux-vdso.so.1: No such file or directory
ecde9cbea868f4245458ac312c4e41e3e5cd0be3  /lib/x86_64-linux-gnu/libm.so.6
db05aa3c95a397af27269d42ab64a89072e6e399  /lib/x86_64-linux-gnu/libtinfo.so.6
186d209e1d331e9160d6d0b03c523d862ae9d2a4  /lib/x86_64-linux-gnu/libselinux.so.1
1157a413eeca7e8f6f3092d98af78aecd678e135  /usr/lib/x86_64-linux-gnu/libcanberra.so.0
87824e3a1281f42cb17ec488486b9ef416b61f0c  /usr/lib/x86_64-linux-gnu/libacl.so.1
d50fcf01f7db835832c1b4dae33cf4477bdf1de6  /usr/lib/x86_64-linux-gnu/libgpm.so.2
5be25973b0e59032cf8ac8ae16355aff6a3eb894  /lib/x86_64-linux-gnu/libdl.so.2
2f724c975ec8c9dd192ed077d950fcd30b1613d4  /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0
36c05642b16160a42e3eba7eb299b3d5dfbafdfe  /lib/x86_64-linux-gnu/libpthread.so.0
a1ca4cd2d1df2fcd2c0f582665051c261d84c1d6  /lib/x86_64-linux-gnu/libc.so.6
12b731d805f0c26f91ffd950669c213d5e809904  /lib64/ld-linux-x86-64.so.2
edb19c4b3bf4defa1f6a806e577a6fc8e9ac20b8  /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0
2667a466d02c008e9110d1e0f9846e857fb8bec5  /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3
dce449732ea95a5b952bc0b2ac91eae82dca3045  /usr/lib/x86_64-linux-gnu/libtdb.so.1
cf4f107a7ccdeefbcaace4d70bb61a4e75eb3231  /usr/lib/x86_64-linux-gnu/libltdl.so.7
e35093b682cbed186b459917d7c9e704bbeb7f65  /lib/x86_64-linux-gnu/libexpat.so.1
1c5fcbe97e9b9f4e366360b955679029540b7b2a  /lib/x86_64-linux-gnu/libz.so.1
1cbd68bb04c11c31209da67d7afdb3b1b1d49d2b  /lib/x86_64-linux-gnu/libutil.so.1
50bea70a1a350d8261b603f307872d116f272782  /usr/lib/x86_64-linux-gnu/libvorbis.so.0
 123  root@cscc-login-1  ~  #
shasum /lib64/ld-linux-x86-64.so.2
12b731d805f0c26f91ffd950669c213d5e809904  /lib64/ld-linux-x86-64.so.2
 0  root@cscc-login-1  ~  #
ldd /usr/lib/x86_64-linux-gnu/libvorbis.so.0 
        linux-vdso.so.1 (0x00007ffd3eb85000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc4f446b000)
        libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007fc4f445e000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc4f426c000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fc4f45f5000)
 127  root@cscc-login-1  ~  #
sha1sum /usr/lib/x86_64-linux-gnu/libogg.so.0
18c43955cb21b4c034825be32d7d59f72ab8ed17  /usr/lib/x86_64-linux-gnu/libogg.so.0

What am I missing?

Note: ldd on libvorbis shows no undefined symbols, only when loaded indirectly via vim.

Update:

I run LD_DEBUG=all vim on both systems. On the working system I get this (among a lot of other output):

790086:     file=libogg.so.0 [0];  needed by /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3 [0]
790086:     find library=libogg.so.0 [0]; searching
790086:      search cache=/etc/ld.so.cache
790086:       trying file=/usr/lib/x86_64-linux-gnu/libogg.so.0
790086:     
790086:     file=libogg.so.0 [0];  generating link map
790086:       dynamic: 0x00007fe8529cacc8  base: 0x00007fe8529bf000   size: 0x000000000000c010
790086:         entry: 0x00007fe8529c1480  phdr: 0x00007fe8529bf040  phnum:                 11

On the broken system the first block is there too but the "generating link map" block is missing and libogg then disappears from the output.

  • Obviously, as said right at the top libogg isn't loaded on one system. The question is why? – Goswin von Brederlow Feb 02 '22 at 10:17
  • I've added the ldd output for libvorbis. It is linked against libogg so it should get loaded. So how do I find out why one system loads it and the other ignores it? – Goswin von Brederlow Feb 02 '22 at 10:30
  • libogg is identical too, added shasum for the borken system too. – Goswin von Brederlow Feb 02 '22 at 10:32
  • Only when loaded by vim. So this can be due to having library A and library B requesting different versions of libogg, and there's a problem only when an application uses both A and B, but I don't see how to reconcile this explanation with all the libraries on the two systems being identical, as well as vim itself. – Gilles 'SO- stop being evil' Feb 02 '22 at 10:43
  • There's a cache involved, maybe it's corrupted somehow? Not something I've ever seen, but I supposed it could happen. Try mv /etc/ld.so.cache /etc/ld.so.cache.old; ldconfig on the broken system. – Gilles 'SO- stop being evil' Feb 02 '22 at 10:44
  • Tried that already, not a cache issue. – Goswin von Brederlow Feb 02 '22 at 11:09
  • Strange that vim is loading vorbis etc along with a few other so's on one system. I think you need to tell us what the systems are and whether vim is as supplied with the os, or whether you have built it yourself or downloaded it from elsewhere. – Bib Feb 02 '22 at 20:14
  • It's a ubuntu focal on x86_64. Nothing special there. Only special thing is that / is an unionfs but that would be transparent to ld-linux. Strace shows identical data on the read for libogg but then ld-linux behaves differently on one system. – Goswin von Brederlow Feb 03 '22 at 11:47

0 Answers0