WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Missing dep and extra dep in zstd.tcz.dep for x86_64  (Read 1460 times)

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 292
Missing dep and extra dep in zstd.tcz.dep for x86_64
« on: February 26, 2023, 12:19:57 AM »
"zstd" from zstd.tcz won't run without loading liblz4.tcz. liblz4.tcz is in zstd.tcz.dep on x86, but not on x86_64.

Also counter-intuitively libzstd.tcz isn't required by "zstd" on x86_64 even though it's in zstd.tcz.dep. "zstd" is the only binary in zstd.tcz (other executables are shell scripts) and it runs fine (compressing and decompressing in Zstandard format) without it.

This is backed up by the output of ldd:
Code: [Select]
$ ldd `which zstd`
        linux-vdso.so.1 (0x00007fff59ff2000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f77e83db000)
        liblzma.so.5 => /usr/local/lib/liblzma.so.5 (0x00007f77e83b9000)
        liblz4.so.1 => /usr/local/lib/liblz4.so.1 (0x00007f77e83a0000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f77e839b000)
        libc.so.6 => /lib/libc.so.6 (0x00007f77e81df000)
        /lib/ld-linux-x86-64.so.2 (0x00007f77e83fa000)

The following zstd.tcz.dep works correctly:
Code: [Select]
liblz4.tcz
liblzma.tcz

But I wonder whether this was a build mistake and zstd was supposed to be linked against libzstd.so? That would save space on my system because libzstd.tcz is a dependency of another extension that I load.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Missing dep and extra dep in zstd.tcz.dep for x86_64
« Reply #1 on: February 26, 2023, 03:24:16 AM »
zstd should have been linked to libzstd - I’m busy at the moment, but I’ll fix it in a couple of weeks.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Missing dep and extra dep in zstd.tcz.dep for x86_64
« Reply #2 on: March 09, 2023, 06:14:43 AM »
In the end I had to use cmake to get zstd to link against libzstd dynamically - posted in tc-14.x x86_64 repo.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Missing dep and extra dep in zstd.tcz.dep for x86_64
« Reply #3 on: March 09, 2023, 10:21:00 AM »
..and 14.x x86 repo

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 292
Re: Missing dep and extra dep in zstd.tcz.dep for x86_64
« Reply #4 on: March 10, 2023, 10:54:47 PM »
Thanks Juanito!